Rimo FCP import draft

This commit is contained in:
Frank Schubert
2025-03-26 14:07:14 +01:00
parent e3a6d494ef
commit 50d24faf9f
6 changed files with 1626 additions and 0 deletions
@@ -0,0 +1,44 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateRimoFcp extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
$table = $this->table("RimoFcp");
$table->addColumn("netzgebiet_id", "integer", ["null" => false]);
$table->addColumn("name", "string", ["null" => true, "default" => null, "limit" => 64]);
$table->addColumn("rimo_id", "string", ["null" => false]);
$table->addColumn("label", "string", ["null" => true, "default" => null, "limit" => 255]);
$table->addColumn("building_type", "string", ["null" => true, "default" => null, "limit" => 64]);
$table->addColumn("rimo_ex_state", "string", ["null" => true, "default" => null, "limit" => 64]);
$table->addColumn("rimo_op_state", "string", ["null" => true, "default" => null, "limit" => 64]);
$table->addColumn("gps_lat", "decimal", ["null" => true, "default" => null, "precision" => 17, "scale" => 14]);
$table->addColumn("gps_long", "decimal", ["null" => true, "default" => null, "precision" => 17, "scale" => 14]);
$table->addColumn("create", "integer", ["null" => false]);
$table->addColumn("edit", "integer", ["null" => false]);
$table->create();
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
$this->table("RimoFcp")->drop()->save();
}
}
}