Files
thetool/db/migrations/20251012095453_poprackmodule_add_field_status.php
Daniel Spitzer 3d19e8c77b Pop Update
Features:
* Komplettes kabelmanagement auf Rack He Modul Basis
2025-10-12 12:12:18 +02:00

32 lines
827 B
PHP

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