Files
thetool/db/migrations/20241007103659_add_preorder_readonly_permission.php
2024-10-10 14:17:11 +02:00

32 lines
846 B
PHP

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