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

Fix icons sql functions.

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

View file

@ -15,7 +15,8 @@ returning *;
select *,
(select count(*) from icons where collection = ic.id) as num_icons
from icons_collections as ic
where ic."user" = :user
where (ic."user" = :user or
ic."user" = '00000000-0000-0000-0000-000000000000'::uuid)
and ic.deleted_at is null
order by ic.created_at desc;
@ -27,7 +28,8 @@ update icons_collections
-- :name get-icons-by-collection :? :*
select *
from icons as i
where i."user" = :user
where (i."user" = :user or
i."user" = '00000000-0000-0000-0000-000000000000'::uuid)
and i.deleted_at is null
and i."collection" = :collection
order by i.created_at desc;