From 637f0df9760b50b56c8ffb200719907032fdd885 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 10 May 2019 16:49:19 +0200 Subject: Cascade delete on oauth2 table when deleting a user --- src/Wallabag/ApiBundle/Entity/AuthCode.php | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Wallabag/ApiBundle/Entity/AuthCode.php') diff --git a/src/Wallabag/ApiBundle/Entity/AuthCode.php b/src/Wallabag/ApiBundle/Entity/AuthCode.php index 5fa205ac..7c9c8539 100644 --- a/src/Wallabag/ApiBundle/Entity/AuthCode.php +++ b/src/Wallabag/ApiBundle/Entity/AuthCode.php @@ -42,6 +42,7 @@ class AuthCode extends BaseAuthCode /** * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User") + * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE") */ protected $user; } -- cgit v1.2.3