Finished Preorder statistics / added statistics permission

This commit is contained in:
Frank Schubert
2024-01-20 09:17:26 +01:00
parent 791465c9a4
commit a90de85ddf
7 changed files with 114 additions and 68 deletions
@@ -0,0 +1,31 @@
<?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") {
}
}
}