Importing and showing Rimo Building and Home Status
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class AdbAddRimoStatus extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
$hn = $this->table("Hausnummer");
|
||||
$hn->addColumn("rimo_ex_state", "string", ["null" => true, "default" => null, "limit" => 255, "after" => "rimo_id"]);
|
||||
$hn->addColumn("rimo_op_state", "string", ["null" => true, "default" => null, "limit" => 255, "after" => "rimo_ex_state"]);
|
||||
$hn->update();
|
||||
|
||||
$we = $this->table("Wohneinheit");
|
||||
$we->addColumn("rimo_ex_state", "string", ["null" => true, "default" => null, "limit" => 255, "after" => "nutzung"]);
|
||||
$we->addColumn("rimo_op_state", "string", ["null" => true, "default" => null, "limit" => 255, "after" => "rimo_ex_state"]);
|
||||
$we->update();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
$this->table("Wohneinheit")->removeColumn("rimo_status")->save();
|
||||
$this->table("Hausnummer")->removeColumn("rimo_status")->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user