Files
thetool/db/migrations/20250507152034_preorder_add_borderpoint_status.php
2025-05-07 18:33:20 +02:00

34 lines
919 B
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class PreorderAddBorderpointStatus extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Preorder");
$table->addColumn("borderpoint_status", "enum", ["null" => true, "default" => null, "values" => ["need_measurement", "informed", "need_digging"], "after" => "accept_digging"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Preorder");
$table->removeColumn("borderpoint_status");
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
}