Add indexes for voice plan tables
This commit is contained in:
31
db/migrations/20240207085822_add_voice_plan_index.php
Normal file
31
db/migrations/20240207085822_add_voice_plan_index.php
Normal 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") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user