fix: sync star gift profile pin order
Sync telesrv 6fcc6f0 (fix(stargifts): honor profile pin order). Skipped telesrv docs changes per public sync rules.
This commit is contained in:
parent
14bf7d1e20
commit
f88aa16a49
9 changed files with 263 additions and 24 deletions
|
|
@ -0,0 +1,2 @@
|
|||
DROP INDEX IF EXISTS public.peer_star_gifts_owner_profile_order_idx;
|
||||
DROP INDEX IF EXISTS public.peer_star_gifts_owner_pinned_order_uniq;
|
||||
13
deploy/migrations/0106_star_gift_profile_pin_order.up.sql
Normal file
13
deploy/migrations/0106_star_gift_profile_pin_order.up.sql
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
CREATE UNIQUE INDEX peer_star_gifts_owner_pinned_order_uniq
|
||||
ON public.peer_star_gifts(owner_peer_type, owner_peer_id, pinned_order)
|
||||
WHERE pinned_order > 0;
|
||||
|
||||
CREATE INDEX peer_star_gifts_owner_profile_order_idx
|
||||
ON public.peer_star_gifts(
|
||||
owner_peer_type,
|
||||
owner_peer_id,
|
||||
(pinned_order = 0),
|
||||
pinned_order,
|
||||
id DESC
|
||||
)
|
||||
WHERE lifecycle_status = 'active';
|
||||
Loading…
Add table
Add a link
Reference in a new issue