WIP 2025-01-09 ConstructionConsent

This commit is contained in:
Frank Schubert
2025-01-10 12:35:25 +01:00
parent aa0b36715b
commit 5f752da41f
8 changed files with 403 additions and 21 deletions
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class ConstructionConsentTerminationIdNull extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$cc = $this->table("ConstructionConsent");
$cc->changeColumn("termination_id", "integer", ["null" => true, "default" => null]);
$cc->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
}
}
}
@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class ConstructionConsentOwnerRenameCols extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$cco = $this->table("ConstructionConsentOwner");
$cco->renameColumn("owner_name", "name");
$cco->renameColumn("owner_street", "street");
$cco->renameColumn("owner_zip", "zip");
$cco->renameColumn("owner_city", "city");
$cco->renameColumn("owner_country", "country");
$cco->renameColumn("owner_phone", "phone");
$cco->renameColumn("owner_fax", "fax");
$cco->renameColumn("owner_email", "email");
$cco->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
}
if($this->getEnvironment() == "addressdb") {
}
}
}