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>
46 lines
1.3 KiB
SQL
46 lines
1.3 KiB
SQL
-- This file is autogenerated from regen-schema.ts
|
|
create table if not exists
|
|
chart_annotations (
|
|
answer_id text,
|
|
comment_id text,
|
|
contract_id text not null,
|
|
created_time timestamp with time zone default now() not null,
|
|
creator_avatar_url text not null,
|
|
creator_id text not null,
|
|
creator_name text not null,
|
|
creator_username text not null,
|
|
down_votes integer default 0 not null,
|
|
event_time bigint not null,
|
|
external_url text,
|
|
id bigint primary key generated always as identity not null,
|
|
prob_change numeric constraint chart_annotations_prob_change_check check (
|
|
(
|
|
(prob_change >= ('-1'::integer)::numeric)
|
|
and (prob_change <= (1)::numeric)
|
|
)
|
|
),
|
|
text text,
|
|
thumbnail_url text,
|
|
up_votes integer default 0 not null,
|
|
user_id text
|
|
);
|
|
|
|
-- Row Level Security
|
|
alter table chart_annotations enable row level security;
|
|
|
|
-- Policies
|
|
drop policy if exists "public read" on chart_annotations;
|
|
|
|
create policy "public read" on chart_annotations for
|
|
select
|
|
using (true);
|
|
|
|
-- Indexes
|
|
drop index if exists chart_annotations_pkey;
|
|
|
|
create unique index chart_annotations_pkey on public.chart_annotations using btree (id);
|
|
|
|
drop index if exists contract_annotations_event_time;
|
|
|
|
create index contract_annotations_event_time on public.chart_annotations using btree (contract_id, event_time);
|