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