Files
thetool/db/migrations/20250305160000_add_preorder_db_improvements.php
2025-03-05 16:32:20 +00:00

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();
}
}
}