diff --git a/migrations/Version20241212214741.php b/migrations/Version20241212220124.php similarity index 90% rename from migrations/Version20241212214741.php rename to migrations/Version20241212220124.php index a5284a3..055ef75 100644 --- a/migrations/Version20241212214741.php +++ b/migrations/Version20241212220124.php @@ -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)\''); diff --git a/src/Entity/DomainStatus.php b/src/Entity/DomainStatus.php index e38702f..b9aa664 100644 --- a/src/Entity/DomainStatus.php +++ b/src/Entity/DomainStatus.php @@ -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()