Add indexes for voice plan tables

This commit is contained in:
2024-02-07 15:45:15 +01:00
parent c7c16830f7
commit cafc4fb740

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddVoicePlanIndex extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$this->execute("ALTER TABLE `Voiceplanzone` ADD INDEX `voiceplan_id` (`voiceplan_id`);");
$this->execute("ALTER TABLE `Voiceplandestination` ADD INDEX `voiceplanzone_id` (`voiceplanzone_id`);");
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->execute("ALTER TABLE `Voiceplanzone` DROP INDEX `voiceplan_id`;");
$this->execute("ALTER TABLE `Voiceplandestination` DROP INDEX `voiceplanzone_id`;");
}
if($this->getEnvironment() == "addressdb") {
}
}
}