0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-12 18:18:24 -05:00

🐛 Fix initial data loading issues.

This commit is contained in:
Andrey Antukh 2021-03-08 22:31:14 +01:00
parent f0eaf9aa20
commit 708ba3d7ac
3 changed files with 9 additions and 0 deletions

View file

@ -163,6 +163,9 @@
{:name "0050-mod-server-prop-table"
:fn (mg/resource "app/migrations/sql/0050-mod-server-prop-table.sql")}
{:name "0051-mod-file-library-rel-table"
:fn (mg/resource "app/migrations/sql/0051-mod-file-library-rel-table.sql")}
])

View file

@ -0,0 +1,4 @@
ALTER TABLE file_library_rel
DROP CONSTRAINT file_library_rel_library_file_id_fkey,
ADD CONSTRAINT file_library_rel_library_file_id_fkey
FOREIGN KEY (library_file_id) REFERENCES file(id) ON DELETE CASCADE DEFERRABLE;

View file

@ -77,6 +77,8 @@
:team-id (:default-team-id profile)
:name (:project-name data)}]
(db/exec-one! conn ["SET CONSTRAINTS ALL DEFERRED"])
(create-project conn project)
(create-project-role conn {:project-id (:id project)
:profile-id (:id profile)