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

@@ -44,7 +44,7 @@ class Connector
private ?string $id;
#[ORM\ManyToOne(inversedBy: 'connectors')]
#[ORM\JoinColumn(nullable: false)]
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
public ?User $user = null;
#[Groups(['connector:list', 'connector:create', 'watchlist:list'])]