This repository has been archived on 2026-11-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
thetool/db/migrations/20240119124212_add_can_statistics_permission.php
T

32 lines
809 B
PHP

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