ADB: Added stiege as part of Hausnummer

This commit is contained in:
Frank Schubert
2024-05-16 15:47:41 +02:00
parent 58ffea17a4
commit 29459e9cca
13 changed files with 111 additions and 36 deletions
@@ -0,0 +1,31 @@
<?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();
}
}
}