From 172f70a0e603104806db2e438987a00a3438d699 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Thu, 1 Oct 2026 19:32:15 +0400 Subject: [PATCH] postgres schema --- .../Chat/Store/Postgres/Migrations/chat_schema.sql | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Simplex/Chat/Store/Postgres/Migrations/chat_schema.sql b/src/Simplex/Chat/Store/Postgres/Migrations/chat_schema.sql index a94a6c0baf..fee1dd342b 100644 --- a/src/Simplex/Chat/Store/Postgres/Migrations/chat_schema.sql +++ b/src/Simplex/Chat/Store/Postgres/Migrations/chat_schema.sql @@ -299,12 +299,14 @@ ALTER TABLE test_chat_schema.badge_purchases ALTER COLUMN badge_purchase_id ADD CREATE TABLE test_chat_schema.badge_store_receipts ( badge_store_receipt_id bigint NOT NULL, user_id bigint NOT NULL, - provider text NOT NULL, - transaction_ref text NOT NULL, + invoice_id text, + provider text, + transaction_ref text, purchase_key bytea NOT NULL, purchase_priv_key bytea NOT NULL, master_key bytea NOT NULL, - created_at timestamp with time zone NOT NULL + created_at timestamp with time zone NOT NULL, + closed_at timestamp with time zone ); @@ -1818,6 +1820,11 @@ ALTER TABLE ONLY test_chat_schema.badge_purchases +ALTER TABLE ONLY test_chat_schema.badge_store_receipts + ADD CONSTRAINT badge_store_receipts_invoice_id_key UNIQUE (invoice_id); + + + ALTER TABLE ONLY test_chat_schema.badge_store_receipts ADD CONSTRAINT badge_store_receipts_pkey PRIMARY KEY (badge_store_receipt_id);