Files
thetool/db/migrations/20231107155353_add_preorderlogistics_permission.php
2023-11-08 11:56:28 +01:00

32 lines
839 B
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddPreorderlogisticsPermission extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("WorkerPermission");
$table->addColumn("preorderlogistics", "enum", ["values" => 'false,true', "default" => "false", "after" => "preorderaddressreporting"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("WorkerPermission")->removeColumn("preorderlogistics")->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
}