Faserplanung

* Migrationsvorbereitung für Kabelplanung
This commit is contained in:
Daniel Spitzer
2024-06-24 15:07:45 +02:00
parent 09a6651f0e
commit 9904bb9f50
3 changed files with 122 additions and 0 deletions
@@ -0,0 +1,42 @@
<?php
use Phinx\Migration\AbstractMigration;
final class FiberPlanCableEndpoint extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("FiberPlanCableEndpoint", ["signed" => true]);
$table->addColumn("fiberPlanCable_id", "integer", ["null" => false]);
$table->addColumn("fiberPlanPipeEndpoint_id", "integer", ["null" => false]);
$table->addColumn("poprack_id", "integer", ["null" => true]);
$table->addColumn("poprackmodule_id", "integer", ["null" => true]);
$table->addColumn("fiberPlanDispatchersleeve_id", "integer", ["null" => true]);
$table->addColumn("startport", "integer", ["null" => false]);
$table->addColumn("endport", "integer", ["null" => false]);
$table->addColumn("dropout", "integer", ["null" => false, "default" => "0"]);
$table->addColumn("sort", "integer", ["null" => false]);
$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("FiberPlanCableEndpoint")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}
?>