Files
thetool/db/migrations/20250109143713_construction_consent_owner_rename_cols.php
2025-01-10 12:35:25 +01:00

39 lines
1.0 KiB
PHP

<?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") {
}
}
}