Files
thetool/db/migrations/20240402170133_network_add_opsystem.php
2024-04-05 12:21:54 +02:00

32 lines
800 B
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class NetworkAddOpsystem extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Network");
$table->addColumn("opsystem", "enum", ["null" => true, "default" => null, "values" => "snopp", "after" => "adb_netzgebiet_id"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("Network")->removeColumn("opsystem")->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
}