Merge branch 'feature/improve-voiceplan-loading' into 'master'

Add indexes for voice plan tables

See merge request fronk/thetool!224
This commit is contained in:
Frank Schubert
2024-02-07 16:17:14 +00:00

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") {
}
}
}