21 lines
784 B
PHP
21 lines
784 B
PHP
<?php /** @noinspection ALL */
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class AddPreorderDbImprovements extends AbstractMigration {
|
|
public function up(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$this->table("PreordercampaignSalescluster")->addIndex(["preordercampaign_id","salescluster_id"])->save();
|
|
$this->table("RimoWorkorder")->addIndex(["adb_wohneinheit_id"])->save();
|
|
}
|
|
}
|
|
|
|
public function down(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$this->table("PreordercampaignSalescluster")->removeIndex(["preordercampaign_id","salescluster_id"])->save();
|
|
$this->table("RimoWorkorder")->removeIndex(["adb_wohneinheit_id"])->save();
|
|
}
|
|
}
|
|
}
|