32 lines
911 B
PHP
32 lines
911 B
PHP
<?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") {
|
|
|
|
}
|
|
}
|
|
}
|