Faserplanung
* Migrationsvorbereitung für Kabelplanung
This commit is contained in:
43
db/migrations/20240624123822_fiber_plan_cable.php
Normal file
43
db/migrations/20240624123822_fiber_plan_cable.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class FiberPlanCable extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("FiberPlanCable", ["signed" => true]);
|
||||
|
||||
$table->addColumn("description", "text", ["null" => false]);
|
||||
$table->addColumn("fibers", "integer", ["null" => false]);
|
||||
$table->addColumn("diameter", "integer", ["null" => false]);
|
||||
$table->addColumn("network_id", "integer", ["null" => true]);
|
||||
$table->addColumn("lenght", "integer", ["null" => true]);
|
||||
$table->addColumn("state", "integer", ["null" => true]);
|
||||
$table->addColumn("responsible", "integer", ["null" => true]);
|
||||
$table->addColumn("responsible_text", "text", ["null" => true]);
|
||||
$table->addColumn("address_id", "integer", ["null" => true]);
|
||||
$table->addColumn("comment", "text", ["null" => true]);
|
||||
$table->addColumn("edit_by", "integer", ["null" => false]);
|
||||
$table->addColumn("create_by", "integer", ["null" => false]);
|
||||
$table->addColumn("edit", "integer", ["null" => false]);
|
||||
$table->addColumn("create", "integer", ["null" => false]);
|
||||
$table->save();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$this->table("FiberPlanCable")->drop()->save();
|
||||
}
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
42
db/migrations/20240624123832_fiber_plan_cable_endpoint.php
Normal file
42
db/migrations/20240624123832_fiber_plan_cable_endpoint.php
Normal file
@@ -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") {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
37
db/migrations/20240624123851_fiber_plan_cable_pipe.php
Normal file
37
db/migrations/20240624123851_fiber_plan_cable_pipe.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class FiberPlanCablePipe extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("FiberPlanCablePipe", ["signed" => true]);
|
||||
$table->addColumn("fiberPlanCable_id", "integer", ["null" => false]);
|
||||
$table->addColumn("fiberPlanPipe_id", "integer", ["null" => false]);
|
||||
$table->addColumn("fiberPlanPipe_sub", "integer", ["null" => false]);
|
||||
$table->addColumn("sort", "integer", ["null" => false]);
|
||||
$table->addColumn("direction", "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("FiberPlanCablePipe")->drop()->save();
|
||||
}
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user