Files
thetool/db/migrations/20240409064828_fiber_plan_dispatcher.php
2024-04-16 15:14:36 +02:00

40 lines
1.4 KiB
PHP

<?php
use Phinx\Migration\AbstractMigration;
final class FiberPlanDispatcher extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("FiberPlanDispatcher", ["signed" => true]);
$table->addColumn("network_id", "integer", ["null" => false]);
$table->addColumn("object_type", "integer", ["null" => false]);
$table->addColumn("gps_lat", "decimal", ["null" => true, "precision" => 15, "scale" => 10]);
$table->addColumn("gps_long", "decimal", ["null" => true, "precision" => 15, "scale" => 10]);
$table->addColumn("description", "text", ["null" => false]);
$table->addColumn("type", "text", ["null" => true]);
$table->addColumn("comment", "text", ["null" => true]);
$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("FiberPlanDispatcher")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}