24 lines
515 B
PHP
24 lines
515 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class AdbAddFcpIndex extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if ($this->getEnvironment() == 'addressdb')
|
|
{
|
|
$this->execute("ALTER TABLE `RimoFcp` ADD INDEX `idx_name` (`name`);");
|
|
}
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
if ($this->getEnvironment() == 'addressdb') {
|
|
$this->execute("ALTER TABLE `RimoFcp` DROP INDEX `idx_name`;");
|
|
}
|
|
}
|
|
}
|