-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: sync the storage schemas (#436)
- Loading branch information
1 parent
ab76db6
commit 50f0255
Showing
4 changed files
with
189 additions
and
93 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
182 changes: 182 additions & 0 deletions
182
migrations/supabase/migrations/20241015085655_remote_schema.sql
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 |
---|---|---|
@@ -0,0 +1,182 @@ | ||
drop function if exists "public"."match_docs"(query_embedding vector, match_count integer, filter jsonb); | ||
|
||
drop function if exists "public"."match_documents"(query_embedding vector, filter jsonb); | ||
|
||
drop function if exists "public"."match_text"(query_embedding vector, match_count integer, filter jsonb); | ||
|
||
create table "public"."bot_approval" ( | ||
"id" uuid not null default gen_random_uuid(), | ||
"created_at" timestamp with time zone not null default now(), | ||
"bot_id" character varying, | ||
"task_type" character varying, | ||
"approval_path" character varying, | ||
"approval_status" character varying default ''::character varying | ||
); | ||
|
||
|
||
create table "public"."github_app_installations" ( | ||
"id" bigint generated by default as identity not null, | ||
"created_at" timestamp with time zone not null default now(), | ||
"owner_name" text, | ||
"repo_name" text | ||
); | ||
|
||
|
||
create table "public"."user_rate_limit" ( | ||
"id" uuid not null default gen_random_uuid(), | ||
"created_at" timestamp with time zone not null default now(), | ||
"user_id" text, | ||
"last_request" timestamp without time zone, | ||
"request_count" bigint | ||
); | ||
|
||
|
||
alter table "public"."user_rate_limit" enable row level security; | ||
|
||
alter table "public"."bots" alter column "llm" set default ''::character varying; | ||
|
||
alter table "public"."bots" alter column "token_id" drop default; | ||
|
||
alter table "public"."github_repo_config" add column "owner_id" character varying; | ||
|
||
alter table "public"."github_repo_config" add column "repo_id" character varying; | ||
|
||
CREATE UNIQUE INDEX "bot_ approval_pkey" ON public.bot_approval USING btree (id); | ||
|
||
CREATE UNIQUE INDEX github_app_installations_pkey ON public.github_app_installations USING btree (id); | ||
|
||
CREATE UNIQUE INDEX user_rate_limit_pkey ON public.user_rate_limit USING btree (id); | ||
|
||
alter table "public"."bot_approval" add constraint "bot_ approval_pkey" PRIMARY KEY using index "bot_ approval_pkey"; | ||
|
||
alter table "public"."github_app_installations" add constraint "github_app_installations_pkey" PRIMARY KEY using index "github_app_installations_pkey"; | ||
|
||
alter table "public"."user_rate_limit" add constraint "user_rate_limit_pkey" PRIMARY KEY using index "user_rate_limit_pkey"; | ||
|
||
grant delete on table "public"."bot_approval" to "anon"; | ||
|
||
grant insert on table "public"."bot_approval" to "anon"; | ||
|
||
grant references on table "public"."bot_approval" to "anon"; | ||
|
||
grant select on table "public"."bot_approval" to "anon"; | ||
|
||
grant trigger on table "public"."bot_approval" to "anon"; | ||
|
||
grant truncate on table "public"."bot_approval" to "anon"; | ||
|
||
grant update on table "public"."bot_approval" to "anon"; | ||
|
||
grant delete on table "public"."bot_approval" to "authenticated"; | ||
|
||
grant insert on table "public"."bot_approval" to "authenticated"; | ||
|
||
grant references on table "public"."bot_approval" to "authenticated"; | ||
|
||
grant select on table "public"."bot_approval" to "authenticated"; | ||
|
||
grant trigger on table "public"."bot_approval" to "authenticated"; | ||
|
||
grant truncate on table "public"."bot_approval" to "authenticated"; | ||
|
||
grant update on table "public"."bot_approval" to "authenticated"; | ||
|
||
grant delete on table "public"."bot_approval" to "service_role"; | ||
|
||
grant insert on table "public"."bot_approval" to "service_role"; | ||
|
||
grant references on table "public"."bot_approval" to "service_role"; | ||
|
||
grant select on table "public"."bot_approval" to "service_role"; | ||
|
||
grant trigger on table "public"."bot_approval" to "service_role"; | ||
|
||
grant truncate on table "public"."bot_approval" to "service_role"; | ||
|
||
grant update on table "public"."bot_approval" to "service_role"; | ||
|
||
grant delete on table "public"."github_app_installations" to "anon"; | ||
|
||
grant insert on table "public"."github_app_installations" to "anon"; | ||
|
||
grant references on table "public"."github_app_installations" to "anon"; | ||
|
||
grant select on table "public"."github_app_installations" to "anon"; | ||
|
||
grant trigger on table "public"."github_app_installations" to "anon"; | ||
|
||
grant truncate on table "public"."github_app_installations" to "anon"; | ||
|
||
grant update on table "public"."github_app_installations" to "anon"; | ||
|
||
grant delete on table "public"."github_app_installations" to "authenticated"; | ||
|
||
grant insert on table "public"."github_app_installations" to "authenticated"; | ||
|
||
grant references on table "public"."github_app_installations" to "authenticated"; | ||
|
||
grant select on table "public"."github_app_installations" to "authenticated"; | ||
|
||
grant trigger on table "public"."github_app_installations" to "authenticated"; | ||
|
||
grant truncate on table "public"."github_app_installations" to "authenticated"; | ||
|
||
grant update on table "public"."github_app_installations" to "authenticated"; | ||
|
||
grant delete on table "public"."github_app_installations" to "service_role"; | ||
|
||
grant insert on table "public"."github_app_installations" to "service_role"; | ||
|
||
grant references on table "public"."github_app_installations" to "service_role"; | ||
|
||
grant select on table "public"."github_app_installations" to "service_role"; | ||
|
||
grant trigger on table "public"."github_app_installations" to "service_role"; | ||
|
||
grant truncate on table "public"."github_app_installations" to "service_role"; | ||
|
||
grant update on table "public"."github_app_installations" to "service_role"; | ||
|
||
grant delete on table "public"."user_rate_limit" to "anon"; | ||
|
||
grant insert on table "public"."user_rate_limit" to "anon"; | ||
|
||
grant references on table "public"."user_rate_limit" to "anon"; | ||
|
||
grant select on table "public"."user_rate_limit" to "anon"; | ||
|
||
grant trigger on table "public"."user_rate_limit" to "anon"; | ||
|
||
grant truncate on table "public"."user_rate_limit" to "anon"; | ||
|
||
grant update on table "public"."user_rate_limit" to "anon"; | ||
|
||
grant delete on table "public"."user_rate_limit" to "authenticated"; | ||
|
||
grant insert on table "public"."user_rate_limit" to "authenticated"; | ||
|
||
grant references on table "public"."user_rate_limit" to "authenticated"; | ||
|
||
grant select on table "public"."user_rate_limit" to "authenticated"; | ||
|
||
grant trigger on table "public"."user_rate_limit" to "authenticated"; | ||
|
||
grant truncate on table "public"."user_rate_limit" to "authenticated"; | ||
|
||
grant update on table "public"."user_rate_limit" to "authenticated"; | ||
|
||
grant delete on table "public"."user_rate_limit" to "service_role"; | ||
|
||
grant insert on table "public"."user_rate_limit" to "service_role"; | ||
|
||
grant references on table "public"."user_rate_limit" to "service_role"; | ||
|
||
grant select on table "public"."user_rate_limit" to "service_role"; | ||
|
||
grant trigger on table "public"."user_rate_limit" to "service_role"; | ||
|
||
grant truncate on table "public"."user_rate_limit" to "service_role"; | ||
|
||
grant update on table "public"."user_rate_limit" to "service_role"; | ||
|
||
|
7 changes: 7 additions & 0 deletions
7
migrations/supabase/migrations/20241015090438_remote_schema.sql
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
drop function if exists "public"."match_antd_doc"(query_embedding vector, filter jsonb); | ||
|
||
drop function if exists "public"."match_antd_documents"(query_embedding vector, filter jsonb); | ||
|
||
drop function if exists "public"."match_antd_knowledge"(query_embedding vector, filter jsonb); | ||
|
||
|