63 lines
3.2 KiB
PHP
63 lines
3.2 KiB
PHP
<?php
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class AddFiberPlanAddress extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if ($this->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") {
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|