Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add two new columns to connectors for UI to show/hide properties #1556

Merged
merged 10 commits into from
Aug 27, 2024
13 changes: 11 additions & 2 deletions supabase/migrations/06_connectors.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ create table connectors (

external_url text not null,
image_name text unique not null,
capture_interval text,
disable_backfill boolean not null default false,
title jsonb_internationalized_value not null,
short_description jsonb_internationalized_value not null,
logo_url jsonb_internationalized_value not null,
Expand All @@ -22,7 +24,9 @@ create table connectors (
oauth2_spec jsonb_obj,
--
constraint "image_name must be a container image without a tag"
check (image_name ~ '^(?:.+/)?([^:]+)$')
check (image_name ~ '^(?:.+/)?([^:]+)$'),
constraint "capture_interval must be a number with the format following"
check (capture_interval ~ '^\d+(s|m|h)$')
);
-- Public, no RLS.

Expand All @@ -49,10 +53,15 @@ comment on column public.connectors.title is
'The title of this connector. Represented as a json object with IETF language tags as keys (https://en.wikipedia.org/wiki/IETF_language_tag), and the title string as values';
comment on column public.connectors.short_description is
'A short description of this connector, at most a few sentences. Represented as a json object with IETF language tags as keys (https://en.wikipedia.org/wiki/IETF_language_tag), and the description string as values';
comment on column connectors.capture_interval is
'The default value for the interval property for a Capture. This is ONLY used for non-streaming connectors';
comment on column connectors.disable_backfill is
'Controls if the UI will hide the backfill button for a connector.';


-- don't expose details of oauth2 secret
-- authenticated may select other columns for all connectors connectors.
grant select(id, detail, updated_at, created_at, image_name, external_url, title, short_description, logo_url, recommended, oauth2_client_id) on table connectors to authenticated;
grant select(id, capture_interval, disable_backfill, detail, updated_at, created_at, image_name, external_url, title, short_description, logo_url, recommended, oauth2_client_id) on table connectors to authenticated;

-- TODO: make auto_discover_interval specific to captures
create table connector_tags (
Expand Down
Loading