Files
thetool/db/migrations/20240228130020_netzgebiet_add_options.php
T

32 lines
773 B
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class NetzgebietAddOptions extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
$table = $this->table("Netzgebiet");
$table->addColumn("options", "json", ["null" => true,"default" => null, "after" => "unit_create_oaid"]);
$table->update();
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
$this->table("Netzgebiet")->removeColumn("options")->save();
}
}
}