Allow for media cover deletion (#387)
* Allow for media cover deletion Fix #356 * Fix sqlite migrations
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
|
||||
ALTER TABLE posts DROP CONSTRAINT posts_cover_id_fkey;
|
||||
ALTER TABLE posts ADD CONSTRAINT posts_cover_id_fkey FOREIGN KEY (cover_id) REFERENCES medias(id);
|
||||
@@ -0,0 +1,4 @@
|
||||
-- Your SQL goes here
|
||||
|
||||
ALTER TABLE posts DROP CONSTRAINT posts_cover_id_fkey;
|
||||
ALTER TABLE posts ADD CONSTRAINT posts_cover_id_fkey FOREIGN KEY (cover_id) REFERENCES medias(id) ON DELETE SET NULL;
|
||||
Reference in New Issue
Block a user