Create a new table for instance_integrations
In order to support integrations in Cells architecture we need to split existing integrations into group/project integrations (existing integrations table) and instance wide integrations. Instance wide integrations need a separate table, which should be implemented as part of this issue.
Proposed solution
Create a new instance_integrations table, which is identical to integrations table, with the exception of group_id & project_id foreign keys. instance value is always set to true.
(
id integer default nextval('integrations_id_seq'::regclass) not null
primary key,
created_at timestamp,
updated_at timestamp,
active boolean default false not null,
push_events boolean default true,
issues_events boolean default true,
merge_requests_events boolean default true,
tag_push_events boolean default true,
note_events boolean default true not null,
category varchar default 'common'::character varying not null,
wiki_page_events boolean default true,
pipeline_events boolean default false not null,
confidential_issues_events boolean default true not null,
commit_events boolean default true not null,
job_events boolean default false not null,
confidential_note_events boolean default true,
deployment_events boolean default false not null,
comment_on_event_enabled boolean default true not null,
instance boolean default false not null,
comment_detail smallint,
inherit_from_id bigint
constraint fk_services_inherit_from_id
references integrations
on delete cascade,
alert_events boolean,
type_new text
constraint check_a948a0aa7e
check (char_length(type_new) <= 255),
vulnerability_events boolean default false not null,
archive_trace_events boolean default false not null,
encrypted_properties bytea,
encrypted_properties_iv bytea,
incident_events boolean default false not null,
group_mention_events boolean default false not null,
group_confidential_mention_events boolean default false not null
);
Edited by George Koltsov