-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
126 changed files
with
4,660 additions
and
2,705 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
-- This file is autogenerated from regen-schema.ts | ||
create table if not exists | ||
audit_events ( | ||
id bigint generated always as identity primary key, | ||
created_time timestamptz not null default now(), | ||
id bigint not null, | ||
created_time timestamp with time zone default now() not null, | ||
name text not null, | ||
user_id text not null, | ||
contract_id text null, | ||
comment_id text null, | ||
data jsonb null | ||
contract_id text, | ||
comment_id text, | ||
data jsonb | ||
); | ||
|
||
-- Policies | ||
alter table audit_events enable row level security; | ||
|
||
drop policy if exists "public read" on audit_events; | ||
|
||
create policy "public read" on audit_events for | ||
select | ||
using (true); | ||
|
||
-- Indexes | ||
drop index if exists audit_events_pkey; | ||
|
||
create unique index audit_events_pkey on public.audit_events using btree (id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,46 @@ | ||
-- This file is autogenerated from regen-schema.ts | ||
create table if not exists | ||
chart_annotations ( | ||
id bigint generated always as identity primary key, | ||
created_time timestamptz not null default now(), | ||
chart_annotations ( | ||
id bigint not null, | ||
created_time timestamp with time zone default now() not null, | ||
event_time bigint not null, | ||
contract_id text not null, | ||
creator_id text not null, | ||
creator_username text not null, | ||
creator_name text not null, | ||
creator_avatar_url text not null, | ||
up_votes integer not null default 0, | ||
down_votes integer not null default 0, | ||
up_votes integer default 0 not null, | ||
down_votes integer default 0 not null, | ||
comment_id text, | ||
thumbnail_url text, | ||
external_url text, | ||
text text, | ||
answer_id text, | ||
user_username text, | ||
user_name text, | ||
user_avatar_url text, | ||
user_id text, | ||
prob_change numeric, | ||
constraint chart_annotations_prob_change_check check ( | ||
( | ||
(prob_change >= ('-1'::integer)::numeric) | ||
and (prob_change <= (1)::numeric) | ||
) | ||
) | ||
); | ||
|
||
prob_change numeric null check (prob_change >= -1 and prob_change <= 1), | ||
user_username text null, | ||
user_name text null, | ||
user_avatar_url text null, | ||
user_id text null, | ||
comment_id text null, | ||
answer_id text null, | ||
thumbnail_url text null, | ||
external_url text null, | ||
text text null | ||
); | ||
-- Policies | ||
alter table chart_annotations enable row level security; | ||
|
||
drop policy if exists "public read" on chart_annotations; | ||
|
||
create policy "public read" on chart_annotations using (true); | ||
create policy "public read" on chart_annotations for all using (true); | ||
|
||
create index if not exists contract_annotations_event_time | ||
on chart_annotations (contract_id, event_time asc); | ||
-- 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
|
||
-- This file is autogenerated from regen-schema.ts | ||
create table if not exists | ||
chat_messages ( | ||
id serial primary key, | ||
user_id text not null, | ||
channel_id text not null, | ||
content jsonb not null, | ||
created_time timestamptz not null default now() | ||
); | ||
chat_messages ( | ||
id integer not null, | ||
user_id text not null, | ||
channel_id text not null, | ||
content jsonb not null, | ||
created_time timestamp with time zone default now() not null | ||
); | ||
|
||
-- Policies | ||
alter table chat_messages enable row level security; | ||
|
||
drop policy if exists "public read" on chat_messages; | ||
|
||
create policy "public read" on chat_messages for | ||
select | ||
using (true); | ||
create index if not exists chat_messages_channel_id | ||
on chat_messages (channel_id, id desc); | ||
select | ||
using (true); | ||
|
||
-- Indexes | ||
drop index if exists chat_messages_pkey; | ||
|
||
alter table chat_messages | ||
cluster on chat_messages_channel_id; | ||
create unique index chat_messages_pkey on public.chat_messages using btree (id); | ||
|
||
alter publication supabase_realtime | ||
add table chat_messages; | ||
drop index if exists chat_messages_channel_id; | ||
|
||
create index chat_messages_channel_id on public.chat_messages using btree (channel_id, id desc); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.