Remove not null constraint in db on updatedat property for notification

This commit is contained in:
2025-05-28 14:54:25 +02:00
parent 27a2d8fdc8
commit f282ffbfd4
2 changed files with 33 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace Chill\Migrations\Main;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20250528124812 extends AbstractMigration
{
public function getDescription(): string
{
return 'Drop NOT NULL constraint for create and update properties on notification entity';
}
public function up(Schema $schema): void
{
$this->addSql(<<<'SQL'
ALTER TABLE chill_main_notification ALTER updatedat DROP NOT NULL
SQL);
}
public function down(Schema $schema): void
{
$this->addSql(<<<'SQL'
ALTER TABLE chill_main_notification ALTER updatedAt SET NOT NULL
SQL);
}
}