Added queries to AddStatusAdbType migration to set type

This commit is contained in:
Frank Schubert
2024-12-06 18:30:49 +01:00
parent 0ad4d8dd29
commit b30725f0b6

View File

@@ -15,6 +15,22 @@ final class AdbStatusAddType extends AbstractMigration
$table = $this->table("Status");
$table->addColumn("type", "enum", ["null" => true, "default" => null, "values" => "hausnummer,wohneinheit", "after" => "name"]);
$table->update();
$this->query("UPDATE Status SET type = 'hausnummer' WHERE code=110");
$this->query("UPDATE Status SET type = 'hausnummer' WHERE code=120");
$this->query("UPDATE Status SET type = 'hausnummer' WHERE code=130");
$this->query("UPDATE Status SET type = 'hausnummer' WHERE code=140");
$this->query("UPDATE Status SET type = 'hausnummer' WHERE code=145");
$this->query("UPDATE Status SET type = 'hausnummer' WHERE code=200");
$this->query("UPDATE Status SET type = 'hausnummer' WHERE code=210");
$this->query("UPDATE Status SET type = 'hausnummer' WHERE code=220");
$this->query("UPDATE Status SET type = 'hausnummer' WHERE code=230");
$this->query("UPDATE Status SET type = 'hausnummer' WHERE code=235");
$this->query("UPDATE Status SET type = 'hausnummer' WHERE code=240");
$this->query("UPDATE Status SET type = 'wohneinheit' WHERE code=241");
$this->query("UPDATE Status SET type = 'hausnummer' WHERE code=242");
$this->query("UPDATE Status SET type = 'wohneinheit' WHERE code=245");
$this->query("UPDATE Status SET type = 'wohneinheit' WHERE code=300");
}
}