Files
thetool/db/migrations/20250818180000_rmlworkorder_add_company_permission.php
2025-08-18 16:48:19 +00:00

26 lines
736 B
PHP

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