Files
thetool/db/migrations/20250515135500_constr_cons_owner_add_signature.php
2025-05-16 21:58:47 +02:00

32 lines
1.1 KiB
PHP

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