Added Preorderbilling permissions

This commit is contained in:
Frank Schubert
2025-02-25 20:33:47 +01:00
parent 236932d452
commit 11b1357c52
9 changed files with 768 additions and 557 deletions
@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddPreorderbillingPermissions extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("WorkerPermission");
$table->addColumn("canPreorderpricing", "enum", ["values" => 'false,true', "default" => "false", "after" => "canPreorder"]);
$table->addColumn("canPreorderpricingReadonly", "enum", ["values" => 'false,true', "default" => "false", "after" => "canPreorderpricing"]);
$table->addColumn("canPreorderbilling", "enum", ["values" => 'false,true', "default" => "false", "after" => "canPreorderpricingReadonly"]);
$table->addColumn("canPreorderbillingReadonly", "enum", ["values" => 'false,true', "default" => "false", "after" => "canPreorderbilling"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("WorkerPermission")->removeColumn("canPreorderpricing")->update();
$this->table("WorkerPermission")->removeColumn("canPreorderpricingReadonly")->update();
$this->table("WorkerPermission")->removeColumn("canPreorderbilling")->update();
$this->table("WorkerPermission")->removeColumn("canPreorderbillingReadonly")->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
}