fix: differential status can be nullable

This commit is contained in:
Maël Gangloff 2024-12-12 23:02:35 +01:00
parent 37740845e8
commit df780cfb39
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20241212214741 extends AbstractMigration
final class Version20241212220124 extends AbstractMigration
{
public function getDescription(): string
{
@ -21,7 +21,7 @@ final class Version20241212214741 extends AbstractMigration
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SEQUENCE domain_status_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE domain_status (id INT NOT NULL, domain_id VARCHAR(255) NOT NULL, date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, add_status TEXT NOT NULL, delete_status TEXT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE domain_status (id INT NOT NULL, domain_id VARCHAR(255) NOT NULL, date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, add_status TEXT DEFAULT NULL, delete_status TEXT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_146369D5115F0EE5 ON domain_status (domain_id)');
$this->addSql('COMMENT ON COLUMN domain_status.date IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('COMMENT ON COLUMN domain_status.add_status IS \'(DC2Type:simple_array)\'');

View File

@ -21,10 +21,10 @@ class DomainStatus
#[ORM\Column]
private ?\DateTimeImmutable $date = null;
#[ORM\Column(type: Types::SIMPLE_ARRAY)]
#[ORM\Column(type: Types::SIMPLE_ARRAY, nullable: true)]
private array $addStatus = [];
#[ORM\Column(type: Types::SIMPLE_ARRAY)]
#[ORM\Column(type: Types::SIMPLE_ARRAY, nullable: true)]
private array $deleteStatus = [];
public function __construct()