predikt/oracle/backend/supabase/gidx_receipts.sql
caelum0x 2b68bde5d5 Predikt: full Polymarket-style prediction market — web + mobile + on-chain + bots
Working tree is now the canonical repo. Off-chain play-money + trustless on-chain
(FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution,
mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 23:29:50 +03:00

47 lines
1.4 KiB
SQL

-- This file is autogenerated from regen-schema.ts
create table if not exists
gidx_receipts (
amount numeric(20, 2),
callback_data jsonb,
created_time timestamp with time zone default now() not null,
currency text,
id bigint primary key generated always as identity not null,
merchant_session_id text,
merchant_transaction_id text not null,
payment_amount_type text,
payment_data jsonb,
payment_method_type text,
payment_status_code text,
payment_status_message text,
reason_codes text[],
service_type text,
session_id text not null,
session_score integer,
status text,
status_code integer,
transaction_status_code text,
transaction_status_message text,
txn_id text,
user_id text
);
-- Foreign Keys
alter table gidx_receipts
add constraint gidx_receipts_user_id_fkey foreign key (user_id) references users (id);
-- Row Level Security
alter table gidx_receipts enable row level security;
-- Indexes
drop index if exists cash_out_receipts_merchant_transaction_id_idx;
create index cash_out_receipts_merchant_transaction_id_idx on public.gidx_receipts using btree (merchant_transaction_id);
drop index if exists cash_out_receipts_user_id_idx;
create index cash_out_receipts_user_id_idx on public.gidx_receipts using btree (user_id);
drop index if exists gidx_receipts_pkey;
create unique index gidx_receipts_pkey on public.gidx_receipts using btree (id);