Merge branch 'fronkdev' into 'master'

Added rimo_deleted field to Wohneinheit

See merge request fronk/thetool!1352
This commit is contained in:
Frank Schubert
2025-05-16 19:59:47 +00:00
2 changed files with 34 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ final class ConstrConsOwnerAddSignature extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "addressdb") {
if($this->getEnvironment() == "thetool") {
$ConstructionConsentOwner = $this->table("ConstructionConsentOwner");
$ConstructionConsentOwner->addColumn("signature", "text", ["null" => true]);
$ConstructionConsentOwner->addColumn("signature_name", "string", ["limit" => 255, "null" => true]);
@@ -19,7 +19,7 @@ final class ConstrConsOwnerAddSignature extends AbstractMigration
public function down(): void
{
if($this->getEnvironment() == "addressdb") {
if($this->getEnvironment() == "thetool") {
$ConstructionConsentOwner = $this->table("ConstructionConsentOwner");
$ConstructionConsentOwner->removeColumn("signature");
$ConstructionConsentOwner->removeColumn("signature_name");
@@ -28,4 +28,4 @@ final class ConstrConsOwnerAddSignature extends AbstractMigration
$ConstructionConsentOwner->update();
}
}
}
}

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AdbWohneinheitAddRimoDeleted extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
$table = $this->table('Wohneinheit');
$table->addColumn("rimo_deleted", "integer", ["null" => false, "default" => 0, "length" => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY, "after" => "rimo_op_state"]);
$table->update();
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
$this->table('Wohneinheit')->removeColumn("rimo_deleted")->save();
}
}
}