Merge branch 'fronkdev' into 'master'
Added script to delete OAIDs incl. all linked data from Preorders See merge request fronk/thetool!652
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class NetzgebietAddUnitcountSdMd extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
$table = $this->table("Netzgebiet");
|
||||
$table->addColumn("unit_count_sd", "integer", ["null" => false, "default" => 0, "comment" => "single-dwelling", "after" => "unit_count"]);
|
||||
$table->addColumn("unit_count_md", "integer", ["null" => false, "default" => 0, "comment" => "multi-dwelling", "after" => "unit_count_sd"]);
|
||||
$table->update();
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
$this->table("Netzgebiet")
|
||||
->removeColumn("unit_count_md")
|
||||
->removeColumn("unit_count_sd")
|
||||
->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user