mirror of
https://github.com/penpot/penpot.git
synced 2025-05-31 06:06:12 +02:00
🎉 Convert libraries to file libraries
This commit is contained in:
parent
8c8b5887d6
commit
49c57be84a
23 changed files with 605 additions and 295 deletions
|
@ -0,0 +1,29 @@
|
|||
-- ALTER TABLE color_library
|
||||
-- DROP COLUMN team_id,
|
||||
-- DROP COLUMN name,
|
||||
-- ADD COLUMN file_id uuid NOT NULL REFERENCES file(id) ON DELETE CASCADE;
|
||||
--
|
||||
-- CREATE INDEX color_library__file_id__idx
|
||||
-- ON color_library(file_id);
|
||||
|
||||
TRUNCATE TABLE color;
|
||||
TRUNCATE TABLE color_library CASCADE;
|
||||
TRUNCATE TABLE image;
|
||||
TRUNCATE TABLE image_library CASCADE;
|
||||
TRUNCATE TABLE icon;
|
||||
TRUNCATE TABLE icon_library CASCADE;
|
||||
|
||||
ALTER TABLE color
|
||||
DROP COLUMN library_id,
|
||||
ADD COLUMN file_id uuid NOT NULL REFERENCES file(id) ON DELETE CASCADE;
|
||||
|
||||
CREATE INDEX color__file_id__idx
|
||||
ON color(file_id);
|
||||
|
||||
ALTER TABLE image
|
||||
DROP COLUMN library_id,
|
||||
ADD COLUMN file_id uuid NOT NULL REFERENCES file(id) ON DELETE CASCADE;
|
||||
|
||||
CREATE INDEX image__file_id__idx
|
||||
ON image(file_id);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue