Files
thetool/db/migrations/20251012100137_poprackmodulecable.php
Daniel Spitzer e17e638263 Pop Update
Features:
* Komplettes kabelmanagement auf Rack He Modul Basis
2025-10-12 12:13:42 +02:00

41 lines
1.4 KiB
PHP

<?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", "text", ["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") {
}
}
}
?>