feat: sync collectible star gifts
This commit is contained in:
parent
47fcf0ea41
commit
5ecf4e912d
64 changed files with 7559 additions and 403 deletions
15
deploy/migrations/0091_star_gift_prepaid_upgrade.up.sql
Normal file
15
deploy/migrations/0091_star_gift_prepaid_upgrade.up.sql
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
ALTER TABLE public.peer_star_gifts
|
||||
ADD COLUMN IF NOT EXISTS prepaid_upgrade_stars bigint DEFAULT 0 NOT NULL;
|
||||
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT 1 FROM pg_constraint
|
||||
WHERE conrelid = 'public.peer_star_gifts'::regclass
|
||||
AND conname = 'peer_star_gifts_prepaid_upgrade_check'
|
||||
) THEN
|
||||
ALTER TABLE public.peer_star_gifts
|
||||
ADD CONSTRAINT peer_star_gifts_prepaid_upgrade_check CHECK (prepaid_upgrade_stars >= 0);
|
||||
END IF;
|
||||
END;
|
||||
$$;
|
||||
Loading…
Add table
Add a link
Reference in a new issue