Files
thetool/db/migrations/20250917103000_adb_add_fcp_index.php
2025-09-17 13:23:03 +02:00

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`;");
}
}
}