mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-28 06:59:42 +00:00
core: redeem badge codes (#7438)
This commit is contained in:
@@ -251,7 +251,7 @@ CREATE TABLE badge_code_redemptions(
|
||||
purchase_priv_key BYTEA NOT NULL,
|
||||
master_key BYTEA NOT NULL,
|
||||
created_at TIMESTAMPTZ NOT NULL,
|
||||
UNIQUE(code)
|
||||
UNIQUE(user_id, code)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_badge_code_redemptions_user ON badge_code_redemptions(user_id);
|
||||
|
||||
@@ -1763,12 +1763,12 @@ ALTER TABLE test_chat_schema.xftp_file_descriptions ALTER COLUMN file_descr_id A
|
||||
|
||||
|
||||
ALTER TABLE ONLY test_chat_schema.badge_code_redemptions
|
||||
ADD CONSTRAINT badge_code_redemptions_code_key UNIQUE (code);
|
||||
ADD CONSTRAINT badge_code_redemptions_pkey PRIMARY KEY (badge_code_redemption_id);
|
||||
|
||||
|
||||
|
||||
ALTER TABLE ONLY test_chat_schema.badge_code_redemptions
|
||||
ADD CONSTRAINT badge_code_redemptions_pkey PRIMARY KEY (badge_code_redemption_id);
|
||||
ADD CONSTRAINT badge_code_redemptions_user_id_code_key UNIQUE (user_id, code);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user