mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🎉 Add migration for remove on cascade action on file-media-object table
This commit is contained in:
@@ -241,6 +241,9 @@
|
||||
|
||||
{:name "0077-mod-comment-thread-table"
|
||||
:fn (mg/resource "app/migrations/sql/0077-mod-comment-thread-table.sql")}
|
||||
|
||||
{:name "0078-mod-file-media-object-table-drop-cascade"
|
||||
:fn (mg/resource "app/migrations/sql/0078-mod-file-media-object-table-drop-cascade.sql")}
|
||||
])
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
ALTER TABLE file_media_object
|
||||
DROP CONSTRAINT file_media_object_media_id_fkey,
|
||||
ADD CONSTRAINT file_media_object_media_id_fkey
|
||||
FOREIGN KEY (media_id) REFERENCES storage_object(id) ON DELETE NO ACTION DEFERRABLE;
|
||||
|
||||
ALTER TABLE file_media_object
|
||||
DROP CONSTRAINT file_media_object_thumbnail_id_fkey,
|
||||
ADD CONSTRAINT file_media_object_thumbnail_id_fkey
|
||||
FOREIGN KEY (thumbnail_id) REFERENCES storage_object(id) ON DELETE NO ACTION DEFERRABLE;
|
||||
Reference in New Issue
Block a user