diff --git a/db/migrations/20251118185006_add_fiber_plan_fiber.php b/db/migrations/20251118185006_add_fiber_plan_fiber.php new file mode 100644 index 000000000..06be99ef4 --- /dev/null +++ b/db/migrations/20251118185006_add_fiber_plan_fiber.php @@ -0,0 +1,71 @@ +getEnvironment() == "thetool") { + $table = $this->table("FiberPlanFiber", ["signed" => true]); + $table->addColumn("cable_id", "integer", ["null" => true]); + $table->addColumn("sheet_range", "string", ['limit' => 255,"null" => true]); + $table->addColumn("cable_route", "string", ['limit' => 255,"null" => true]); + $table->addColumn("connector_nr", "string", ['limit' => 255,"null" => true]); + $table->addColumn("fiber_nr_cable", "integer", ["null" => true]); + $table->addColumn("bundle_nr", "string", ['limit' => 255,"null" => true]); + $table->addColumn("fiber_nr_bundle", "string", ['limit' => 255,"null" => true]); + $table->addColumn("fiber_color", "string", ['limit' => 255,"null" => true]); + $table->addColumn("fiber_color_hex", "string", ['limit' => 255,"null" => true]); + $table->addColumn("bundle_color", "string", ['limit' => 255,"null" => true]); + $table->addColumn("bundle_color_hex", "string", ['limit' => 255,"null" => true]); + $table->addColumn("branch_type", "string", ['limit' => 255,"null" => true]); + $table->addColumn("branch_cable_nr", "string", ['limit' => 255,"null" => true]); + $table->addColumn("branch_fiber_count", "string", ['limit' => 255,"null" => true]); + $table->addColumn("branch_fiber_nr", "string", ['limit' => 255,"null" => true]); + $table->addColumn("branch_bundle_nr", "string", ['limit' => 255,"null" => true]); + $table->addColumn("branch_fiber_in_bundle", "string", ['limit' => 255,"null" => true]); + $table->addColumn("branch_bundle_color", "string", ['limit' => 255,"null" => true]); + $table->addColumn("branch_bundle_color_hex", "string", ['limit' => 255,"null" => true]); + $table->addColumn("branch_from_location", "string", ['limit' => 255,"null" => true]); + $table->addColumn("branch_to_location", "string", ['limit' => 255,"null" => true]); + $table->addColumn("branch_gis_id", "string", ['limit' => 255,"null" => true]); + $table->addColumn("address", "text", ["null" => true]); + $table->addColumn("name", "string", ['limit' => 255,"null" => true]); + $table->addColumn("home_id", "string", ['limit' => 255,"null" => true]); + $table->addColumn("location", "string", ['limit' => 255,"null" => true]); + $table->addColumn("rack_unit", "string", ['limit' => 255,"null" => true]); + $table->addColumn("termination_type", "string", ['limit' => 255,"null" => true]); + $table->addColumn("customer_cable_type", "string", ['limit' => 255,"null" => true]); + $table->addColumn("customer_cable_fiber_nr", "string", ['limit' => 255,"null" => true]); + $table->addColumn("customer_connector_type", "string", ['limit' => 255,"null" => true]); + $table->addColumn("customer_cable_spec", "string", ['limit' => 255,"null" => true]); + $table->addColumn("customer_fiber_range", "string", ['limit' => 255,"null" => true]); + $table->addColumn("splitter_location", "string", ['limit' => 255,"null" => true]); + $table->addColumn("splitter_factor", "string", ['limit' => 255,"null" => true]); + $table->addColumn("uuid_qgis_kabel", "string", ['limit' => 255,"null" => true]); + $table->addColumn("status", "string", ['limit' => 255,"null" => true]); + $table->addColumn("comment", "text", ["null" => true]); + $table->addColumn("edit_by", "integer", ["null" => false]); + $table->addColumn("create_by", "integer", ["null" => false]); + $table->addColumn("create", "integer", ["null" => false]); + $table->addColumn("edit", "integer", ["null" => true]); + $table->save(); + } + + + if ($this->getEnvironment() == "addressdb") { + + } + } + + public function down(): void + { + if ($this->getEnvironment() == "thetool") { + $this->table("FiberPlanFiber")->drop()->save(); + } + if ($this->getEnvironment() == "addressdb") { + } + } +} +?> \ No newline at end of file diff --git a/db/migrations/20251118190335_add_fiber_plan_cable.php b/db/migrations/20251118190335_add_fiber_plan_cable.php new file mode 100644 index 000000000..1e5cf4186 --- /dev/null +++ b/db/migrations/20251118190335_add_fiber_plan_cable.php @@ -0,0 +1,64 @@ +getEnvironment() == "thetool") { + $this->table("FiberPlanCable")->drop()->save(); + $table = $this->table("FiberPlanCable", ["signed" => true]); + $table->addColumn("description", "text", ["null" => false]); + $table->addColumn("uuid", "string", [ 'limit' => 100,"null" => true]); + $table->addColumn("fibers", "integer", ["null" => true]); + $table->addColumn("diameter", "integer", ["null" => true]); + $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", "string", ['limit' => 100,"null" => true]); + $table->addColumn("address_id", "integer", ["null" => true]); + $table->addColumn("parent_cable_id", "integer", ["null" => true]); + $table->addColumn("is_branch_cable", "integer", ["null" => true, "default" => "0"]); + $table->addColumn("branch_from_location", "text", ["null" => true]); + $table->addColumn("branch_to_location", "text", ["null" => true]); + $table->addColumn("coordinates", "text", ["null" => true]); + $table->addColumn("cable_type", "text", ["null" => true]); + $table->addColumn("level", "text", ["null" => true]); + $table->addColumn("connected_fcp", "text", ["null" => true]); + $table->addColumn("used_fiber", "integer", ["null" => true]); + $table->addColumn("status", "text", ["null" => true]); + $table->addColumn("length_m", "text", ["null" => true]); + $table->addColumn("offset", "text", ["null" => true]); + $table->addColumn("source", "text", ["null" => true]); + $table->addColumn("overlength", "text", ["null" => true]); + $table->addColumn("otdr", "text", ["null" => true]); + $table->addColumn("tube_number", "text", ["null" => true]); + $table->addColumn("total_overlength", "text", ["null" => true]); + $table->addColumn("length_with_overlength", "text", ["null" => true]); + $table->addColumn("zis_unfinanced", "text", ["null" => true]); + $table->addColumn("zis_financed", "text", ["null" => true]); + $table->addColumn("comment", "text", ["null" => true]); + $table->addColumn("edit_by", "integer", ["null" => true]); + $table->addColumn("create_by", "integer", ["null" => true]); + $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") { + } + } +} +?> \ No newline at end of file diff --git a/db/migrations/20251130143459_add_fiber_plan_cable_station.php b/db/migrations/20251130143459_add_fiber_plan_cable_station.php new file mode 100644 index 000000000..9e0e94212 --- /dev/null +++ b/db/migrations/20251130143459_add_fiber_plan_cable_station.php @@ -0,0 +1,37 @@ +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") { + } + } +} +?> \ No newline at end of file diff --git a/db/migrations/20251130174326_add_fiber_plan_address.php b/db/migrations/20251130174326_add_fiber_plan_address.php new file mode 100644 index 000000000..70e53c036 --- /dev/null +++ b/db/migrations/20251130174326_add_fiber_plan_address.php @@ -0,0 +1,63 @@ +getEnvironment() == "thetool") { + $table = $this->table("FiberPlanAddress", ["signed" => true]); + $table->addColumn("network_id", "integer", ["null" => false, "default" => 90]); + $table->addColumn("address", "string", ["limit" => 255, "null" => true]); + $table->addColumn("ne", "integer", ["null" => true]); + $table->addColumn("status", "string", ["limit" => 50, "null" => true]); + $table->addColumn("branch_color", "string", ["limit" => 50, "null" => true]); + $table->addColumn("branch_tube", "string", ["limit" => 50, "null" => true]); + $table->addColumn("uuid", "string", ["limit" => 100, "null" => true]); + $table->addColumn("connection_id", "string", ["limit" => 50, "null" => true]); + $table->addColumn("district", "string", ["limit" => 50, "null" => true]); + $table->addColumn("tt_object_id", "string", ["limit" => 100, "null" => true]); + $table->addColumn("name", "string", ["limit" => 255, "null" => true]); + $table->addColumn("phone", "string", ["limit" => 100, "null" => true]); + $table->addColumn("comment", "text", ["null" => true]); + $table->addColumn("funding", "string", ["limit" => 100, "null" => true]); + $table->addColumn("branch_color2", "string", ["limit" => 50, "null" => true]); + $table->addColumn("x_gkm34", "string", ["limit" => 50, "null" => true]); + $table->addColumn("y_gkm34", "string", ["limit" => 50, "null" => true]); + $table->addColumn("gps_long", "decimal", ["precision" => 11, "scale" => 8, "null" => true]); + $table->addColumn("gps_lat", "decimal", ["precision" => 10, "scale" => 8, "null" => true]); + $table->addColumn("tt_status", "string", ["limit" => 50, "null" => true]); + $table->addColumn("ffg_plan", "string", ["limit" => 100, "null" => true]); + $table->addColumn("ffg_plan_tg1", "string", ["limit" => 100, "null" => true]); + $table->addColumn("ffg_plan_tg2", "string", ["limit" => 100, "null" => true]); + $table->addColumn("ffg_plan_tg3", "string", ["limit" => 100, "null" => true]); + $table->addColumn("construction_2025", "string", ["limit" => 100, "null" => true]); + $table->addColumn("contract", "string", ["limit" => 100, "null" => true]); + $table->addColumn("construction_approval", "string", ["limit" => 100, "null" => true]); + $table->addColumn("created", "integer", ["null" => false]); + $table->addColumn("created_by", "integer", ["null" => false]); + $table->addColumn("edit", "integer", ["null" => true]); + $table->addColumn("edit_by", "integer", ["null" => true]); + $table->save(); + } + + if ($this->getEnvironment() == "addressdb") { + + + } + } + + public function down(): void + { + + if ($this->getEnvironment() == "thetool") { + $this->table("FiberPlanAddress")->drop()->save(); + } + + if ($this->getEnvironment() == "addressdb") { + } + } +} + +?> \ No newline at end of file