Added fibu account numbers to Address; new permission fibu + employee

This commit is contained in:
Frank Schubert
2023-12-14 17:45:20 +01:00
parent 7c96f73355
commit 194ed0da1d
15 changed files with 517 additions and 50 deletions
@@ -0,0 +1,35 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class WorkerPermissionAddEmployee extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("WorkerPermission");
$table->addColumn("employee", "enum", ["values" => 'false,true', "default" => "false", "after" => "admin"]);
$table->addColumn("canFibu", "enum", ["values" => 'false,true', "default" => "false", "after" => "preorderlogistics"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("WorkerPermission");
$table->removeColumn("canFibu");
$table->removeColumn("employee");
$table->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}