26 lines
736 B
PHP
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();
|
|
}
|
|
}
|
|
}
|