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

27 lines
752 B
SQL

-- This file is autogenerated from regen-schema.ts
create table if not exists
votes (
contract_id text not null,
created_time timestamp with time zone default now() not null,
id text not null,
user_id text not null,
-- For ranked-choice voting: 1 = first choice, 2 = second, etc.
-- Null for single-vote and multi-select polls
rank smallint,
primary key (id, contract_id, user_id)
);
-- Row Level Security
alter table votes enable row level security;
drop policy if exists "self read" on votes;
create policy "self read" on votes for
select
using ((user_id = firebase_uid ()));
-- Indexes
drop index if exists votes_pkey;
create unique index votes_pkey on public.votes using btree (id, contract_id, user_id);