Plume/migrations/2018-09-07-212003_fix_avatar_deletion/down.sql
2018-09-07 23:01:53 +01:00

7 lines
223 B
SQL

-- 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;