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>
33 lines
924 B
SQL
33 lines
924 B
SQL
-- This file is autogenerated from regen-schema.ts
|
|
create table if not exists
|
|
leagues (
|
|
cohort text not null,
|
|
created_time timestamp without time zone default now() not null,
|
|
division integer not null,
|
|
id uuid primary key default gen_random_uuid () not null,
|
|
mana_earned numeric default 0.0 not null,
|
|
mana_earned_breakdown jsonb default '{}'::jsonb not null,
|
|
rank_snapshot integer,
|
|
season integer not null,
|
|
user_id text not null
|
|
);
|
|
|
|
-- Row Level Security
|
|
alter table leagues enable row level security;
|
|
|
|
-- Policies
|
|
drop policy if exists "public read" on leagues;
|
|
|
|
create policy "public read" on leagues for
|
|
select
|
|
using (true);
|
|
|
|
-- Indexes
|
|
drop index if exists leagues_pkey;
|
|
|
|
create unique index leagues_pkey on public.leagues using btree (id);
|
|
|
|
drop index if exists unique_user_id_season;
|
|
|
|
create unique index unique_user_id_season on public.leagues using btree (user_id, season);
|