0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

Add missing :id column handling on collimp sql functions.

This commit is contained in:
Andrey Antukh 2016-11-21 18:54:49 +01:00
parent b086d12760
commit e1ff8aa11e
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -5,9 +5,9 @@ select *
and cc."user" = '00000000-0000-0000-0000-000000000000'::uuid; and cc."user" = '00000000-0000-0000-0000-000000000000'::uuid;
-- :name create-image :<! :1 -- :name create-image :<! :1
insert into images ("user", name, collection, path, width, height, mimetype) insert into images ("user", id, name, collection, path, width, height, mimetype)
values ('00000000-0000-0000-0000-000000000000'::uuid, :name, :collection, values ('00000000-0000-0000-0000-000000000000'::uuid,
:path, :width, :height, :mimetype) :id, :name, :collection, :path, :width, :height, :mimetype)
returning *; returning *;
-- :name delete-image :! :n -- :name delete-image :! :n
@ -40,9 +40,9 @@ select * from icons as i
and i."user" = '00000000-0000-0000-0000-000000000000'::uuid; and i."user" = '00000000-0000-0000-0000-000000000000'::uuid;
-- :name create-icon :<! :1 -- :name create-icon :<! :1
insert into icons ("user", name, collection, metadata, content) insert into icons ("user", id, name, collection, metadata, content)
values ('00000000-0000-0000-0000-000000000000'::uuid, values ('00000000-0000-0000-0000-000000000000'::uuid,
:name, :collection, :metadata, :content) :id, :name, :collection, :metadata, :content)
on conflict (id) on conflict (id)
do update set name = :name, do update set name = :name,
content = :content, content = :content,