Files
thetool/db/migrations/20250520132000_constr_cons_owner_add_company.php
2025-06-12 12:56:47 +02:00

27 lines
783 B
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class ConstrConsOwnerAddCompany extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$ConstructionConsentOwner = $this->table("ConstructionConsentOwner");
$ConstructionConsentOwner->addColumn("company", "string", ["limit" => 255, "null" => true]);
$ConstructionConsentOwner->update();
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$ConstructionConsentOwner = $this->table("ConstructionConsentOwner");
$ConstructionConsentOwner->removeColumn("company");
$ConstructionConsentOwner->update();
}
}
}