feat: delete on cascade when a user is deleted

This commit is contained in:
Maël Gangloff
2024-08-07 00:27:04 +02:00
parent 342b3ff987
commit 3eaa7fa180
5 changed files with 62 additions and 19 deletions

View File

@@ -17,7 +17,7 @@ class WatchListTrigger
#[ORM\Id]
#[ORM\ManyToOne(targetEntity: WatchList::class, inversedBy: 'watchListTriggers')]
#[ORM\JoinColumn(referencedColumnName: 'token', nullable: false)]
#[ORM\JoinColumn(referencedColumnName: 'token', nullable: false, onDelete: 'CASCADE')]
private ?WatchList $watchList = null;
#[ORM\Id]