31 lines
771 B
PHP
31 lines
771 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DoctrineMigrations;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
/**
|
|
* Hand-written rather than diffed: doctrine:migrations:diff omits the DEFAULT 0, which makes the
|
|
* ALTER fail on a table that already has rows.
|
|
*/
|
|
final class Version20260826153820 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return 'Add skip_formalities column to assignment table';
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
$this->addSql('ALTER TABLE assignment ADD skip_formalities TINYINT(1) NOT NULL DEFAULT 0');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->addSql('ALTER TABLE assignment DROP skip_formalities');
|
|
}
|
|
}
|