Added RML Import & subcd

This commit is contained in:
Frank Schubert
2024-02-05 12:39:40 +01:00
parent 4e278e6c61
commit f25170e398
15 changed files with 465 additions and 210 deletions
@@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class HausnummerAddSubcd extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
$table = $this->table("Hausnummer");
$table->addColumn("subcd", "integer", ["null" => true, "default" => null, "after" => "adrcd"]);
$table->addIndex(["adrcd", "subcd"]);
$table->update();
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
$table = $this->table("Hausnummer");
$table->removeIndex(["adrcd", "subcd"]);
$table("Hausnummer")->removeColumn("subcd");
}
}
}