mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2025-04-13 15:24:10 +00:00
parent
47be1541a7
commit
a7b34173dd
2 changed files with 14 additions and 0 deletions
|
@ -0,0 +1,7 @@
|
|||
-- This file should undo anything in `up.sql`
|
||||
ALTER TABLE users
|
||||
DROP CONSTRAINT users_avatar_id_fkey,
|
||||
ADD CONSTRAINT users_avatar_id_fkey
|
||||
FOREIGN KEY (avatar_id)
|
||||
REFERENCES medias(id)
|
||||
ON DELETE CASCADE;
|
7
migrations/2018-09-07-212003_fix_avatar_deletion/up.sql
Normal file
7
migrations/2018-09-07-212003_fix_avatar_deletion/up.sql
Normal file
|
@ -0,0 +1,7 @@
|
|||
-- Your SQL goes here
|
||||
ALTER TABLE users
|
||||
DROP CONSTRAINT users_avatar_id_fkey,
|
||||
ADD CONSTRAINT users_avatar_id_fkey
|
||||
FOREIGN KEY (avatar_id)
|
||||
REFERENCES medias(id)
|
||||
ON DELETE SET NULL;
|
Loading…
Reference in a new issue