mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 00:06:38 +02:00
Add support for icon collection importation.
This commit is contained in:
parent
8ec32ad130
commit
c0aa4a042f
3 changed files with 33 additions and 31 deletions
|
@ -22,6 +22,11 @@ values (:id, '00000000-0000-0000-0000-000000000000'::uuid, :name)
|
|||
do update set name = :name
|
||||
returning *;
|
||||
|
||||
-- :name get-image
|
||||
select * from images as i
|
||||
where i.id = :id
|
||||
and i."user" = '00000000-0000-0000-0000-000000000000'::uuid;
|
||||
|
||||
-- :name create-icons-collection
|
||||
insert into icons_collections (id, "user", name)
|
||||
values (:id, '00000000-0000-0000-0000-000000000000'::uuid, :name)
|
||||
|
@ -29,11 +34,6 @@ values (:id, '00000000-0000-0000-0000-000000000000'::uuid, :name)
|
|||
do update set name = :name
|
||||
returning *;
|
||||
|
||||
-- :name get-image
|
||||
select * from images as i
|
||||
where i.id = :id
|
||||
and i."user" = '00000000-0000-0000-0000-000000000000'::uuid;
|
||||
|
||||
-- :name get-icon
|
||||
select * from icons as i
|
||||
where i.id = :id
|
||||
|
@ -41,12 +41,13 @@ select * from icons as i
|
|||
|
||||
-- :name create-icon :<! :1
|
||||
insert into icons ("user", name, collection, metadata, content)
|
||||
values (:user, :name, :collection, :metadata, :content)
|
||||
values ('00000000-0000-0000-0000-000000000000'::uuid,
|
||||
:name, :collection, :metadata, :content)
|
||||
on conflict (id)
|
||||
do update set name = :name,
|
||||
content = :content,
|
||||
metadata = :metadata,
|
||||
collection = :collection
|
||||
collection = :collection,
|
||||
"user" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
returning *;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue