Files
thetool/db/migrations/20250618144401_constr_consent_add_deferred.php
2025-06-18 14:51:51 +02:00

27 lines
781 B
PHP

<?php /** @noinspection ALL */
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class ConstrConsentAddDeferred extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table('ConstructionConsent');
$table->addColumn('deferred', 'boolean', ['null' => true, 'default' => false])
->save();
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table('ConstructionConsent');
$table->removeColumn('deferred')
->save();
}
}
}
// ALTER TABLE `ConstructionConsent` ADD COLUMN `deferred` BOOLEAN NULL DEFAULT FALSE AFTER `text`;