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>
42 lines
1.4 KiB
SQL
42 lines
1.4 KiB
SQL
-- This file is autogenerated from regen-schema.ts
|
|
create table if not exists
|
|
dashboards (
|
|
ai_importance_score numeric default 0 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,
|
|
id text primary key default random_alphanumeric (12) not null,
|
|
importance_score numeric default 0 not null,
|
|
items jsonb default '[]'::jsonb,
|
|
politics_importance_score numeric default 0 not null,
|
|
slug text not null,
|
|
title text not null,
|
|
title_fts tsvector generated always as (to_tsvector('english'::regconfig, title)) stored,
|
|
visibility text default 'public'::text
|
|
);
|
|
|
|
-- Foreign Keys
|
|
alter table dashboards
|
|
add constraint dashboards_creator_id_fkey foreign key (creator_id) references users (id);
|
|
|
|
-- Row Level Security
|
|
alter table dashboards enable row level security;
|
|
|
|
-- Policies
|
|
drop policy if exists "Enable read access for admin" on dashboards;
|
|
|
|
create policy "Enable read access for admin" on dashboards for
|
|
select
|
|
to service_role using (true);
|
|
|
|
-- Indexes
|
|
drop index if exists dashboards_pkey;
|
|
|
|
create unique index dashboards_pkey on public.dashboards using btree (id);
|
|
|
|
drop index if exists idx_dashboard_slug;
|
|
|
|
create unique index idx_dashboard_slug on public.dashboards using btree (slug);
|