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>
44 lines
1.4 KiB
SQL
44 lines
1.4 KiB
SQL
-- This file is autogenerated from regen-schema.ts
|
|
create table if not exists
|
|
pending_clarifications (
|
|
id bigint primary key generated always as identity not null,
|
|
contract_id text not null,
|
|
comment_id text not null,
|
|
created_time timestamp with time zone default now() not null,
|
|
data jsonb not null,
|
|
applied_time timestamp with time zone,
|
|
cancelled_time timestamp with time zone
|
|
);
|
|
|
|
-- Foreign Keys
|
|
alter table pending_clarifications
|
|
add constraint pending_clarifications_contract_id_fkey foreign key (contract_id) references contracts (id);
|
|
|
|
-- Row Level Security
|
|
alter table pending_clarifications enable row level security;
|
|
|
|
-- Policies
|
|
drop policy if exists "public read" on pending_clarifications;
|
|
|
|
create policy "public read" on pending_clarifications for
|
|
select
|
|
using (true);
|
|
|
|
-- Indexes
|
|
drop index if exists pending_clarifications_pkey;
|
|
|
|
create unique index pending_clarifications_pkey on public.pending_clarifications using btree (id);
|
|
|
|
drop index if exists pending_clarifications_contract_id_idx;
|
|
|
|
create index pending_clarifications_contract_id_idx on public.pending_clarifications using btree (contract_id);
|
|
|
|
drop index if exists pending_clarifications_pending_idx;
|
|
|
|
create index pending_clarifications_pending_idx on public.pending_clarifications using btree (created_time)
|
|
where
|
|
(
|
|
applied_time is null
|
|
and cancelled_time is null
|
|
);
|