Files
thetool/db/migrations/20240624123822_fiber_plan_cable.php
Daniel Spitzer 1554d6cf72 Faserplanung Vorbereitung für Kabelverschaltung
* Menüpunkt Kabelverschaltung hinzugefügt
 * Initialfiles für Kabelverschaltung
2024-06-30 12:01:56 +02:00

42 lines
1.6 KiB
PHP

<?php
use Phinx\Migration\AbstractMigration;
final class FiberPlanCable extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("FiberPlanCable", ["signed" => true]);
$table->addColumn("description", "text", ["null" => false]);
$table->addColumn("fibers", "integer", ["null" => false]);
$table->addColumn("diameter", "integer", ["null" => false]);
$table->addColumn("network_id", "integer", ["null" => true]);
$table->addColumn("lenght", "integer", ["null" => true]);
$table->addColumn("state", "integer", ["null" => true]);
$table->addColumn("responsible", "integer", ["null" => true]);
$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("FiberPlanCable")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}
?>