mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -05:00
Fix icons sql functions.
This commit is contained in:
parent
e1ff8aa11e
commit
4aa888f72d
1 changed files with 4 additions and 2 deletions
|
@ -15,7 +15,8 @@ returning *;
|
||||||
select *,
|
select *,
|
||||||
(select count(*) from icons where collection = ic.id) as num_icons
|
(select count(*) from icons where collection = ic.id) as num_icons
|
||||||
from icons_collections as ic
|
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
|
and ic.deleted_at is null
|
||||||
order by ic.created_at desc;
|
order by ic.created_at desc;
|
||||||
|
|
||||||
|
@ -27,7 +28,8 @@ update icons_collections
|
||||||
-- :name get-icons-by-collection :? :*
|
-- :name get-icons-by-collection :? :*
|
||||||
select *
|
select *
|
||||||
from icons as i
|
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.deleted_at is null
|
||||||
and i."collection" = :collection
|
and i."collection" = :collection
|
||||||
order by i.created_at desc;
|
order by i.created_at desc;
|
||||||
|
|
Loading…
Add table
Reference in a new issue