44 lines
1.7 KiB
PHP
44 lines
1.7 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class FiberPlanPipeCreate extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$table = $this->table("FiberPlanPipe", ["signed" => true]);
|
|
$table->addColumn("description", "text", ["null" => false]);
|
|
$table->addColumn("gisid", "text", ["null" => true]);
|
|
$table->addColumn("type", "integer", ["null" => false]);
|
|
$table->addColumn("type_description", "integer", ["null" => true]);
|
|
$table->addColumn("fiberPlanPipeTemplate_id", "integer", ["null" => true]);
|
|
$table->addColumn("length", "integer", ["null" => false]);
|
|
$table->addColumn("status", "integer", ["null" => false]);
|
|
$table->addColumn("responsible", "integer", ["null" => false]);
|
|
$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("FiberPlanPipe")->drop()->save();
|
|
}
|
|
if ($this->getEnvironment() == "addressdb") {
|
|
}
|
|
}
|
|
}
|