Pop Update

Features:
* Komplettes kabelmanagement auf Rack He Modul Basis
This commit is contained in:
Daniel Spitzer
2025-10-12 12:10:37 +02:00
parent 6543e0b79b
commit 0b545ef62a
5 changed files with 77 additions and 5 deletions
@@ -0,0 +1,31 @@
<?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' => 'front', "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") {
}
}
}
@@ -0,0 +1,41 @@
<?php
use Phinx\Migration\AbstractMigration;
final class Poprackmodulecable extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("Poprackmodulecable", ["signed" => true]);
$table->addColumn("poprackmodule_id", "integer", ["null" => false]);
$table->addColumn("cable_name", "", ["null" => false]);
$table->addColumn("port_start", "integer", ["null" => false]);
$table->addColumn("port_end", "integer", ["null" => false]);
$table->addColumn("fiber_start", "integer", ["null" => true]);
$table->addColumn("fiber_end", "integer", ["null" => true]);
$table->addColumn("description", "text", ["null" => true]);
$table->addColumn("create_by", "integer", ["null" => false]);
$table->addColumn("edit_by", "integer", ["null" => false]);
$table->addColumn("create", "integer", ["null" => false]);
$table->addColumn("edit", "integer", ["null" => false]);
$table->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("Poprackmodulecable")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}
?>