feat: use JSONB instead of SIMPLE_ARRAY

This commit is contained in:
Maël Gangloff
2025-10-16 22:21:08 +02:00
parent a143039925
commit 64fe0c895b
8 changed files with 213 additions and 9 deletions

View File

@@ -89,7 +89,7 @@ class Domain
#[SerializedName('entities')]
private Collection $domainEntities;
#[ORM\Column(type: Types::SIMPLE_ARRAY, nullable: true)]
#[ORM\Column(type: Types::JSON, nullable: true)]
#[Groups(['domain:item', 'domain:list', 'watchlist:item', 'watchlist:list'])]
private array $status = [];

View File

@@ -23,7 +23,7 @@ class DomainEntity
#[Groups(['domain-entity:entity'])]
private ?Entity $entity = null;
#[ORM\Column(type: Types::SIMPLE_ARRAY)]
#[ORM\Column(type: Types::JSON)]
#[Groups(['domain-entity:entity', 'domain-entity:domain'])]
private array $roles = [];

View File

@@ -27,11 +27,11 @@ class DomainStatus
#[Groups(['domain:item'])]
private \DateTimeImmutable $date;
#[ORM\Column(type: Types::SIMPLE_ARRAY, nullable: true)]
#[ORM\Column(type: Types::JSON, nullable: true)]
#[Groups(['domain:item'])]
private array $addStatus = [];
#[ORM\Column(type: Types::SIMPLE_ARRAY, nullable: true)]
#[ORM\Column(type: Types::JSON, nullable: true)]
#[Groups(['domain:item'])]
private array $deleteStatus = [];

View File

@@ -23,11 +23,11 @@ class NameserverEntity
#[Groups(['nameserver-entity:entity'])]
private ?Entity $entity = null;
#[ORM\Column(type: Types::SIMPLE_ARRAY)]
#[ORM\Column(type: Types::JSON)]
#[Groups(['nameserver-entity:entity', 'nameserver-entity:nameserver'])]
private array $roles = [];
#[ORM\Column(type: Types::SIMPLE_ARRAY)]
#[ORM\Column(type: Types::JSON)]
#[Groups(['nameserver-entity:entity', 'nameserver-entity:nameserver'])]
private array $status = [];

View File

@@ -180,7 +180,7 @@ class WatchList
private ?\DateTimeImmutable $createdAt = null;
#[SerializedName('dsn')]
#[ORM\Column(type: Types::SIMPLE_ARRAY, nullable: true)]
#[ORM\Column(type: Types::JSON, nullable: true)]
#[Groups(['watchlist:list', 'watchlist:item', 'watchlist:create', 'watchlist:update'])]
#[Assert\Unique]
#[Assert\All([