35 lines
1.3 KiB
PHP
35 lines
1.3 KiB
PHP
<?php /** @noinspection ALL */
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class WorkerPermissionAddcanWarehouse extends AbstractMigration {
|
|
public function up(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$table = $this->table("WorkerPermission");
|
|
$table->addColumn("canWarehouseAdmin", "enum", ["null" => false, "values" => 'false,true', "default" => "false", "after" => "canSuperexpert"]);
|
|
$table->addColumn("canWarehouseUser", "enum", ["null" => false, "values" => 'false,true', "default" => "false", "after" => "canSuperexpert"]);
|
|
$table->addColumn("canWarehouseEShop", "enum", ["null" => false, "values" => 'false,true', "default" => "false", "after" => "canSuperexpert"]);
|
|
$table->update();
|
|
}
|
|
|
|
if ($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
|
|
public function down(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$table = $this->table("WorkerPermission");
|
|
$table->removeColumn("canWarehouseAdmin");
|
|
$table->removeColumn("canWarehouseUser");
|
|
$table->removeColumn("canWarehouseEShop");
|
|
$table->save();
|
|
}
|
|
|
|
if ($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
}
|