27 lines
781 B
PHP
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`;
|