WIP Preorder readonly user (meridiam)

This commit is contained in:
Frank Schubert
2024-10-10 14:17:11 +02:00
parent 729ae61812
commit 396e26c0a1
7 changed files with 102 additions and 19 deletions
@@ -0,0 +1,31 @@
<?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") {
}
}
}