21 lines
579 B
PHP
21 lines
579 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class PreorderAddWohneinheitIndex extends AbstractMigration {
|
|
public function up(): void {
|
|
if ($this->getEnvironment() !== 'thetool') return;
|
|
|
|
$sql = "ALTER TABLE `Preorder` ADD INDEX `idx_adb_wohneinheit_id` (`adb_wohneinheit_id`)";
|
|
$this->execute($sql);
|
|
}
|
|
|
|
public function down(): void {
|
|
if ($this->getEnvironment() !== 'thetool') return;
|
|
|
|
$sql = "ALTER TABLE `Preorder` DROP INDEX `idx_adb_wohneinheit_id`";
|
|
$this->execute($sql);
|
|
}
|
|
}
|