Faserplanung

* Migrations für Kabeln/Fasern/Kabelstationen/Homes
This commit is contained in:
Daniel Spitzer
2025-11-30 19:01:56 +01:00
parent 515063a03b
commit b1f9e4bdcb
4 changed files with 235 additions and 0 deletions
@@ -0,0 +1,37 @@
<?php
use Phinx\Migration\AbstractMigration;
final class AddFiberPlanCableStation extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("FiberPlanCableStation", ["signed" => true]);
$table->addColumn("cable_id", "integer", ["null" => false]);
$table->addColumn("station_order", "integer", ["null" => false,'comment' => 'Reihenfolge der Station im Kabelverlauf (1, 2, 3...)']);
$table->addColumn("station_type", "enum", ['values' => ['pop', 'dispatcher'],"null" => false,'comment' => 'Typ: pop oder dispatcher']);
$table->addColumn("station_id", "integer", ["null" => false,'comment' => 'ID des Pop oder Dispatcher']);
$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("FiberPlanCableStation")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}
?>