Files
thetool/db/migrations/20240516114029_adb_hausnummer_add_stiege.php
2024-05-16 15:47:41 +02:00

32 lines
778 B
PHP

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