diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 13:16:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 13:16:36 +0000 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /db | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) | |
download | gitlab-ce-311b0269b4eb9839fa63f80c8d7a58f32b8138a0.tar.gz |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'db')
2554 files changed, 18263 insertions, 28739 deletions
diff --git a/db/fixtures/development/15_award_emoji.rb b/db/fixtures/development/15_award_emoji.rb index 2b69a6c26ab..efad7e92bb0 100644 --- a/db/fixtures/development/15_award_emoji.rb +++ b/db/fixtures/development/15_award_emoji.rb @@ -1,15 +1,13 @@ require './spec/support/sidekiq_middleware' Gitlab::Seeder.quiet do - EMOJI = Gitlab::Emoji.emojis.keys - def seed_award_emoji(klass) klass.order(Gitlab::Database.random).limit(klass.count / 2).each do |awardable| awardable.project.authorized_users.where('project_authorizations.access_level > ?', Gitlab::Access::GUEST).sample(2).each do |user| - AwardEmojis::AddService.new(awardable, EMOJI.sample, user).execute + AwardEmojis::AddService.new(awardable, TanukiEmoji.index.all.sample.name, user).execute awardable.notes.user.sample(2).each do |note| - AwardEmojis::AddService.new(note, EMOJI.sample, user).execute + AwardEmojis::AddService.new(note, TanukiEmoji.index.all.sample.name, user).execute end print '.' diff --git a/db/fixtures/development/17_cycle_analytics.rb b/db/fixtures/development/17_cycle_analytics.rb index 95d956fb402..fa19775a571 100644 --- a/db/fixtures/development/17_cycle_analytics.rb +++ b/db/fixtures/development/17_cycle_analytics.rb @@ -157,16 +157,17 @@ class Gitlab::Seeder::CycleAnalytics end def create_new_vsm_project + namespace = FactoryBot.create( + :group, + name: "Value Stream Management Group #{suffix}", + path: "vsmg-#{suffix}" + ) project = FactoryBot.create( :project, name: "Value Stream Management Project #{suffix}", path: "vsmp-#{suffix}", creator: admin, - namespace: FactoryBot.create( - :group, - name: "Value Stream Management Group #{suffix}", - path: "vsmg-#{suffix}" - ) + namespace: namespace ) project.create_repository diff --git a/db/fixtures/development/20_nested_groups.rb b/db/fixtures/development/20_nested_groups.rb index 8f64dfbd644..d9aea17aa16 100644 --- a/db/fixtures/development/20_nested_groups.rb +++ b/db/fixtures/development/20_nested_groups.rb @@ -23,8 +23,9 @@ Sidekiq::Testing.inline! do full_path = url.sub('https://android.googlesource.com/', '') full_path = full_path.sub(/\.git\z/, '') full_path, _, project_path = full_path.rpartition('/') - group = Group.find_by_full_path(full_path) || - Groups::NestedCreateService.new(user, group_path: full_path).execute + group = Sidekiq::Worker.skipping_transaction_check do + Group.find_by_full_path(full_path) || Groups::NestedCreateService.new(user, group_path: full_path).execute + end params = { import_url: url, diff --git a/db/fixtures/development/98_gitlab_instance_administration_project.rb b/db/fixtures/development/98_gitlab_instance_administration_project.rb index 8be707ffb08..9f50ce6a7e4 100644 --- a/db/fixtures/development/98_gitlab_instance_administration_project.rb +++ b/db/fixtures/development/98_gitlab_instance_administration_project.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true -response = ::Gitlab::DatabaseImporters::SelfMonitoring::Project::CreateService.new.execute +response = Sidekiq::Worker.skipping_transaction_check do + ::Gitlab::DatabaseImporters::SelfMonitoring::Project::CreateService.new.execute +end if response[:status] == :success puts "Successfully created self monitoring project." diff --git a/db/init_structure.sql b/db/init_structure.sql index e2048e436ed..d3f576a7b89 100644 --- a/db/init_structure.sql +++ b/db/init_structure.sql @@ -1,5 +1,8740 @@ +CREATE SCHEMA gitlab_partitions_dynamic; + +COMMENT ON SCHEMA gitlab_partitions_dynamic IS 'Schema to hold partitions managed dynamically from the application, e.g. for time space partitioning.'; + +CREATE SCHEMA gitlab_partitions_static; + +COMMENT ON SCHEMA gitlab_partitions_static IS 'Schema to hold static partitions, e.g. for hash partitioning'; + +CREATE EXTENSION IF NOT EXISTS btree_gist; + CREATE EXTENSION IF NOT EXISTS pg_trgm; +CREATE FUNCTION table_sync_function_2be879775d() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN +IF (TG_OP = 'DELETE') THEN + DELETE FROM audit_events_archived where id = OLD.id; +ELSIF (TG_OP = 'UPDATE') THEN + UPDATE audit_events_archived + SET author_id = NEW.author_id, + entity_id = NEW.entity_id, + entity_type = NEW.entity_type, + details = NEW.details, + created_at = NEW.created_at, + ip_address = NEW.ip_address, + author_name = NEW.author_name, + target_details = NEW.target_details, + entity_path = NEW.entity_path, + target_type = NEW.target_type, + target_id = NEW.target_id + WHERE audit_events_archived.id = NEW.id; +ELSIF (TG_OP = 'INSERT') THEN + INSERT INTO audit_events_archived (id, + author_id, + entity_id, + entity_type, + details, + created_at, + ip_address, + author_name, + target_details, + entity_path, + target_type, + target_id) + VALUES (NEW.id, + NEW.author_id, + NEW.entity_id, + NEW.entity_type, + NEW.details, + NEW.created_at, + NEW.ip_address, + NEW.author_name, + NEW.target_details, + NEW.entity_path, + NEW.target_type, + NEW.target_id); +END IF; +RETURN NULL; + +END +$$; + +COMMENT ON FUNCTION table_sync_function_2be879775d() IS 'Partitioning migration: table sync for audit_events table'; + +CREATE TABLE audit_events ( + id bigint NOT NULL, + author_id integer NOT NULL, + entity_id integer NOT NULL, + entity_type character varying NOT NULL, + details text, + ip_address inet, + author_name text, + target_details text, + entity_path text, + created_at timestamp without time zone NOT NULL, + target_type text, + target_id bigint, + CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)), + CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255)) +) +PARTITION BY RANGE (created_at); + +CREATE TABLE product_analytics_events_experimental ( + id bigint NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +) +PARTITION BY HASH (project_id); + +CREATE SEQUENCE product_analytics_events_experimental_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE product_analytics_events_experimental_id_seq OWNED BY product_analytics_events_experimental.id; + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_00 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_00 FOR VALUES WITH (modulus 64, remainder 0); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_01 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_01 FOR VALUES WITH (modulus 64, remainder 1); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_02 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_02 FOR VALUES WITH (modulus 64, remainder 2); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_03 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_03 FOR VALUES WITH (modulus 64, remainder 3); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_04 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_04 FOR VALUES WITH (modulus 64, remainder 4); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_05 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_05 FOR VALUES WITH (modulus 64, remainder 5); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_06 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_06 FOR VALUES WITH (modulus 64, remainder 6); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_07 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_07 FOR VALUES WITH (modulus 64, remainder 7); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_08 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_08 FOR VALUES WITH (modulus 64, remainder 8); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_09 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_09 FOR VALUES WITH (modulus 64, remainder 9); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_10 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_10 FOR VALUES WITH (modulus 64, remainder 10); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_11 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_11 FOR VALUES WITH (modulus 64, remainder 11); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_12 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_12 FOR VALUES WITH (modulus 64, remainder 12); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_13 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_13 FOR VALUES WITH (modulus 64, remainder 13); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_14 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_14 FOR VALUES WITH (modulus 64, remainder 14); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_15 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_15 FOR VALUES WITH (modulus 64, remainder 15); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_16 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_16 FOR VALUES WITH (modulus 64, remainder 16); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_17 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_17 FOR VALUES WITH (modulus 64, remainder 17); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_18 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_18 FOR VALUES WITH (modulus 64, remainder 18); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_19 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_19 FOR VALUES WITH (modulus 64, remainder 19); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_20 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_20 FOR VALUES WITH (modulus 64, remainder 20); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_21 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_21 FOR VALUES WITH (modulus 64, remainder 21); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_22 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_22 FOR VALUES WITH (modulus 64, remainder 22); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_23 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_23 FOR VALUES WITH (modulus 64, remainder 23); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_24 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_24 FOR VALUES WITH (modulus 64, remainder 24); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_25 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_25 FOR VALUES WITH (modulus 64, remainder 25); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_26 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_26 FOR VALUES WITH (modulus 64, remainder 26); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_27 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_27 FOR VALUES WITH (modulus 64, remainder 27); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_28 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_28 FOR VALUES WITH (modulus 64, remainder 28); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_29 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_29 FOR VALUES WITH (modulus 64, remainder 29); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_30 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_30 FOR VALUES WITH (modulus 64, remainder 30); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_31 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_31 FOR VALUES WITH (modulus 64, remainder 31); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_32 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_32 FOR VALUES WITH (modulus 64, remainder 32); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_33 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_33 FOR VALUES WITH (modulus 64, remainder 33); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_34 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_34 FOR VALUES WITH (modulus 64, remainder 34); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_35 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_35 FOR VALUES WITH (modulus 64, remainder 35); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_36 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_36 FOR VALUES WITH (modulus 64, remainder 36); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_37 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_37 FOR VALUES WITH (modulus 64, remainder 37); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_38 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_38 FOR VALUES WITH (modulus 64, remainder 38); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_39 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_39 FOR VALUES WITH (modulus 64, remainder 39); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_40 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_40 FOR VALUES WITH (modulus 64, remainder 40); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_41 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_41 FOR VALUES WITH (modulus 64, remainder 41); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_42 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_42 FOR VALUES WITH (modulus 64, remainder 42); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_43 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_43 FOR VALUES WITH (modulus 64, remainder 43); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_44 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_44 FOR VALUES WITH (modulus 64, remainder 44); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_45 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_45 FOR VALUES WITH (modulus 64, remainder 45); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_46 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_46 FOR VALUES WITH (modulus 64, remainder 46); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_47 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_47 FOR VALUES WITH (modulus 64, remainder 47); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_48 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_48 FOR VALUES WITH (modulus 64, remainder 48); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_49 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_49 FOR VALUES WITH (modulus 64, remainder 49); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_50 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_50 FOR VALUES WITH (modulus 64, remainder 50); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_51 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_51 FOR VALUES WITH (modulus 64, remainder 51); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_52 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_52 FOR VALUES WITH (modulus 64, remainder 52); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_53 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_53 FOR VALUES WITH (modulus 64, remainder 53); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_54 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_54 FOR VALUES WITH (modulus 64, remainder 54); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_55 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_55 FOR VALUES WITH (modulus 64, remainder 55); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_56 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_56 FOR VALUES WITH (modulus 64, remainder 56); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_57 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_57 FOR VALUES WITH (modulus 64, remainder 57); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_58 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_58 FOR VALUES WITH (modulus 64, remainder 58); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_59 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_59 FOR VALUES WITH (modulus 64, remainder 59); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_60 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_60 FOR VALUES WITH (modulus 64, remainder 60); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_61 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_61 FOR VALUES WITH (modulus 64, remainder 61); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_62 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_62 FOR VALUES WITH (modulus 64, remainder 62); + +CREATE TABLE gitlab_partitions_static.product_analytics_events_experimental_63 ( + id bigint DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass) NOT NULL, + project_id integer NOT NULL, + platform character varying(255), + etl_tstamp timestamp with time zone, + collector_tstamp timestamp with time zone NOT NULL, + dvce_created_tstamp timestamp with time zone, + event character varying(128), + event_id character(36) NOT NULL, + txn_id integer, + name_tracker character varying(128), + v_tracker character varying(100), + v_collector character varying(100) NOT NULL, + v_etl character varying(100) NOT NULL, + user_id character varying(255), + user_ipaddress character varying(45), + user_fingerprint character varying(50), + domain_userid character varying(36), + domain_sessionidx smallint, + network_userid character varying(38), + geo_country character(2), + geo_region character(3), + geo_city character varying(75), + geo_zipcode character varying(15), + geo_latitude double precision, + geo_longitude double precision, + geo_region_name character varying(100), + ip_isp character varying(100), + ip_organization character varying(100), + ip_domain character varying(100), + ip_netspeed character varying(100), + page_url text, + page_title character varying(2000), + page_referrer text, + page_urlscheme character varying(16), + page_urlhost character varying(255), + page_urlport integer, + page_urlpath character varying(3000), + page_urlquery character varying(6000), + page_urlfragment character varying(3000), + refr_urlscheme character varying(16), + refr_urlhost character varying(255), + refr_urlport integer, + refr_urlpath character varying(6000), + refr_urlquery character varying(6000), + refr_urlfragment character varying(3000), + refr_medium character varying(25), + refr_source character varying(50), + refr_term character varying(255), + mkt_medium character varying(255), + mkt_source character varying(255), + mkt_term character varying(255), + mkt_content character varying(500), + mkt_campaign character varying(255), + se_category character varying(1000), + se_action character varying(1000), + se_label character varying(1000), + se_property character varying(1000), + se_value double precision, + tr_orderid character varying(255), + tr_affiliation character varying(255), + tr_total numeric(18,2), + tr_tax numeric(18,2), + tr_shipping numeric(18,2), + tr_city character varying(255), + tr_state character varying(255), + tr_country character varying(255), + ti_orderid character varying(255), + ti_sku character varying(255), + ti_name character varying(255), + ti_category character varying(255), + ti_price numeric(18,2), + ti_quantity integer, + pp_xoffset_min integer, + pp_xoffset_max integer, + pp_yoffset_min integer, + pp_yoffset_max integer, + useragent character varying(1000), + br_name character varying(50), + br_family character varying(50), + br_version character varying(50), + br_type character varying(50), + br_renderengine character varying(50), + br_lang character varying(255), + br_features_pdf boolean, + br_features_flash boolean, + br_features_java boolean, + br_features_director boolean, + br_features_quicktime boolean, + br_features_realplayer boolean, + br_features_windowsmedia boolean, + br_features_gears boolean, + br_features_silverlight boolean, + br_cookies boolean, + br_colordepth character varying(12), + br_viewwidth integer, + br_viewheight integer, + os_name character varying(50), + os_family character varying(50), + os_manufacturer character varying(50), + os_timezone character varying(50), + dvce_type character varying(50), + dvce_ismobile boolean, + dvce_screenwidth integer, + dvce_screenheight integer, + doc_charset character varying(128), + doc_width integer, + doc_height integer, + tr_currency character(3), + tr_total_base numeric(18,2), + tr_tax_base numeric(18,2), + tr_shipping_base numeric(18,2), + ti_currency character(3), + ti_price_base numeric(18,2), + base_currency character(3), + geo_timezone character varying(64), + mkt_clickid character varying(128), + mkt_network character varying(64), + etl_tags character varying(500), + dvce_sent_tstamp timestamp with time zone, + refr_domain_userid character varying(36), + refr_dvce_tstamp timestamp with time zone, + domain_sessionid character(36), + derived_tstamp timestamp with time zone, + event_vendor character varying(1000), + event_name character varying(1000), + event_format character varying(128), + event_version character varying(128), + event_fingerprint character varying(128), + true_tstamp timestamp with time zone +); +ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63 FOR VALUES WITH (modulus 64, remainder 63); + CREATE TABLE abuse_reports ( id integer NOT NULL, reporter_id integer, @@ -21,6 +8756,101 @@ CREATE SEQUENCE abuse_reports_id_seq ALTER SEQUENCE abuse_reports_id_seq OWNED BY abuse_reports.id; +CREATE TABLE alert_management_alert_assignees ( + id bigint NOT NULL, + user_id bigint NOT NULL, + alert_id bigint NOT NULL +); + +CREATE SEQUENCE alert_management_alert_assignees_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE alert_management_alert_assignees_id_seq OWNED BY alert_management_alert_assignees.id; + +CREATE TABLE alert_management_alert_user_mentions ( + id bigint NOT NULL, + alert_management_alert_id bigint NOT NULL, + note_id bigint, + mentioned_users_ids integer[], + mentioned_projects_ids integer[], + mentioned_groups_ids integer[] +); + +CREATE SEQUENCE alert_management_alert_user_mentions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE alert_management_alert_user_mentions_id_seq OWNED BY alert_management_alert_user_mentions.id; + +CREATE TABLE alert_management_alerts ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + started_at timestamp with time zone NOT NULL, + ended_at timestamp with time zone, + events integer DEFAULT 1 NOT NULL, + iid integer NOT NULL, + severity smallint DEFAULT 0 NOT NULL, + status smallint DEFAULT 0 NOT NULL, + fingerprint bytea, + issue_id bigint, + project_id bigint NOT NULL, + title text NOT NULL, + description text, + service text, + monitoring_tool text, + hosts text[] DEFAULT '{}'::text[] NOT NULL, + payload jsonb DEFAULT '{}'::jsonb NOT NULL, + prometheus_alert_id integer, + environment_id integer, + domain smallint DEFAULT 0, + CONSTRAINT check_2df3e2fdc1 CHECK ((char_length(monitoring_tool) <= 100)), + CONSTRAINT check_5e9e57cadb CHECK ((char_length(description) <= 1000)), + CONSTRAINT check_bac14dddde CHECK ((char_length(service) <= 100)), + CONSTRAINT check_d1d1c2d14c CHECK ((char_length(title) <= 200)) +); + +CREATE SEQUENCE alert_management_alerts_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE alert_management_alerts_id_seq OWNED BY alert_management_alerts.id; + +CREATE TABLE alert_management_http_integrations ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + active boolean DEFAULT false NOT NULL, + encrypted_token text NOT NULL, + encrypted_token_iv text NOT NULL, + endpoint_identifier text NOT NULL, + name text NOT NULL, + CONSTRAINT check_286943b636 CHECK ((char_length(encrypted_token_iv) <= 255)), + CONSTRAINT check_392143ccf4 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_e270820180 CHECK ((char_length(endpoint_identifier) <= 255)), + CONSTRAINT check_f68577c4af CHECK ((char_length(encrypted_token) <= 255)) +); + +CREATE SEQUENCE alert_management_http_integrations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE alert_management_http_integrations_id_seq OWNED BY alert_management_http_integrations.id; + CREATE TABLE alerts_service_data ( id bigint NOT NULL, service_id integer NOT NULL, @@ -68,7 +8898,8 @@ CREATE TABLE analytics_cycle_analytics_group_stages ( end_event_label_id bigint, hidden boolean DEFAULT false NOT NULL, custom boolean DEFAULT true NOT NULL, - name character varying(255) NOT NULL + name character varying(255) NOT NULL, + group_value_stream_id bigint NOT NULL ); CREATE SEQUENCE analytics_cycle_analytics_group_stages_id_seq @@ -80,6 +8911,24 @@ CREATE SEQUENCE analytics_cycle_analytics_group_stages_id_seq ALTER SEQUENCE analytics_cycle_analytics_group_stages_id_seq OWNED BY analytics_cycle_analytics_group_stages.id; +CREATE TABLE analytics_cycle_analytics_group_value_streams ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_bc1ed5f1f7 CHECK ((char_length(name) <= 100)) +); + +CREATE SEQUENCE analytics_cycle_analytics_group_value_streams_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE analytics_cycle_analytics_group_value_streams_id_seq OWNED BY analytics_cycle_analytics_group_value_streams.id; + CREATE TABLE analytics_cycle_analytics_project_stages ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -104,64 +8953,90 @@ CREATE SEQUENCE analytics_cycle_analytics_project_stages_id_seq ALTER SEQUENCE analytics_cycle_analytics_project_stages_id_seq OWNED BY analytics_cycle_analytics_project_stages.id; -CREATE TABLE analytics_language_trend_repository_languages ( - file_count integer DEFAULT 0 NOT NULL, - programming_language_id bigint NOT NULL, - project_id bigint NOT NULL, - loc integer DEFAULT 0 NOT NULL, - bytes integer DEFAULT 0 NOT NULL, - percentage smallint DEFAULT 0 NOT NULL, - snapshot_date date NOT NULL +CREATE TABLE analytics_devops_adoption_segment_selections ( + id bigint NOT NULL, + segment_id bigint NOT NULL, + group_id bigint, + project_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT segment_selection_project_id_or_group_id_required CHECK ((((project_id <> NULL::bigint) AND (group_id IS NULL)) OR ((group_id <> NULL::bigint) AND (project_id IS NULL)))) ); -CREATE TABLE analytics_repository_file_commits ( +CREATE SEQUENCE analytics_devops_adoption_segment_selections_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE analytics_devops_adoption_segment_selections_id_seq OWNED BY analytics_devops_adoption_segment_selections.id; + +CREATE TABLE analytics_devops_adoption_segments ( id bigint NOT NULL, - analytics_repository_file_id bigint NOT NULL, - project_id bigint NOT NULL, - committed_date date NOT NULL, - commit_count smallint NOT NULL + name text NOT NULL, + last_recorded_at timestamp with time zone, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_4be7a006fd CHECK ((char_length(name) <= 255)) ); -CREATE SEQUENCE analytics_repository_file_commits_id_seq +CREATE SEQUENCE analytics_devops_adoption_segments_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE analytics_repository_file_commits_id_seq OWNED BY analytics_repository_file_commits.id; +ALTER SEQUENCE analytics_devops_adoption_segments_id_seq OWNED BY analytics_devops_adoption_segments.id; -CREATE TABLE analytics_repository_file_edits ( +CREATE TABLE analytics_devops_adoption_snapshots ( id bigint NOT NULL, - project_id bigint NOT NULL, - analytics_repository_file_id bigint NOT NULL, - committed_date date NOT NULL, - num_edits integer DEFAULT 0 NOT NULL + segment_id bigint NOT NULL, + recorded_at timestamp with time zone NOT NULL, + issue_opened boolean NOT NULL, + merge_request_opened boolean NOT NULL, + merge_request_approved boolean NOT NULL, + runner_configured boolean NOT NULL, + pipeline_succeeded boolean NOT NULL, + deploy_succeeded boolean NOT NULL, + security_scan_succeeded boolean NOT NULL ); -CREATE SEQUENCE analytics_repository_file_edits_id_seq +CREATE SEQUENCE analytics_devops_adoption_snapshots_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE analytics_repository_file_edits_id_seq OWNED BY analytics_repository_file_edits.id; +ALTER SEQUENCE analytics_devops_adoption_snapshots_id_seq OWNED BY analytics_devops_adoption_snapshots.id; -CREATE TABLE analytics_repository_files ( +CREATE TABLE analytics_instance_statistics_measurements ( id bigint NOT NULL, - project_id bigint NOT NULL, - file_path character varying(4096) NOT NULL + count bigint NOT NULL, + recorded_at timestamp with time zone NOT NULL, + identifier smallint NOT NULL ); -CREATE SEQUENCE analytics_repository_files_id_seq +CREATE SEQUENCE analytics_instance_statistics_measurements_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER SEQUENCE analytics_repository_files_id_seq OWNED BY analytics_repository_files.id; +ALTER SEQUENCE analytics_instance_statistics_measurements_id_seq OWNED BY analytics_instance_statistics_measurements.id; + +CREATE TABLE analytics_language_trend_repository_languages ( + file_count integer DEFAULT 0 NOT NULL, + programming_language_id bigint NOT NULL, + project_id bigint NOT NULL, + loc integer DEFAULT 0 NOT NULL, + bytes integer DEFAULT 0 NOT NULL, + percentage smallint DEFAULT 0 NOT NULL, + snapshot_date date NOT NULL +); CREATE TABLE appearances ( id integer NOT NULL, @@ -183,7 +9058,10 @@ CREATE TABLE appearances ( message_background_color text, message_font_color text, email_header_and_footer_enabled boolean DEFAULT false NOT NULL, - updated_by integer + updated_by integer, + profile_image_guidelines text, + profile_image_guidelines_html text, + CONSTRAINT appearances_profile_image_guidelines CHECK ((char_length(profile_image_guidelines) <= 4096)) ); CREATE SEQUENCE appearances_id_seq @@ -228,13 +9106,11 @@ CREATE TABLE application_settings ( max_attachment_size integer DEFAULT 10 NOT NULL, default_project_visibility integer DEFAULT 0 NOT NULL, default_snippet_visibility integer DEFAULT 0 NOT NULL, - domain_whitelist text, user_oauth_applications boolean DEFAULT true, after_sign_out_path character varying, session_expire_delay integer DEFAULT 10080 NOT NULL, import_sources text, help_page_text text, - admin_notification_email character varying, shared_runners_enabled boolean DEFAULT true NOT NULL, max_artifacts_size integer DEFAULT 100 NOT NULL, runners_registration_token character varying, @@ -263,8 +9139,6 @@ CREATE TABLE application_settings ( user_default_external boolean DEFAULT false NOT NULL, repository_storages character varying DEFAULT 'default'::character varying, enabled_git_access_protocol character varying, - domain_blacklist_enabled boolean DEFAULT false, - domain_blacklist text, usage_ping_enabled boolean DEFAULT true NOT NULL, sign_in_text_html text, help_page_text_html text, @@ -328,17 +9202,16 @@ CREATE TABLE application_settings ( enforce_terms boolean DEFAULT false, mirror_available boolean DEFAULT true NOT NULL, hide_third_party_offers boolean DEFAULT false NOT NULL, - instance_statistics_visibility_private boolean DEFAULT false NOT NULL, receive_max_input_size integer, web_ide_clientside_preview_enabled boolean DEFAULT false NOT NULL, user_show_add_ssh_key_message boolean DEFAULT true NOT NULL, outbound_local_requests_whitelist character varying(255)[] DEFAULT '{}'::character varying[] NOT NULL, usage_stats_set_by_user_id integer, - diff_max_patch_bytes integer DEFAULT 102400 NOT NULL, + diff_max_patch_bytes integer DEFAULT 204800 NOT NULL, archive_builds_in_seconds integer, commit_email_hostname character varying, first_day_of_week integer DEFAULT 0 NOT NULL, - protected_ci_variables boolean DEFAULT false NOT NULL, + protected_ci_variables boolean DEFAULT true NOT NULL, runners_registration_token_encrypted character varying, local_markdown_version integer DEFAULT 0 NOT NULL, asset_proxy_enabled boolean DEFAULT false NOT NULL, @@ -358,7 +9231,6 @@ CREATE TABLE application_settings ( elasticsearch_aws_region character varying DEFAULT 'us-east-1'::character varying, elasticsearch_aws_access_key character varying, geo_status_timeout integer DEFAULT 10, - elasticsearch_experimental_indexer boolean, check_namespace_plan boolean DEFAULT false NOT NULL, mirror_max_delay integer DEFAULT 300 NOT NULL, mirror_max_capacity integer DEFAULT 100 NOT NULL, @@ -395,7 +9267,7 @@ CREATE TABLE application_settings ( throttle_protected_paths_enabled boolean DEFAULT false NOT NULL, throttle_protected_paths_requests_per_period integer DEFAULT 10 NOT NULL, throttle_protected_paths_period_in_seconds integer DEFAULT 60 NOT NULL, - protected_paths character varying(255)[] DEFAULT '{/users/password,/users/sign_in,/api/v3/session.json,/api/v3/session,/api/v4/session.json,/api/v4/session,/users,/users/confirmation,/unsubscribes/,/import/github/personal_access_token,/admin/session}'::character varying[], + protected_paths character varying(255)[] DEFAULT '{/users/password,/users/sign_in,/api/v3/session.json,/api/v3/session,/api/v4/session.json,/api/v4/session,/users,/users/confirmation,/unsubscribes/,/import/github/personal_access_token,/admin/session,/oauth/authorize,/oauth/token}'::character varying[], snowplow_collector_hostname character varying, sourcegraph_enabled boolean DEFAULT false NOT NULL, sourcegraph_url character varying(255), @@ -407,7 +9279,6 @@ CREATE TABLE application_settings ( productivity_analytics_start_date timestamp with time zone, push_event_activities_limit integer DEFAULT 3 NOT NULL, custom_http_clone_url_root character varying(511), - snowplow_iglu_registry_url character varying(255), deletion_adjourned_period integer DEFAULT 7 NOT NULL, snowplow_app_id character varying, eks_integration_enabled boolean DEFAULT false NOT NULL, @@ -434,7 +9305,91 @@ CREATE TABLE application_settings ( minimum_password_length integer DEFAULT 8 NOT NULL, updating_name_disabled_for_users boolean DEFAULT false NOT NULL, force_pages_access_control boolean DEFAULT false NOT NULL, - CONSTRAINT check_b4f67a6296 CHECK ((allow_local_requests_from_web_hooks_and_services IS NOT NULL)) + instance_administrators_group_id integer, + disable_overriding_approvers_per_merge_request boolean DEFAULT false NOT NULL, + prevent_merge_requests_author_approval boolean DEFAULT false NOT NULL, + prevent_merge_requests_committers_approval boolean DEFAULT false NOT NULL, + elasticsearch_indexed_field_length_limit integer DEFAULT 0 NOT NULL, + elasticsearch_max_bulk_size_mb smallint DEFAULT 10 NOT NULL, + elasticsearch_max_bulk_concurrency smallint DEFAULT 10 NOT NULL, + email_restrictions_enabled boolean DEFAULT false NOT NULL, + email_restrictions text, + npm_package_requests_forwarding boolean DEFAULT true NOT NULL, + push_rule_id bigint, + issues_create_limit integer DEFAULT 0 NOT NULL, + seat_link_enabled boolean DEFAULT true NOT NULL, + container_expiration_policies_enable_historic_entries boolean DEFAULT false NOT NULL, + group_owners_can_manage_default_branch_protection boolean DEFAULT true NOT NULL, + container_registry_vendor text DEFAULT ''::text NOT NULL, + container_registry_version text DEFAULT ''::text NOT NULL, + container_registry_features text[] DEFAULT '{}'::text[] NOT NULL, + spam_check_endpoint_url text, + spam_check_endpoint_enabled boolean DEFAULT false NOT NULL, + elasticsearch_pause_indexing boolean DEFAULT false NOT NULL, + repository_storages_weighted jsonb DEFAULT '{}'::jsonb NOT NULL, + max_import_size integer DEFAULT 50 NOT NULL, + enforce_pat_expiration boolean DEFAULT true NOT NULL, + compliance_frameworks smallint[] DEFAULT '{}'::smallint[] NOT NULL, + notify_on_unknown_sign_in boolean DEFAULT true NOT NULL, + default_branch_name text, + maintenance_mode boolean DEFAULT false NOT NULL, + maintenance_mode_message text, + project_import_limit integer DEFAULT 6 NOT NULL, + project_export_limit integer DEFAULT 6 NOT NULL, + project_download_export_limit integer DEFAULT 1 NOT NULL, + group_import_limit integer DEFAULT 6 NOT NULL, + group_export_limit integer DEFAULT 6 NOT NULL, + group_download_export_limit integer DEFAULT 1 NOT NULL, + container_registry_delete_tags_service_timeout integer DEFAULT 250 NOT NULL, + wiki_page_max_content_bytes bigint DEFAULT 52428800 NOT NULL, + elasticsearch_indexed_file_size_limit_kb integer DEFAULT 1024 NOT NULL, + enforce_namespace_storage_limit boolean DEFAULT false NOT NULL, + gitpod_enabled boolean DEFAULT false NOT NULL, + gitpod_url text DEFAULT 'https://gitpod.io/'::text, + elasticsearch_client_request_timeout integer DEFAULT 0 NOT NULL, + abuse_notification_email character varying, + kroki_url text, + kroki_enabled boolean DEFAULT false NOT NULL, + help_page_documentation_base_url text, + container_registry_expiration_policies_worker_capacity integer DEFAULT 0 NOT NULL, + require_admin_approval_after_user_signup boolean DEFAULT true NOT NULL, + automatic_purchased_storage_allocation boolean DEFAULT false NOT NULL, + encrypted_ci_jwt_signing_key text, + encrypted_ci_jwt_signing_key_iv text, + elasticsearch_analyzers_smartcn_enabled boolean DEFAULT false NOT NULL, + elasticsearch_analyzers_smartcn_search boolean DEFAULT false NOT NULL, + elasticsearch_analyzers_kuromoji_enabled boolean DEFAULT false NOT NULL, + elasticsearch_analyzers_kuromoji_search boolean DEFAULT false NOT NULL, + new_user_signups_cap integer, + secret_detection_token_revocation_enabled boolean DEFAULT false NOT NULL, + secret_detection_token_revocation_url text, + encrypted_secret_detection_token_revocation_token text, + encrypted_secret_detection_token_revocation_token_iv text, + domain_denylist_enabled boolean DEFAULT false, + domain_denylist text, + domain_allowlist text, + secret_detection_revocation_token_types_url text, + encrypted_cloud_license_auth_token text, + encrypted_cloud_license_auth_token_iv text, + cloud_license_enabled boolean DEFAULT false NOT NULL, + personal_access_token_prefix text, + kroki_formats jsonb DEFAULT '{}'::jsonb NOT NULL, + disable_feed_token boolean DEFAULT false NOT NULL, + CONSTRAINT app_settings_registry_exp_policies_worker_capacity_positive CHECK ((container_registry_expiration_policies_worker_capacity >= 0)), + CONSTRAINT check_17d9558205 CHECK ((char_length(kroki_url) <= 1024)), + CONSTRAINT check_2dba05b802 CHECK ((char_length(gitpod_url) <= 255)), + CONSTRAINT check_51700b31b5 CHECK ((char_length(default_branch_name) <= 255)), + CONSTRAINT check_57123c9593 CHECK ((char_length(help_page_documentation_base_url) <= 255)), + CONSTRAINT check_718b4458ae CHECK ((char_length(personal_access_token_prefix) <= 20)), + CONSTRAINT check_85a39b68ff CHECK ((char_length(encrypted_ci_jwt_signing_key_iv) <= 255)), + CONSTRAINT check_9a719834eb CHECK ((char_length(secret_detection_token_revocation_url) <= 255)), + CONSTRAINT check_9c6c447a13 CHECK ((char_length(maintenance_mode_message) <= 255)), + CONSTRAINT check_a5704163cc CHECK ((char_length(secret_detection_revocation_token_types_url) <= 255)), + CONSTRAINT check_b4f67a6296 CHECK ((allow_local_requests_from_web_hooks_and_services IS NOT NULL)), + CONSTRAINT check_d03919528d CHECK ((char_length(container_registry_vendor) <= 255)), + CONSTRAINT check_d820146492 CHECK ((char_length(spam_check_endpoint_url) <= 255)), + CONSTRAINT check_e5aba18f02 CHECK ((char_length(container_registry_version) <= 255)), + CONSTRAINT check_ef6176834f CHECK ((char_length(encrypted_cloud_license_auth_token_iv) <= 255)) ); CREATE SEQUENCE application_settings_id_seq @@ -468,10 +9423,12 @@ CREATE TABLE approval_merge_request_rules ( updated_at timestamp with time zone NOT NULL, merge_request_id integer NOT NULL, approvals_required smallint DEFAULT 0 NOT NULL, - code_owner boolean DEFAULT false NOT NULL, name character varying NOT NULL, rule_type smallint DEFAULT 1 NOT NULL, - report_type smallint + report_type smallint, + section text, + modified_from_project_rule boolean DEFAULT false NOT NULL, + CONSTRAINT check_6fca5928b2 CHECK ((char_length(section) <= 255)) ); CREATE TABLE approval_merge_request_rules_approved_approvers ( @@ -562,6 +9519,11 @@ CREATE SEQUENCE approval_project_rules_id_seq ALTER SEQUENCE approval_project_rules_id_seq OWNED BY approval_project_rules.id; +CREATE TABLE approval_project_rules_protected_branches ( + approval_project_rule_id bigint NOT NULL, + protected_branch_id bigint NOT NULL +); + CREATE TABLE approval_project_rules_users ( id bigint NOT NULL, approval_project_rule_id bigint NOT NULL, @@ -633,15 +9595,49 @@ CREATE SEQUENCE approvers_id_seq ALTER SEQUENCE approvers_id_seq OWNED BY approvers.id; -CREATE TABLE audit_events ( +CREATE TABLE atlassian_identities ( + user_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + expires_at timestamp with time zone, + extern_uid text NOT NULL, + encrypted_token bytea, + encrypted_token_iv bytea, + encrypted_refresh_token bytea, + encrypted_refresh_token_iv bytea, + CONSTRAINT atlassian_identities_refresh_token_iv_length_constraint CHECK ((octet_length(encrypted_refresh_token_iv) <= 12)), + CONSTRAINT atlassian_identities_refresh_token_length_constraint CHECK ((octet_length(encrypted_refresh_token) <= 512)), + CONSTRAINT atlassian_identities_token_iv_length_constraint CHECK ((octet_length(encrypted_token_iv) <= 12)), + CONSTRAINT atlassian_identities_token_length_constraint CHECK ((octet_length(encrypted_token) <= 2048)), + CONSTRAINT check_32f5779763 CHECK ((char_length(extern_uid) <= 255)) +); + +CREATE SEQUENCE atlassian_identities_user_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE atlassian_identities_user_id_seq OWNED BY atlassian_identities.user_id; + +CREATE TABLE audit_events_archived ( id integer NOT NULL, author_id integer NOT NULL, - type character varying NOT NULL, entity_id integer NOT NULL, entity_type character varying NOT NULL, details text, created_at timestamp without time zone, - updated_at timestamp without time zone + ip_address inet, + author_name text, + target_details text, + entity_path text, + target_type text, + target_id bigint, + CONSTRAINT check_492aaa021d CHECK ((char_length(entity_path) <= 5500)), + CONSTRAINT check_82294106dd CHECK ((char_length(target_type) <= 255)), + CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)), + CONSTRAINT check_d493ec90b5 CHECK ((char_length(target_details) <= 5500)) ); CREATE SEQUENCE audit_events_id_seq @@ -654,6 +9650,27 @@ CREATE SEQUENCE audit_events_id_seq ALTER SEQUENCE audit_events_id_seq OWNED BY audit_events.id; +CREATE TABLE authentication_events ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + user_id bigint, + result smallint NOT NULL, + ip_address inet, + provider text NOT NULL, + user_name text NOT NULL, + CONSTRAINT check_45a6cc4e80 CHECK ((char_length(user_name) <= 255)), + CONSTRAINT check_c64f424630 CHECK ((char_length(provider) <= 64)) +); + +CREATE SEQUENCE authentication_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE authentication_events_id_seq OWNED BY authentication_events.id; + CREATE TABLE award_emoji ( id integer NOT NULL, name character varying, @@ -678,8 +9695,46 @@ CREATE TABLE aws_roles ( user_id integer NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - role_arn character varying(2048) NOT NULL, - role_external_id character varying(64) NOT NULL + role_arn character varying(2048), + role_external_id character varying(64) NOT NULL, + region text, + CONSTRAINT check_57adedab55 CHECK ((char_length(region) <= 255)) +); + +CREATE TABLE background_migration_jobs ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status smallint DEFAULT 0 NOT NULL, + class_name text NOT NULL, + arguments jsonb NOT NULL, + CONSTRAINT check_b0de0a5852 CHECK ((char_length(class_name) <= 200)) +); + +CREATE SEQUENCE background_migration_jobs_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE background_migration_jobs_id_seq OWNED BY background_migration_jobs.id; + +CREATE TABLE backup_labels ( + id integer NOT NULL, + title character varying, + color character varying, + project_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone, + template boolean DEFAULT false, + description character varying, + description_html text, + type character varying, + group_id integer, + cached_markdown_version integer, + restore_action integer, + new_title character varying ); CREATE TABLE badges ( @@ -772,6 +9827,24 @@ CREATE SEQUENCE board_project_recent_visits_id_seq ALTER SEQUENCE board_project_recent_visits_id_seq OWNED BY board_project_recent_visits.id; +CREATE TABLE board_user_preferences ( + id bigint NOT NULL, + user_id bigint NOT NULL, + board_id bigint NOT NULL, + hide_labels boolean, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE board_user_preferences_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE board_user_preferences_id_seq OWNED BY board_user_preferences.id; + CREATE TABLE boards ( id integer NOT NULL, project_id integer, @@ -780,9 +9853,82 @@ CREATE TABLE boards ( group_id integer, milestone_id integer, weight integer, - name character varying DEFAULT 'Development'::character varying NOT NULL + name character varying DEFAULT 'Development'::character varying NOT NULL, + hide_backlog_list boolean DEFAULT false NOT NULL, + hide_closed_list boolean DEFAULT false NOT NULL, + iteration_id bigint +); + +CREATE TABLE boards_epic_board_labels ( + id bigint NOT NULL, + epic_board_id bigint NOT NULL, + label_id bigint NOT NULL +); + +CREATE SEQUENCE boards_epic_board_labels_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE boards_epic_board_labels_id_seq OWNED BY boards_epic_board_labels.id; + +CREATE TABLE boards_epic_board_positions ( + id bigint NOT NULL, + epic_board_id bigint NOT NULL, + epic_id bigint NOT NULL, + relative_position integer, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE boards_epic_board_positions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE boards_epic_board_positions_id_seq OWNED BY boards_epic_board_positions.id; + +CREATE TABLE boards_epic_boards ( + id bigint NOT NULL, + hide_backlog_list boolean DEFAULT false NOT NULL, + hide_closed_list boolean DEFAULT false NOT NULL, + group_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text DEFAULT 'Development'::text NOT NULL, + CONSTRAINT check_bcbbffe601 CHECK ((char_length(name) <= 255)) ); +CREATE SEQUENCE boards_epic_boards_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE boards_epic_boards_id_seq OWNED BY boards_epic_boards.id; + +CREATE TABLE boards_epic_user_preferences ( + id bigint NOT NULL, + board_id bigint NOT NULL, + user_id bigint NOT NULL, + epic_id bigint NOT NULL, + collapsed boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE boards_epic_user_preferences_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE boards_epic_user_preferences_id_seq OWNED BY boards_epic_user_preferences.id; + CREATE SEQUENCE boards_id_seq AS integer START WITH 1 @@ -819,6 +9965,116 @@ CREATE SEQUENCE broadcast_messages_id_seq ALTER SEQUENCE broadcast_messages_id_seq OWNED BY broadcast_messages.id; +CREATE TABLE bulk_import_configurations ( + id bigint NOT NULL, + bulk_import_id integer NOT NULL, + encrypted_url text, + encrypted_url_iv text, + encrypted_access_token text, + encrypted_access_token_iv text, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE bulk_import_configurations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE bulk_import_configurations_id_seq OWNED BY bulk_import_configurations.id; + +CREATE TABLE bulk_import_entities ( + id bigint NOT NULL, + bulk_import_id bigint NOT NULL, + parent_id bigint, + namespace_id bigint, + project_id bigint, + source_type smallint NOT NULL, + source_full_path text NOT NULL, + destination_name text NOT NULL, + destination_namespace text NOT NULL, + status smallint NOT NULL, + jid text, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_13f279f7da CHECK ((char_length(source_full_path) <= 255)), + CONSTRAINT check_715d725ea2 CHECK ((char_length(destination_name) <= 255)), + CONSTRAINT check_796a4d9cc6 CHECK ((char_length(jid) <= 255)), + CONSTRAINT check_b834fff4d9 CHECK ((char_length(destination_namespace) <= 255)) +); + +CREATE SEQUENCE bulk_import_entities_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE bulk_import_entities_id_seq OWNED BY bulk_import_entities.id; + +CREATE TABLE bulk_import_failures ( + id bigint NOT NULL, + bulk_import_entity_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + pipeline_class text NOT NULL, + exception_class text NOT NULL, + exception_message text NOT NULL, + correlation_id_value text, + CONSTRAINT check_053d65c7a4 CHECK ((char_length(pipeline_class) <= 255)), + CONSTRAINT check_6eca8f972e CHECK ((char_length(exception_message) <= 255)), + CONSTRAINT check_c7dba8398e CHECK ((char_length(exception_class) <= 255)), + CONSTRAINT check_e787285882 CHECK ((char_length(correlation_id_value) <= 255)) +); + +CREATE SEQUENCE bulk_import_failures_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE bulk_import_failures_id_seq OWNED BY bulk_import_failures.id; + +CREATE TABLE bulk_import_trackers ( + id bigint NOT NULL, + bulk_import_entity_id bigint NOT NULL, + relation text NOT NULL, + next_page text, + has_next_page boolean DEFAULT false NOT NULL, + CONSTRAINT check_2d45cae629 CHECK ((char_length(relation) <= 255)), + CONSTRAINT check_40aeaa600b CHECK ((char_length(next_page) <= 255)), + CONSTRAINT check_next_page_requirement CHECK (((has_next_page IS FALSE) OR (next_page IS NOT NULL))) +); + +CREATE SEQUENCE bulk_import_trackers_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE bulk_import_trackers_id_seq OWNED BY bulk_import_trackers.id; + +CREATE TABLE bulk_imports ( + id bigint NOT NULL, + user_id integer NOT NULL, + source_type smallint NOT NULL, + status smallint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE bulk_imports_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE bulk_imports_id_seq OWNED BY bulk_imports.id; + CREATE TABLE chat_names ( id integer NOT NULL, user_id integer NOT NULL, @@ -878,12 +10134,49 @@ CREATE SEQUENCE ci_build_needs_id_seq ALTER SEQUENCE ci_build_needs_id_seq OWNED BY ci_build_needs.id; +CREATE TABLE ci_build_pending_states ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + build_id bigint NOT NULL, + state smallint, + failure_reason smallint, + trace_checksum bytea, + trace_bytesize bigint +); + +CREATE SEQUENCE ci_build_pending_states_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_build_pending_states_id_seq OWNED BY ci_build_pending_states.id; + +CREATE TABLE ci_build_report_results ( + build_id bigint NOT NULL, + project_id bigint NOT NULL, + data jsonb DEFAULT '{}'::jsonb NOT NULL +); + +CREATE SEQUENCE ci_build_report_results_build_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_build_report_results_build_id_seq OWNED BY ci_build_report_results.build_id; + CREATE TABLE ci_build_trace_chunks ( id bigint NOT NULL, build_id integer NOT NULL, chunk_index integer NOT NULL, data_store integer NOT NULL, - raw_data bytea + raw_data bytea, + checksum bytea, + lock_version integer DEFAULT 0 NOT NULL ); CREATE SEQUENCE ci_build_trace_chunks_id_seq @@ -957,7 +10250,7 @@ CREATE TABLE ci_builds ( yaml_variables text, queued_at timestamp without time zone, token character varying, - lock_version integer, + lock_version integer DEFAULT 0, coverage_regex character varying, auto_canceled_by_id integer, retried boolean, @@ -995,7 +10288,9 @@ CREATE TABLE ci_builds_metadata ( config_variables jsonb, interruptible boolean, has_exposed_artifacts boolean, - environment_auto_stop_in character varying(255) + environment_auto_stop_in character varying(255), + expanded_environment_name character varying(255), + secrets jsonb DEFAULT '{}'::jsonb NOT NULL ); CREATE SEQUENCE ci_builds_metadata_id_seq @@ -1025,6 +10320,66 @@ CREATE SEQUENCE ci_builds_runner_session_id_seq ALTER SEQUENCE ci_builds_runner_session_id_seq OWNED BY ci_builds_runner_session.id; +CREATE TABLE ci_daily_build_group_report_results ( + id bigint NOT NULL, + date date NOT NULL, + project_id bigint NOT NULL, + last_pipeline_id bigint NOT NULL, + ref_path text NOT NULL, + group_name text NOT NULL, + data jsonb NOT NULL, + default_branch boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE ci_daily_build_group_report_results_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_daily_build_group_report_results_id_seq OWNED BY ci_daily_build_group_report_results.id; + +CREATE TABLE ci_deleted_objects ( + id bigint NOT NULL, + file_store smallint DEFAULT 1 NOT NULL, + pick_up_at timestamp with time zone DEFAULT now() NOT NULL, + store_dir text NOT NULL, + file text NOT NULL, + CONSTRAINT check_5e151d6912 CHECK ((char_length(store_dir) <= 1024)) +); + +CREATE SEQUENCE ci_deleted_objects_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_deleted_objects_id_seq OWNED BY ci_deleted_objects.id; + +CREATE TABLE ci_freeze_periods ( + id bigint NOT NULL, + project_id bigint NOT NULL, + freeze_start text NOT NULL, + freeze_end text NOT NULL, + cron_timezone text NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_4a7939e04e CHECK ((char_length(freeze_end) <= 998)), + CONSTRAINT check_a92607bd2b CHECK ((char_length(freeze_start) <= 998)), + CONSTRAINT check_b14055adc3 CHECK ((char_length(cron_timezone) <= 255)) +); + +CREATE SEQUENCE ci_freeze_periods_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_freeze_periods_id_seq OWNED BY ci_freeze_periods.id; + CREATE TABLE ci_group_variables ( id integer NOT NULL, key character varying NOT NULL, @@ -1050,6 +10405,28 @@ CREATE SEQUENCE ci_group_variables_id_seq ALTER SEQUENCE ci_group_variables_id_seq OWNED BY ci_group_variables.id; +CREATE TABLE ci_instance_variables ( + id bigint NOT NULL, + variable_type smallint DEFAULT 1 NOT NULL, + masked boolean DEFAULT false, + protected boolean DEFAULT false, + key text NOT NULL, + encrypted_value text, + encrypted_value_iv text, + CONSTRAINT check_07a45a5bcb CHECK ((char_length(encrypted_value_iv) <= 255)), + CONSTRAINT check_5aede12208 CHECK ((char_length(key) <= 255)), + CONSTRAINT check_956afd70f1 CHECK ((char_length(encrypted_value) <= 13579)) +); + +CREATE SEQUENCE ci_instance_variables_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_instance_variables_id_seq OWNED BY ci_instance_variables.id; + CREATE TABLE ci_job_artifacts ( id integer NOT NULL, project_id integer NOT NULL, @@ -1060,10 +10437,11 @@ CREATE TABLE ci_job_artifacts ( updated_at timestamp with time zone NOT NULL, expire_at timestamp with time zone, file character varying, - file_store integer, + file_store integer DEFAULT 1, file_sha256 bytea, file_format smallint, - file_location smallint + file_location smallint, + CONSTRAINT check_27f0f6dbab CHECK ((file_store IS NOT NULL)) ); CREATE SEQUENCE ci_job_artifacts_id_seq @@ -1082,7 +10460,8 @@ CREATE TABLE ci_job_variables ( encrypted_value text, encrypted_value_iv character varying, job_id bigint NOT NULL, - variable_type smallint DEFAULT 1 NOT NULL + variable_type smallint DEFAULT 1 NOT NULL, + source smallint DEFAULT 0 NOT NULL ); CREATE SEQUENCE ci_job_variables_id_seq @@ -1094,6 +10473,31 @@ CREATE SEQUENCE ci_job_variables_id_seq ALTER SEQUENCE ci_job_variables_id_seq OWNED BY ci_job_variables.id; +CREATE TABLE ci_pipeline_artifacts ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + pipeline_id bigint NOT NULL, + project_id bigint NOT NULL, + size integer NOT NULL, + file_store smallint DEFAULT 1 NOT NULL, + file_type smallint NOT NULL, + file_format smallint NOT NULL, + file text, + expire_at timestamp with time zone, + CONSTRAINT check_191b5850ec CHECK ((char_length(file) <= 255)), + CONSTRAINT check_abeeb71caf CHECK ((file IS NOT NULL)) +); + +CREATE SEQUENCE ci_pipeline_artifacts_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_pipeline_artifacts_id_seq OWNED BY ci_pipeline_artifacts.id; + CREATE TABLE ci_pipeline_chat_data ( id bigint NOT NULL, pipeline_id integer NOT NULL, @@ -1110,6 +10514,23 @@ CREATE SEQUENCE ci_pipeline_chat_data_id_seq ALTER SEQUENCE ci_pipeline_chat_data_id_seq OWNED BY ci_pipeline_chat_data.id; +CREATE TABLE ci_pipeline_messages ( + id bigint NOT NULL, + severity smallint DEFAULT 0 NOT NULL, + pipeline_id integer NOT NULL, + content text NOT NULL, + CONSTRAINT check_58ca2981b2 CHECK ((char_length(content) <= 10000)) +); + +CREATE SEQUENCE ci_pipeline_messages_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_pipeline_messages_id_seq OWNED BY ci_pipeline_messages.id; + CREATE TABLE ci_pipeline_schedule_variables ( id integer NOT NULL, key character varying NOT NULL, @@ -1194,7 +10615,7 @@ CREATE TABLE ci_pipelines ( finished_at timestamp without time zone, duration integer, user_id integer, - lock_version integer, + lock_version integer DEFAULT 0, auto_canceled_by_id integer, pipeline_schedule_id integer, source integer, @@ -1205,7 +10626,9 @@ CREATE TABLE ci_pipelines ( merge_request_id integer, source_sha bytea, target_sha bytea, - external_pull_request_id bigint + external_pull_request_id bigint, + ci_ref_id bigint, + locked smallint DEFAULT 1 NOT NULL ); CREATE TABLE ci_pipelines_config ( @@ -1232,14 +10655,30 @@ CREATE SEQUENCE ci_pipelines_id_seq ALTER SEQUENCE ci_pipelines_id_seq OWNED BY ci_pipelines.id; +CREATE TABLE ci_platform_metrics ( + id bigint NOT NULL, + recorded_at timestamp with time zone NOT NULL, + platform_target text NOT NULL, + count integer NOT NULL, + CONSTRAINT check_f922abc32b CHECK ((char_length(platform_target) <= 255)), + CONSTRAINT ci_platform_metrics_check_count_positive CHECK ((count > 0)) +); + +CREATE SEQUENCE ci_platform_metrics_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_platform_metrics_id_seq OWNED BY ci_platform_metrics.id; + CREATE TABLE ci_refs ( id bigint NOT NULL, - project_id integer NOT NULL, - lock_version integer DEFAULT 0, - last_updated_by_pipeline_id integer, - tag boolean DEFAULT false NOT NULL, - ref character varying(255) NOT NULL, - status character varying(255) NOT NULL + project_id bigint NOT NULL, + lock_version integer DEFAULT 0 NOT NULL, + status smallint DEFAULT 0 NOT NULL, + ref_path text NOT NULL ); CREATE SEQUENCE ci_refs_id_seq @@ -1339,7 +10778,9 @@ CREATE TABLE ci_runners ( maximum_timeout integer, ip_address character varying, runner_type smallint NOT NULL, - token_encrypted character varying + token_encrypted character varying, + public_projects_minutes_cost_factor double precision DEFAULT 0.0 NOT NULL, + private_projects_minutes_cost_factor double precision DEFAULT 1.0 NOT NULL ); CREATE SEQUENCE ci_runners_id_seq @@ -1371,6 +10812,21 @@ CREATE SEQUENCE ci_sources_pipelines_id_seq ALTER SEQUENCE ci_sources_pipelines_id_seq OWNED BY ci_sources_pipelines.id; +CREATE TABLE ci_sources_projects ( + id bigint NOT NULL, + pipeline_id bigint NOT NULL, + source_project_id bigint NOT NULL +); + +CREATE SEQUENCE ci_sources_projects_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_sources_projects_id_seq OWNED BY ci_sources_projects.id; + CREATE TABLE ci_stages ( id integer NOT NULL, project_id integer, @@ -1379,7 +10835,7 @@ CREATE TABLE ci_stages ( updated_at timestamp without time zone, name character varying, status integer, - lock_version integer, + lock_version integer DEFAULT 0, "position" integer ); @@ -1408,6 +10864,38 @@ CREATE SEQUENCE ci_subscriptions_projects_id_seq ALTER SEQUENCE ci_subscriptions_projects_id_seq OWNED BY ci_subscriptions_projects.id; +CREATE TABLE ci_test_case_failures ( + id bigint NOT NULL, + failed_at timestamp with time zone, + test_case_id bigint NOT NULL, + build_id bigint NOT NULL +); + +CREATE SEQUENCE ci_test_case_failures_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_test_case_failures_id_seq OWNED BY ci_test_case_failures.id; + +CREATE TABLE ci_test_cases ( + id bigint NOT NULL, + project_id bigint NOT NULL, + key_hash text NOT NULL, + CONSTRAINT check_dd3c5d1c15 CHECK ((char_length(key_hash) <= 64)) +); + +CREATE SEQUENCE ci_test_cases_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_test_cases_id_seq OWNED BY ci_test_cases.id; + CREATE TABLE ci_trigger_requests ( id integer NOT NULL, trigger_id integer NOT NULL, @@ -1472,6 +10960,42 @@ CREATE SEQUENCE ci_variables_id_seq ALTER SEQUENCE ci_variables_id_seq OWNED BY ci_variables.id; +CREATE TABLE cluster_agent_tokens ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + agent_id bigint NOT NULL, + token_encrypted text NOT NULL, + CONSTRAINT check_c60daed227 CHECK ((char_length(token_encrypted) <= 255)) +); + +CREATE SEQUENCE cluster_agent_tokens_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE cluster_agent_tokens_id_seq OWNED BY cluster_agent_tokens.id; + +CREATE TABLE cluster_agents ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_3498369510 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE cluster_agents_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE cluster_agents_id_seq OWNED BY cluster_agents.id; + CREATE TABLE cluster_groups ( id integer NOT NULL, cluster_id integer NOT NULL, @@ -1535,7 +11059,6 @@ ALTER SEQUENCE cluster_projects_id_seq OWNED BY cluster_projects.id; CREATE TABLE cluster_providers_aws ( id bigint NOT NULL, cluster_id bigint NOT NULL, - created_by_user_id integer, num_nodes integer NOT NULL, status integer NOT NULL, created_at timestamp with time zone NOT NULL, @@ -1551,7 +11074,9 @@ CREATE TABLE cluster_providers_aws ( encrypted_secret_access_key_iv character varying(255), encrypted_secret_access_key text, session_token text, - status_reason text + status_reason text, + kubernetes_version text DEFAULT '1.14'::text NOT NULL, + CONSTRAINT check_f1f42cd85e CHECK ((char_length(kubernetes_version) <= 30)) ); CREATE SEQUENCE cluster_providers_aws_id_seq @@ -1608,7 +11133,8 @@ CREATE TABLE clusters ( namespace_per_environment boolean DEFAULT true NOT NULL, cleanup_status smallint DEFAULT 1 NOT NULL, cleanup_status_reason text, - management_project_id integer + management_project_id integer, + helm_major_version integer DEFAULT 2 NOT NULL ); CREATE TABLE clusters_applications_cert_managers ( @@ -1632,6 +11158,24 @@ CREATE SEQUENCE clusters_applications_cert_managers_id_seq ALTER SEQUENCE clusters_applications_cert_managers_id_seq OWNED BY clusters_applications_cert_managers.id; +CREATE TABLE clusters_applications_cilium ( + id bigint NOT NULL, + cluster_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status integer NOT NULL, + status_reason text +); + +CREATE SEQUENCE clusters_applications_cilium_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_applications_cilium_id_seq OWNED BY clusters_applications_cilium.id; + CREATE TABLE clusters_applications_crossplane ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -1659,7 +11203,6 @@ CREATE TABLE clusters_applications_elastic_stacks ( cluster_id bigint NOT NULL, status integer NOT NULL, version character varying(255) NOT NULL, - kibana_hostname character varying(255), status_reason text ); @@ -1672,6 +11215,30 @@ CREATE SEQUENCE clusters_applications_elastic_stacks_id_seq ALTER SEQUENCE clusters_applications_elastic_stacks_id_seq OWNED BY clusters_applications_elastic_stacks.id; +CREATE TABLE clusters_applications_fluentd ( + id bigint NOT NULL, + protocol smallint NOT NULL, + status integer NOT NULL, + port integer NOT NULL, + cluster_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + version character varying(255) NOT NULL, + host character varying(255) NOT NULL, + status_reason text, + waf_log_enabled boolean DEFAULT true NOT NULL, + cilium_log_enabled boolean DEFAULT true NOT NULL +); + +CREATE SEQUENCE clusters_applications_fluentd_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE clusters_applications_fluentd_id_seq OWNED BY clusters_applications_fluentd.id; + CREATE TABLE clusters_applications_helm ( id integer NOT NULL, cluster_id integer NOT NULL, @@ -1707,7 +11274,8 @@ CREATE TABLE clusters_applications_ingress ( status_reason text, external_ip character varying, external_hostname character varying, - modsecurity_enabled boolean + modsecurity_enabled boolean, + modsecurity_mode smallint DEFAULT 0 NOT NULL ); CREATE SEQUENCE clusters_applications_ingress_id_seq @@ -1775,7 +11343,8 @@ CREATE TABLE clusters_applications_prometheus ( updated_at timestamp with time zone NOT NULL, encrypted_alert_manager_token character varying, encrypted_alert_manager_token_iv character varying, - last_update_started_at timestamp with time zone + last_update_started_at timestamp with time zone, + healthy boolean ); CREATE SEQUENCE clusters_applications_prometheus_id_seq @@ -1862,16 +11431,40 @@ CREATE SEQUENCE commit_user_mentions_id_seq ALTER SEQUENCE commit_user_mentions_id_seq OWNED BY commit_user_mentions.id; +CREATE TABLE compliance_management_frameworks ( + id bigint NOT NULL, + group_id bigint, + name text NOT NULL, + description text NOT NULL, + color text NOT NULL, + namespace_id integer NOT NULL, + regulated boolean DEFAULT true NOT NULL, + CONSTRAINT check_08cd34b2c2 CHECK ((char_length(color) <= 10)), + CONSTRAINT check_1617e0b87e CHECK ((char_length(description) <= 255)), + CONSTRAINT check_ab00bc2193 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE compliance_management_frameworks_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE compliance_management_frameworks_id_seq OWNED BY compliance_management_frameworks.id; + CREATE TABLE container_expiration_policies ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, next_run_at timestamp with time zone, project_id bigint NOT NULL, - name_regex character varying(255), - cadence character varying(12) DEFAULT '7d'::character varying NOT NULL, - older_than character varying(12), - keep_n integer, - enabled boolean DEFAULT false NOT NULL + name_regex character varying(255) DEFAULT '.*'::character varying, + cadence character varying(12) DEFAULT '1d'::character varying NOT NULL, + older_than character varying(12) DEFAULT '90d'::character varying, + keep_n integer DEFAULT 10, + enabled boolean DEFAULT false NOT NULL, + name_regex_keep text, + CONSTRAINT container_expiration_policies_name_regex_keep CHECK ((char_length(name_regex_keep) <= 255)) ); CREATE TABLE container_repositories ( @@ -1879,7 +11472,10 @@ CREATE TABLE container_repositories ( project_id integer NOT NULL, name character varying NOT NULL, created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL + updated_at timestamp without time zone NOT NULL, + status smallint, + expiration_policy_started_at timestamp with time zone, + expiration_policy_cleanup_status smallint DEFAULT 0 NOT NULL ); CREATE SEQUENCE container_repositories_id_seq @@ -1938,6 +11534,153 @@ CREATE SEQUENCE conversational_development_index_metrics_id_seq ALTER SEQUENCE conversational_development_index_metrics_id_seq OWNED BY conversational_development_index_metrics.id; +CREATE TABLE csv_issue_imports ( + id bigint NOT NULL, + project_id bigint NOT NULL, + user_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE csv_issue_imports_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE csv_issue_imports_id_seq OWNED BY csv_issue_imports.id; + +CREATE TABLE custom_emoji ( + id bigint NOT NULL, + namespace_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text NOT NULL, + file text NOT NULL, + external boolean DEFAULT true NOT NULL, + CONSTRAINT check_8c586dd507 CHECK ((char_length(name) <= 36)), + CONSTRAINT check_dd5d60f1fb CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE custom_emoji_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE custom_emoji_id_seq OWNED BY custom_emoji.id; + +CREATE TABLE dast_scanner_profiles ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id integer NOT NULL, + spider_timeout smallint, + target_timeout smallint, + name text NOT NULL, + scan_type smallint DEFAULT 1 NOT NULL, + use_ajax_spider boolean DEFAULT false NOT NULL, + show_debug_messages boolean DEFAULT false NOT NULL, + CONSTRAINT check_568568fabf CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE dast_scanner_profiles_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_scanner_profiles_id_seq OWNED BY dast_scanner_profiles.id; + +CREATE TABLE dast_site_profiles ( + id bigint NOT NULL, + project_id bigint NOT NULL, + dast_site_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text NOT NULL, + CONSTRAINT check_6cfab17b48 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE dast_site_profiles_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_site_profiles_id_seq OWNED BY dast_site_profiles.id; + +CREATE TABLE dast_site_tokens ( + id bigint NOT NULL, + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + expired_at timestamp with time zone, + token text NOT NULL, + url text NOT NULL, + CONSTRAINT check_02a6bf20a7 CHECK ((char_length(token) <= 255)), + CONSTRAINT check_69ab8622a6 CHECK ((char_length(url) <= 255)) +); + +CREATE SEQUENCE dast_site_tokens_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_site_tokens_id_seq OWNED BY dast_site_tokens.id; + +CREATE TABLE dast_site_validations ( + id bigint NOT NULL, + dast_site_token_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + validation_started_at timestamp with time zone, + validation_passed_at timestamp with time zone, + validation_failed_at timestamp with time zone, + validation_last_retried_at timestamp with time zone, + validation_strategy smallint NOT NULL, + url_base text NOT NULL, + url_path text NOT NULL, + state text DEFAULT 'pending'::text NOT NULL, + CONSTRAINT check_13b34efe4b CHECK ((char_length(url_path) <= 255)), + CONSTRAINT check_283be72e9b CHECK ((char_length(state) <= 255)), + CONSTRAINT check_cd3b538210 CHECK ((char_length(url_base) <= 255)) +); + +CREATE SEQUENCE dast_site_validations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_site_validations_id_seq OWNED BY dast_site_validations.id; + +CREATE TABLE dast_sites ( + id bigint NOT NULL, + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + url text NOT NULL, + dast_site_validation_id bigint, + CONSTRAINT check_46df8b449c CHECK ((char_length(url) <= 255)) +); + +CREATE SEQUENCE dast_sites_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_sites_id_seq OWNED BY dast_sites.id; + CREATE TABLE dependency_proxy_blobs ( id integer NOT NULL, created_at timestamp with time zone NOT NULL, @@ -1977,6 +11720,30 @@ CREATE SEQUENCE dependency_proxy_group_settings_id_seq ALTER SEQUENCE dependency_proxy_group_settings_id_seq OWNED BY dependency_proxy_group_settings.id; +CREATE TABLE dependency_proxy_manifests ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + size bigint, + file_store smallint, + file_name text NOT NULL, + file text NOT NULL, + digest text NOT NULL, + CONSTRAINT check_079b293a7b CHECK ((char_length(file) <= 255)), + CONSTRAINT check_c579e3f586 CHECK ((char_length(file_name) <= 255)), + CONSTRAINT check_f5d9996bf1 CHECK ((char_length(digest) <= 255)) +); + +CREATE SEQUENCE dependency_proxy_manifests_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dependency_proxy_manifests_id_seq OWNED BY dependency_proxy_manifests.id; + CREATE TABLE deploy_keys_projects ( id integer NOT NULL, deploy_key_id integer NOT NULL, @@ -2006,7 +11773,11 @@ CREATE TABLE deploy_tokens ( name character varying NOT NULL, token character varying, username character varying, - token_encrypted character varying(255) + token_encrypted character varying(255), + deploy_token_type smallint DEFAULT 2 NOT NULL, + write_registry boolean DEFAULT false NOT NULL, + read_package_registry boolean DEFAULT false NOT NULL, + write_package_registry boolean DEFAULT false NOT NULL ); CREATE SEQUENCE deploy_tokens_id_seq @@ -2019,9 +11790,16 @@ CREATE SEQUENCE deploy_tokens_id_seq ALTER SEQUENCE deploy_tokens_id_seq OWNED BY deploy_tokens.id; +CREATE TABLE deployment_clusters ( + deployment_id integer NOT NULL, + cluster_id integer NOT NULL, + kubernetes_namespace character varying(255) +); + CREATE TABLE deployment_merge_requests ( deployment_id integer NOT NULL, - merge_request_id integer NOT NULL + merge_request_id integer NOT NULL, + environment_id integer ); CREATE TABLE deployments ( @@ -2077,7 +11855,11 @@ CREATE TABLE design_management_designs ( id bigint NOT NULL, project_id integer NOT NULL, issue_id integer, - filename character varying NOT NULL + filename character varying NOT NULL, + relative_position integer, + iid integer, + CONSTRAINT check_07155e2715 CHECK ((char_length((filename)::text) <= 255)), + CONSTRAINT check_cfb92df01a CHECK ((iid IS NOT NULL)) ); CREATE SEQUENCE design_management_designs_id_seq @@ -2093,9 +11875,19 @@ CREATE TABLE design_management_designs_versions ( design_id bigint NOT NULL, version_id bigint NOT NULL, event smallint DEFAULT 0 NOT NULL, - image_v432x230 character varying(255) + image_v432x230 character varying(255), + id bigint NOT NULL ); +CREATE SEQUENCE design_management_designs_versions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE design_management_designs_versions_id_seq OWNED BY design_management_designs_versions.id; + CREATE TABLE design_management_versions ( id bigint NOT NULL, sha bytea NOT NULL, @@ -2131,6 +11923,30 @@ CREATE SEQUENCE design_user_mentions_id_seq ALTER SEQUENCE design_user_mentions_id_seq OWNED BY design_user_mentions.id; +CREATE TABLE diff_note_positions ( + id bigint NOT NULL, + note_id bigint NOT NULL, + old_line integer, + new_line integer, + diff_content_type smallint NOT NULL, + diff_type smallint NOT NULL, + line_code character varying(255) NOT NULL, + base_sha bytea NOT NULL, + start_sha bytea NOT NULL, + head_sha bytea NOT NULL, + old_path text NOT NULL, + new_path text NOT NULL +); + +CREATE SEQUENCE diff_note_positions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE diff_note_positions_id_seq OWNED BY diff_note_positions.id; + CREATE TABLE draft_notes ( id bigint NOT NULL, merge_request_id integer NOT NULL, @@ -2153,16 +11969,44 @@ CREATE SEQUENCE draft_notes_id_seq ALTER SEQUENCE draft_notes_id_seq OWNED BY draft_notes.id; +CREATE TABLE elastic_reindexing_tasks ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + documents_count integer, + state smallint DEFAULT 0 NOT NULL, + in_progress boolean DEFAULT true NOT NULL, + index_name_from text, + index_name_to text, + elastic_task text, + error_message text, + documents_count_target integer, + delete_original_index_at timestamp with time zone, + CONSTRAINT check_04151aca42 CHECK ((char_length(index_name_from) <= 255)), + CONSTRAINT check_7f64acda8e CHECK ((char_length(error_message) <= 255)), + CONSTRAINT check_85ebff7124 CHECK ((char_length(index_name_to) <= 255)), + CONSTRAINT check_942e5aae53 CHECK ((char_length(elastic_task) <= 255)) +); + +CREATE SEQUENCE elastic_reindexing_tasks_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE elastic_reindexing_tasks_id_seq OWNED BY elastic_reindexing_tasks.id; + CREATE TABLE elasticsearch_indexed_namespaces ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - namespace_id integer + namespace_id integer NOT NULL ); CREATE TABLE elasticsearch_indexed_projects ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - project_id integer + project_id integer NOT NULL ); CREATE TABLE emails ( @@ -2270,7 +12114,7 @@ CREATE TABLE epics ( cached_markdown_version integer, updated_by_id integer, last_edited_by_id integer, - lock_version integer, + lock_version integer DEFAULT 0, start_date date, end_date date, last_edited_at timestamp without time zone, @@ -2293,6 +12137,8 @@ CREATE TABLE epics ( start_date_sourcing_epic_id integer, due_date_sourcing_epic_id integer, state_id smallint DEFAULT 1, + external_key character varying(255), + confidential boolean DEFAULT false NOT NULL, CONSTRAINT check_57ee003890 CHECK ((state_id IS NOT NULL)) ); @@ -2315,7 +12161,9 @@ CREATE TABLE events ( updated_at timestamp with time zone NOT NULL, action smallint NOT NULL, target_type character varying, - group_id bigint + group_id bigint, + fingerprint bytea, + CONSTRAINT check_97e06e05ad CHECK ((octet_length(fingerprint) <= 128)) ); CREATE SEQUENCE events_id_seq @@ -2346,6 +12194,62 @@ CREATE SEQUENCE evidences_id_seq ALTER SEQUENCE evidences_id_seq OWNED BY evidences.id; +CREATE TABLE experiment_subjects ( + id bigint NOT NULL, + experiment_id bigint NOT NULL, + user_id bigint, + group_id bigint, + project_id bigint, + variant smallint DEFAULT 0 NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT chk_has_one_subject CHECK ((num_nonnulls(user_id, group_id, project_id) = 1)) +); + +CREATE SEQUENCE experiment_subjects_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE experiment_subjects_id_seq OWNED BY experiment_subjects.id; + +CREATE TABLE experiment_users ( + id bigint NOT NULL, + experiment_id bigint NOT NULL, + user_id bigint NOT NULL, + group_type smallint DEFAULT 0 NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + converted_at timestamp with time zone, + context jsonb DEFAULT '{}'::jsonb NOT NULL +); + +CREATE SEQUENCE experiment_users_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE experiment_users_id_seq OWNED BY experiment_users.id; + +CREATE TABLE experiments ( + id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_e2dda25ed0 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE experiments_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE experiments_id_seq OWNED BY experiments.id; + CREATE TABLE external_pull_requests ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -2439,24 +12343,6 @@ CREATE SEQUENCE fork_networks_id_seq ALTER SEQUENCE fork_networks_id_seq OWNED BY fork_networks.id; -CREATE TABLE forked_project_links ( - id integer NOT NULL, - forked_to_project_id integer NOT NULL, - forked_from_project_id integer NOT NULL, - created_at timestamp without time zone, - updated_at timestamp without time zone -); - -CREATE SEQUENCE forked_project_links_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE forked_project_links_id_seq OWNED BY forked_project_links.id; - CREATE TABLE geo_cache_invalidation_events ( id bigint NOT NULL, key character varying NOT NULL @@ -2500,7 +12386,8 @@ CREATE TABLE geo_event_log ( job_artifact_deleted_event_id bigint, reset_checksum_event_id bigint, cache_invalidation_event_id bigint, - container_repository_updated_event_id bigint + container_repository_updated_event_id bigint, + geo_event_id integer ); CREATE SEQUENCE geo_event_log_id_seq @@ -2512,6 +12399,23 @@ CREATE SEQUENCE geo_event_log_id_seq ALTER SEQUENCE geo_event_log_id_seq OWNED BY geo_event_log.id; +CREATE TABLE geo_events ( + id bigint NOT NULL, + replicable_name character varying(255) NOT NULL, + event_name character varying(255) NOT NULL, + payload jsonb DEFAULT '{}'::jsonb NOT NULL, + created_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE geo_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE geo_events_id_seq OWNED BY geo_events.id; + CREATE TABLE geo_hashed_storage_attachments_events ( id bigint NOT NULL, project_id integer NOT NULL, @@ -2654,7 +12558,8 @@ CREATE TABLE geo_node_statuses ( design_repositories_count integer, design_repositories_synced_count integer, design_repositories_failed_count integer, - design_repositories_registry_count integer + design_repositories_registry_count integer, + status jsonb DEFAULT '{}'::jsonb NOT NULL ); CREATE SEQUENCE geo_node_statuses_id_seq @@ -2839,7 +12744,8 @@ CREATE TABLE gitlab_subscription_histories ( change_type smallint, gitlab_subscription_id bigint NOT NULL, created_at timestamp with time zone, - trial_starts_on date + trial_starts_on date, + auto_renew boolean ); CREATE SEQUENCE gitlab_subscription_histories_id_seq @@ -2863,7 +12769,10 @@ CREATE TABLE gitlab_subscriptions ( max_seats_used integer DEFAULT 0, seats integer DEFAULT 0, trial boolean DEFAULT false, - trial_starts_on date + trial_starts_on date, + auto_renew boolean, + seats_in_use integer DEFAULT 0 NOT NULL, + seats_owed integer DEFAULT 0 NOT NULL ); CREATE SEQUENCE gitlab_subscriptions_id_seq @@ -2981,6 +12890,66 @@ CREATE TABLE group_deletion_schedules ( marked_for_deletion_on date NOT NULL ); +CREATE TABLE group_deploy_keys ( + id bigint NOT NULL, + user_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + last_used_at timestamp with time zone, + expires_at timestamp with time zone, + key text NOT NULL, + title text, + fingerprint text NOT NULL, + fingerprint_sha256 bytea, + CONSTRAINT check_cc0365908d CHECK ((char_length(title) <= 255)), + CONSTRAINT check_e4526dcf91 CHECK ((char_length(fingerprint) <= 255)), + CONSTRAINT check_f58fa0a0f7 CHECK ((char_length(key) <= 4096)) +); + +CREATE TABLE group_deploy_keys_groups ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + group_deploy_key_id bigint NOT NULL, + can_push boolean DEFAULT false NOT NULL +); + +CREATE SEQUENCE group_deploy_keys_groups_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE group_deploy_keys_groups_id_seq OWNED BY group_deploy_keys_groups.id; + +CREATE SEQUENCE group_deploy_keys_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE group_deploy_keys_id_seq OWNED BY group_deploy_keys.id; + +CREATE TABLE group_deploy_tokens ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + deploy_token_id bigint NOT NULL +); + +CREATE SEQUENCE group_deploy_tokens_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE group_deploy_tokens_id_seq OWNED BY group_deploy_tokens.id; + CREATE TABLE group_group_links ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -3000,12 +12969,42 @@ CREATE SEQUENCE group_group_links_id_seq ALTER SEQUENCE group_group_links_id_seq OWNED BY group_group_links.id; +CREATE TABLE group_import_states ( + group_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status smallint DEFAULT 0 NOT NULL, + jid text, + last_error text, + user_id bigint, + CONSTRAINT check_87b58f6b30 CHECK ((char_length(last_error) <= 255)), + CONSTRAINT check_96558fff96 CHECK ((char_length(jid) <= 100)) +); + +CREATE SEQUENCE group_import_states_group_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE group_import_states_group_id_seq OWNED BY group_import_states.group_id; + +CREATE TABLE group_wiki_repositories ( + shard_id bigint NOT NULL, + group_id bigint NOT NULL, + disk_path text NOT NULL, + CONSTRAINT check_07f1c81806 CHECK ((char_length(disk_path) <= 80)) +); + CREATE TABLE historical_data ( id integer NOT NULL, - date date NOT NULL, + date date, active_user_count integer, created_at timestamp without time zone, - updated_at timestamp without time zone + updated_at timestamp without time zone, + recorded_at timestamp with time zone, + CONSTRAINT check_640e8cf66c CHECK ((recorded_at IS NOT NULL)) ); CREATE SEQUENCE historical_data_id_seq @@ -3061,12 +13060,15 @@ ALTER SEQUENCE import_export_uploads_id_seq OWNED BY import_export_uploads.id; CREATE TABLE import_failures ( id bigint NOT NULL, relation_index integer, - project_id bigint NOT NULL, + project_id bigint, created_at timestamp with time zone NOT NULL, relation_key character varying(64), exception_class character varying(128), correlation_id_value character varying(128), - exception_message character varying(255) + exception_message character varying(255), + retry_count integer, + group_id integer, + source character varying(128) ); CREATE SEQUENCE import_failures_id_seq @@ -3078,6 +13080,84 @@ CREATE SEQUENCE import_failures_id_seq ALTER SEQUENCE import_failures_id_seq OWNED BY import_failures.id; +CREATE TABLE incident_management_oncall_participants ( + id bigint NOT NULL, + oncall_rotation_id bigint NOT NULL, + user_id bigint NOT NULL, + color_palette smallint NOT NULL, + color_weight smallint NOT NULL +); + +CREATE SEQUENCE incident_management_oncall_participants_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE incident_management_oncall_participants_id_seq OWNED BY incident_management_oncall_participants.id; + +CREATE TABLE incident_management_oncall_rotations ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + oncall_schedule_id bigint NOT NULL, + length integer NOT NULL, + length_unit smallint NOT NULL, + starts_at timestamp with time zone NOT NULL, + name text NOT NULL, + CONSTRAINT check_5209fb5d02 CHECK ((char_length(name) <= 200)) +); + +CREATE SEQUENCE incident_management_oncall_rotations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE incident_management_oncall_rotations_id_seq OWNED BY incident_management_oncall_rotations.id; + +CREATE TABLE incident_management_oncall_schedules ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + iid integer NOT NULL, + name text NOT NULL, + description text, + timezone text, + CONSTRAINT check_7ed1fd5aa7 CHECK ((char_length(description) <= 1000)), + CONSTRAINT check_cc77cbb103 CHECK ((char_length(timezone) <= 100)), + CONSTRAINT check_e6ef43a664 CHECK ((char_length(name) <= 200)) +); + +CREATE SEQUENCE incident_management_oncall_schedules_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE incident_management_oncall_schedules_id_seq OWNED BY incident_management_oncall_schedules.id; + +CREATE TABLE incident_management_oncall_shifts ( + id bigint NOT NULL, + rotation_id bigint NOT NULL, + participant_id bigint NOT NULL, + starts_at timestamp with time zone NOT NULL, + ends_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE incident_management_oncall_shifts_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE incident_management_oncall_shifts_id_seq OWNED BY incident_management_oncall_shifts.id; + CREATE TABLE index_statuses ( id integer NOT NULL, project_id integer NOT NULL, @@ -3148,11 +13228,80 @@ CREATE SEQUENCE ip_restrictions_id_seq ALTER SEQUENCE ip_restrictions_id_seq OWNED BY ip_restrictions.id; +CREATE TABLE issuable_metric_images ( + id bigint NOT NULL, + issue_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + file_store smallint, + file text NOT NULL, + url text, + CONSTRAINT check_5b3011e234 CHECK ((char_length(url) <= 255)), + CONSTRAINT check_7ed527062f CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE issuable_metric_images_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE issuable_metric_images_id_seq OWNED BY issuable_metric_images.id; + +CREATE TABLE issuable_severities ( + id bigint NOT NULL, + issue_id bigint NOT NULL, + severity smallint DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE issuable_severities_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE issuable_severities_id_seq OWNED BY issuable_severities.id; + +CREATE TABLE issuable_slas ( + id bigint NOT NULL, + issue_id bigint NOT NULL, + due_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE issuable_slas_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE issuable_slas_id_seq OWNED BY issuable_slas.id; + CREATE TABLE issue_assignees ( user_id integer NOT NULL, issue_id integer NOT NULL ); +CREATE TABLE issue_email_participants ( + id bigint NOT NULL, + issue_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + email text NOT NULL, + CONSTRAINT check_2c321d408d CHECK ((char_length(email) <= 255)) +); + +CREATE SEQUENCE issue_email_participants_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE issue_email_participants_id_seq OWNED BY issue_email_participants.id; + CREATE TABLE issue_links ( id integer NOT NULL, source_id integer NOT NULL, @@ -3192,11 +13341,6 @@ CREATE SEQUENCE issue_metrics_id_seq ALTER SEQUENCE issue_metrics_id_seq OWNED BY issue_metrics.id; -CREATE TABLE issue_milestones ( - issue_id bigint NOT NULL, - milestone_id bigint NOT NULL -); - CREATE TABLE issue_tracker_data ( id bigint NOT NULL, service_id integer NOT NULL, @@ -3246,13 +13390,12 @@ CREATE TABLE issues ( updated_at timestamp without time zone, description text, milestone_id integer, - state character varying, iid integer, updated_by_id integer, confidential boolean DEFAULT false NOT NULL, due_date date, moved_to_id integer, - lock_version integer, + lock_version integer DEFAULT 0, title_html text, description_html text, time_estimate integer, @@ -3267,7 +13410,12 @@ CREATE TABLE issues ( service_desk_reply_to character varying, weight integer, duplicated_to_id integer, - promoted_to_epic_id integer + promoted_to_epic_id integer, + health_status smallint, + sprint_id bigint, + external_key character varying(255), + blocking_issues_count integer DEFAULT 0 NOT NULL, + issue_type smallint DEFAULT 0 NOT NULL ); CREATE SEQUENCE issues_id_seq @@ -3328,6 +13476,36 @@ CREATE SEQUENCE jira_connect_subscriptions_id_seq ALTER SEQUENCE jira_connect_subscriptions_id_seq OWNED BY jira_connect_subscriptions.id; +CREATE TABLE jira_imports ( + id bigint NOT NULL, + project_id bigint NOT NULL, + user_id bigint, + label_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + finished_at timestamp with time zone, + jira_project_xid bigint NOT NULL, + total_issue_count integer DEFAULT 0 NOT NULL, + imported_issues_count integer DEFAULT 0 NOT NULL, + failed_to_import_count integer DEFAULT 0 NOT NULL, + status smallint DEFAULT 0 NOT NULL, + jid character varying(255), + jira_project_key character varying(255) NOT NULL, + jira_project_name character varying(255) NOT NULL, + scheduled_at timestamp with time zone, + error_message text, + CONSTRAINT check_9ed451c5b1 CHECK ((char_length(error_message) <= 1000)) +); + +CREATE SEQUENCE jira_imports_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE jira_imports_id_seq OWNED BY jira_imports.id; + CREATE TABLE jira_tracker_data ( id bigint NOT NULL, service_id integer NOT NULL, @@ -3341,7 +13519,14 @@ CREATE TABLE jira_tracker_data ( encrypted_username_iv character varying, encrypted_password character varying, encrypted_password_iv character varying, - jira_issue_transition_id character varying + jira_issue_transition_id character varying, + project_key text, + issues_enabled boolean DEFAULT false NOT NULL, + deployment_type smallint DEFAULT 0 NOT NULL, + vulnerabilities_issuetype text, + vulnerabilities_enabled boolean DEFAULT false NOT NULL, + CONSTRAINT check_0bf84b76e9 CHECK ((char_length(vulnerabilities_issuetype) <= 255)), + CONSTRAINT check_214cf6a48b CHECK ((char_length(project_key) <= 255)) ); CREATE SEQUENCE jira_tracker_data_id_seq @@ -3364,7 +13549,8 @@ CREATE TABLE keys ( fingerprint character varying, public boolean DEFAULT false NOT NULL, last_used_at timestamp without time zone, - fingerprint_sha256 bytea + fingerprint_sha256 bytea, + expires_at timestamp with time zone ); CREATE SEQUENCE keys_id_seq @@ -3486,7 +13672,8 @@ CREATE TABLE lfs_objects ( created_at timestamp without time zone, updated_at timestamp without time zone, file character varying, - file_store integer + file_store integer DEFAULT 1, + CONSTRAINT check_eecfc5717d CHECK ((file_store IS NOT NULL)) ); CREATE SEQUENCE lfs_objects_id_seq @@ -3564,7 +13751,9 @@ CREATE TABLE lists ( milestone_id integer, user_id integer, max_issue_count integer DEFAULT 0 NOT NULL, - max_issue_weight integer DEFAULT 0 NOT NULL + max_issue_weight integer DEFAULT 0 NOT NULL, + limit_metric character varying(20), + iteration_id bigint ); CREATE SEQUENCE lists_id_seq @@ -3610,7 +13799,8 @@ ALTER SEQUENCE members_id_seq OWNED BY members.id; CREATE TABLE merge_request_assignees ( id integer NOT NULL, user_id integer NOT NULL, - merge_request_id integer NOT NULL + merge_request_id integer NOT NULL, + created_at timestamp with time zone ); CREATE SEQUENCE merge_request_assignees_id_seq @@ -3640,8 +13830,25 @@ CREATE SEQUENCE merge_request_blocks_id_seq ALTER SEQUENCE merge_request_blocks_id_seq OWNED BY merge_request_blocks.id; +CREATE TABLE merge_request_cleanup_schedules ( + merge_request_id bigint NOT NULL, + scheduled_at timestamp with time zone NOT NULL, + completed_at timestamp with time zone, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE merge_request_cleanup_schedules_merge_request_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_cleanup_schedules_merge_request_id_seq OWNED BY merge_request_cleanup_schedules.merge_request_id; + CREATE TABLE merge_request_context_commit_diff_files ( - merge_request_context_commit_id bigint, + merge_request_context_commit_id bigint NOT NULL, sha bytea NOT NULL, relative_order integer NOT NULL, a_mode character varying(255) NOT NULL, @@ -3692,6 +13899,25 @@ CREATE TABLE merge_request_diff_commits ( message text ); +CREATE TABLE merge_request_diff_details ( + merge_request_diff_id bigint NOT NULL, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + verification_retry_count smallint, + verification_checksum bytea, + verification_failure text, + CONSTRAINT check_81429e3622 CHECK ((char_length(verification_failure) <= 255)) +); + +CREATE SEQUENCE merge_request_diff_details_merge_request_diff_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_diff_details_merge_request_diff_id_seq OWNED BY merge_request_diff_details.merge_request_diff_id; + CREATE TABLE merge_request_diff_files ( merge_request_diff_id integer NOT NULL, relative_order integer NOT NULL, @@ -3721,8 +13947,11 @@ CREATE TABLE merge_request_diffs ( start_commit_sha character varying, commits_count integer, external_diff character varying, - external_diff_store integer, - stored_externally boolean + external_diff_store integer DEFAULT 1, + stored_externally boolean, + files_count smallint, + sorted boolean DEFAULT false NOT NULL, + CONSTRAINT check_93ee616ac9 CHECK ((external_diff_store IS NOT NULL)) ); CREATE SEQUENCE merge_request_diffs_id_seq @@ -3753,7 +13982,13 @@ CREATE TABLE merge_request_metrics ( last_commit_at timestamp with time zone, diff_size integer, modified_paths_size integer, - commits_count integer + commits_count integer, + first_approved_at timestamp with time zone, + first_reassigned_at timestamp with time zone, + added_lines integer, + removed_lines integer, + target_project_id integer, + CONSTRAINT check_e03d0900bf CHECK ((target_project_id IS NOT NULL)) ); CREATE SEQUENCE merge_request_metrics_id_seq @@ -3766,11 +14001,22 @@ CREATE SEQUENCE merge_request_metrics_id_seq ALTER SEQUENCE merge_request_metrics_id_seq OWNED BY merge_request_metrics.id; -CREATE TABLE merge_request_milestones ( +CREATE TABLE merge_request_reviewers ( + id bigint NOT NULL, + user_id bigint NOT NULL, merge_request_id bigint NOT NULL, - milestone_id bigint NOT NULL + created_at timestamp with time zone NOT NULL ); +CREATE SEQUENCE merge_request_reviewers_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_reviewers_id_seq OWNED BY merge_request_reviewers.id; + CREATE TABLE merge_request_user_mentions ( id bigint NOT NULL, merge_request_id integer NOT NULL, @@ -3800,7 +14046,6 @@ CREATE TABLE merge_requests ( created_at timestamp without time zone, updated_at timestamp without time zone, milestone_id integer, - state character varying DEFAULT 'opened'::character varying NOT NULL, merge_status character varying DEFAULT 'unchecked'::character varying NOT NULL, target_project_id integer NOT NULL, iid integer, @@ -3813,7 +14058,7 @@ CREATE TABLE merge_requests ( merge_commit_sha character varying, rebase_commit_sha character varying, in_progress_merge_commit_sha character varying, - lock_version integer, + lock_version integer DEFAULT 0, title_html text, description_html text, time_estimate integer, @@ -3829,7 +14074,9 @@ CREATE TABLE merge_requests ( state_id smallint DEFAULT 1 NOT NULL, approvals_before_merge integer, rebase_jid character varying, - squash_commit_sha bytea + squash_commit_sha bytea, + sprint_id bigint, + merge_ref_sha bytea ); CREATE TABLE merge_requests_closing_issues ( @@ -3869,7 +14116,9 @@ CREATE TABLE merge_trains ( updated_at timestamp with time zone NOT NULL, target_project_id integer NOT NULL, target_branch text NOT NULL, - status smallint DEFAULT 0 NOT NULL + status smallint DEFAULT 0 NOT NULL, + merged_at timestamp with time zone, + duration integer ); CREATE SEQUENCE merge_trains_id_seq @@ -3881,6 +14130,45 @@ CREATE SEQUENCE merge_trains_id_seq ALTER SEQUENCE merge_trains_id_seq OWNED BY merge_trains.id; +CREATE TABLE metrics_dashboard_annotations ( + id bigint NOT NULL, + starting_at timestamp with time zone NOT NULL, + ending_at timestamp with time zone, + environment_id bigint, + cluster_id bigint, + dashboard_path character varying(255) NOT NULL, + panel_xid character varying(255), + description text NOT NULL +); + +CREATE SEQUENCE metrics_dashboard_annotations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE metrics_dashboard_annotations_id_seq OWNED BY metrics_dashboard_annotations.id; + +CREATE TABLE metrics_users_starred_dashboards ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + user_id bigint NOT NULL, + dashboard_path text NOT NULL, + CONSTRAINT check_79a84a0f57 CHECK ((char_length(dashboard_path) <= 255)) +); + +CREATE SEQUENCE metrics_users_starred_dashboards_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE metrics_users_starred_dashboards_id_seq OWNED BY metrics_users_starred_dashboards.id; + CREATE TABLE milestone_releases ( milestone_id bigint NOT NULL, release_id bigint NOT NULL @@ -3927,6 +14215,29 @@ CREATE SEQUENCE namespace_aggregation_schedules_namespace_id_seq ALTER SEQUENCE namespace_aggregation_schedules_namespace_id_seq OWNED BY namespace_aggregation_schedules.namespace_id; +CREATE TABLE namespace_limits ( + additional_purchased_storage_size bigint DEFAULT 0 NOT NULL, + additional_purchased_storage_ends_on date, + namespace_id integer NOT NULL, + temporary_storage_increase_ends_on date +); + +CREATE TABLE namespace_onboarding_actions ( + id bigint NOT NULL, + namespace_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + action smallint NOT NULL +); + +CREATE SEQUENCE namespace_onboarding_actions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE namespace_onboarding_actions_id_seq OWNED BY namespace_onboarding_actions.id; + CREATE TABLE namespace_root_storage_statistics ( namespace_id integer NOT NULL, updated_at timestamp with time zone NOT NULL, @@ -3935,7 +14246,10 @@ CREATE TABLE namespace_root_storage_statistics ( wiki_size bigint DEFAULT 0 NOT NULL, build_artifacts_size bigint DEFAULT 0 NOT NULL, storage_size bigint DEFAULT 0 NOT NULL, - packages_size bigint DEFAULT 0 NOT NULL + packages_size bigint DEFAULT 0 NOT NULL, + snippets_size bigint DEFAULT 0 NOT NULL, + pipeline_artifacts_size bigint DEFAULT 0 NOT NULL, + uploads_size bigint DEFAULT 0 NOT NULL ); CREATE SEQUENCE namespace_root_storage_statistics_namespace_id_seq @@ -3948,6 +14262,16 @@ CREATE SEQUENCE namespace_root_storage_statistics_namespace_id_seq ALTER SEQUENCE namespace_root_storage_statistics_namespace_id_seq OWNED BY namespace_root_storage_statistics.namespace_id; +CREATE TABLE namespace_settings ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + namespace_id integer NOT NULL, + prevent_forking_outside_group boolean DEFAULT false NOT NULL, + allow_mfa_for_subgroups boolean DEFAULT true NOT NULL, + default_branch_name text, + CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255)) +); + CREATE TABLE namespace_statistics ( id integer NOT NULL, namespace_id integer NOT NULL, @@ -3994,11 +14318,9 @@ CREATE TABLE namespaces ( ldap_sync_last_successful_update_at timestamp without time zone, ldap_sync_last_sync_at timestamp without time zone, ldap_sync_last_update_at timestamp without time zone, - plan_id integer, repository_size_limit bigint, saml_discovery_token character varying, shared_runners_minutes_limit integer, - trial_ends_on timestamp with time zone, extra_shared_runners_minutes_limit integer, ldap_sync_status character varying DEFAULT 'ready'::character varying NOT NULL, membership_lock boolean DEFAULT false, @@ -4008,7 +14330,15 @@ CREATE TABLE namespaces ( emails_disabled boolean, max_pages_size integer, max_artifacts_size integer, - mentions_disabled boolean + mentions_disabled boolean, + default_branch_protection smallint, + unlock_membership_to_ldap boolean, + max_personal_access_token_lifetime integer, + push_rule_id bigint, + shared_runners_enabled boolean DEFAULT true NOT NULL, + allow_descendants_override_disabled_shared_runners boolean DEFAULT false NOT NULL, + traversal_ids integer[] DEFAULT '{}'::integer[] NOT NULL, + delayed_project_removal boolean DEFAULT false NOT NULL ); CREATE SEQUENCE namespaces_id_seq @@ -4069,7 +14399,8 @@ CREATE TABLE notes ( cached_markdown_version integer, change_position text, resolved_by_push boolean, - review_id bigint + review_id bigint, + confidential boolean ); CREATE SEQUENCE notes_id_seq @@ -4107,7 +14438,9 @@ CREATE TABLE notification_settings ( notification_email character varying, new_epic boolean, new_release boolean, - fixed_pipeline boolean + fixed_pipeline boolean, + moved_project boolean DEFAULT true NOT NULL, + change_reviewer_merge_request boolean ); CREATE SEQUENCE notification_settings_id_seq @@ -4129,7 +14462,11 @@ CREATE TABLE oauth_access_grants ( redirect_uri text NOT NULL, created_at timestamp without time zone NOT NULL, revoked_at timestamp without time zone, - scopes character varying + scopes character varying, + code_challenge text, + code_challenge_method text, + CONSTRAINT oauth_access_grants_code_challenge CHECK ((char_length(code_challenge) <= 128)), + CONSTRAINT oauth_access_grants_code_challenge_method CHECK ((char_length(code_challenge_method) <= 5)) ); CREATE SEQUENCE oauth_access_grants_id_seq @@ -4205,6 +14542,30 @@ CREATE SEQUENCE oauth_openid_requests_id_seq ALTER SEQUENCE oauth_openid_requests_id_seq OWNED BY oauth_openid_requests.id; +CREATE TABLE open_project_tracker_data ( + id bigint NOT NULL, + service_id integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + encrypted_url character varying(255), + encrypted_url_iv character varying(255), + encrypted_api_url character varying(255), + encrypted_api_url_iv character varying(255), + encrypted_token character varying(255), + encrypted_token_iv character varying(255), + closed_status_id character varying(5), + project_identifier_code character varying(100) +); + +CREATE SEQUENCE open_project_tracker_data_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE open_project_tracker_data_id_seq OWNED BY open_project_tracker_data.id; + CREATE TABLE operations_feature_flag_scopes ( id bigint NOT NULL, feature_flag_id bigint NOT NULL, @@ -4231,7 +14592,9 @@ CREATE TABLE operations_feature_flags ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, name character varying NOT NULL, - description text + description text, + iid integer NOT NULL, + version smallint DEFAULT 1 NOT NULL ); CREATE TABLE operations_feature_flags_clients ( @@ -4258,6 +14621,86 @@ CREATE SEQUENCE operations_feature_flags_id_seq ALTER SEQUENCE operations_feature_flags_id_seq OWNED BY operations_feature_flags.id; +CREATE TABLE operations_feature_flags_issues ( + id bigint NOT NULL, + feature_flag_id bigint NOT NULL, + issue_id bigint NOT NULL +); + +CREATE SEQUENCE operations_feature_flags_issues_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_feature_flags_issues_id_seq OWNED BY operations_feature_flags_issues.id; + +CREATE TABLE operations_scopes ( + id bigint NOT NULL, + strategy_id bigint NOT NULL, + environment_scope character varying(255) NOT NULL +); + +CREATE SEQUENCE operations_scopes_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_scopes_id_seq OWNED BY operations_scopes.id; + +CREATE TABLE operations_strategies ( + id bigint NOT NULL, + feature_flag_id bigint NOT NULL, + name character varying(255) NOT NULL, + parameters jsonb DEFAULT '{}'::jsonb NOT NULL +); + +CREATE SEQUENCE operations_strategies_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_strategies_id_seq OWNED BY operations_strategies.id; + +CREATE TABLE operations_strategies_user_lists ( + id bigint NOT NULL, + strategy_id bigint NOT NULL, + user_list_id bigint NOT NULL +); + +CREATE SEQUENCE operations_strategies_user_lists_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_strategies_user_lists_id_seq OWNED BY operations_strategies_user_lists.id; + +CREATE TABLE operations_user_lists ( + id bigint NOT NULL, + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + iid integer NOT NULL, + name character varying(255) NOT NULL, + user_xids text DEFAULT ''::text NOT NULL +); + +CREATE SEQUENCE operations_user_lists_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE operations_user_lists_id_seq OWNED BY operations_user_lists.id; + CREATE TABLE packages_build_infos ( id bigint NOT NULL, package_id integer NOT NULL, @@ -4273,6 +14716,13 @@ CREATE SEQUENCE packages_build_infos_id_seq ALTER SEQUENCE packages_build_infos_id_seq OWNED BY packages_build_infos.id; +CREATE TABLE packages_composer_metadata ( + package_id bigint NOT NULL, + target_sha bytea NOT NULL, + composer_json jsonb DEFAULT '{}'::jsonb NOT NULL, + version_cache_sha bytea +); + CREATE TABLE packages_conan_file_metadata ( id bigint NOT NULL, package_file_id bigint NOT NULL, @@ -4311,6 +14761,237 @@ CREATE SEQUENCE packages_conan_metadata_id_seq ALTER SEQUENCE packages_conan_metadata_id_seq OWNED BY packages_conan_metadata.id; +CREATE TABLE packages_debian_file_metadata ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + package_file_id bigint NOT NULL, + file_type smallint NOT NULL, + component text, + architecture text, + fields jsonb, + CONSTRAINT check_2ebedda4b6 CHECK ((char_length(component) <= 255)), + CONSTRAINT check_e6e1fffcca CHECK ((char_length(architecture) <= 255)) +); + +CREATE TABLE packages_debian_group_architectures ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + distribution_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_ddb220164a CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE packages_debian_group_architectures_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_group_architectures_id_seq OWNED BY packages_debian_group_architectures.id; + +CREATE TABLE packages_debian_group_component_files ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + component_id bigint NOT NULL, + architecture_id bigint, + size integer NOT NULL, + file_type smallint NOT NULL, + compression_type smallint, + file_store smallint DEFAULT 1 NOT NULL, + file text NOT NULL, + file_md5 bytea NOT NULL, + file_sha256 bytea NOT NULL, + CONSTRAINT check_839e1685bc CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE packages_debian_group_component_files_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_group_component_files_id_seq OWNED BY packages_debian_group_component_files.id; + +CREATE TABLE packages_debian_group_components ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + distribution_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_a9bc7d85be CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE packages_debian_group_components_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_group_components_id_seq OWNED BY packages_debian_group_components.id; + +CREATE TABLE packages_debian_group_distributions ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + group_id bigint NOT NULL, + creator_id bigint, + valid_time_duration_seconds integer, + file_store smallint DEFAULT 1 NOT NULL, + automatic boolean DEFAULT true NOT NULL, + automatic_upgrades boolean DEFAULT false NOT NULL, + codename text NOT NULL, + suite text, + origin text, + label text, + version text, + description text, + encrypted_signing_keys text, + encrypted_signing_keys_iv text, + file text, + file_signature text, + CONSTRAINT check_310ac457b8 CHECK ((char_length(description) <= 255)), + CONSTRAINT check_3d6f87fc31 CHECK ((char_length(file_signature) <= 4096)), + CONSTRAINT check_3fdadf4a0c CHECK ((char_length(version) <= 255)), + CONSTRAINT check_590e18405a CHECK ((char_length(codename) <= 255)), + CONSTRAINT check_9b90bc0f07 CHECK ((char_length(encrypted_signing_keys_iv) <= 255)), + CONSTRAINT check_b057cd840a CHECK ((char_length(origin) <= 255)), + CONSTRAINT check_b811ec1218 CHECK ((char_length(encrypted_signing_keys) <= 2048)), + CONSTRAINT check_be5ed8d307 CHECK ((char_length(file) <= 255)), + CONSTRAINT check_d3244bfc0b CHECK ((char_length(label) <= 255)), + CONSTRAINT check_e7c928a24b CHECK ((char_length(suite) <= 255)) +); + +CREATE SEQUENCE packages_debian_group_distributions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_group_distributions_id_seq OWNED BY packages_debian_group_distributions.id; + +CREATE TABLE packages_debian_project_architectures ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + distribution_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_9c2e1c99d8 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE packages_debian_project_architectures_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_project_architectures_id_seq OWNED BY packages_debian_project_architectures.id; + +CREATE TABLE packages_debian_project_component_files ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + component_id bigint NOT NULL, + architecture_id bigint, + size integer NOT NULL, + file_type smallint NOT NULL, + compression_type smallint, + file_store smallint DEFAULT 1 NOT NULL, + file text NOT NULL, + file_md5 bytea NOT NULL, + file_sha256 bytea NOT NULL, + CONSTRAINT check_e5af03fa2d CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE packages_debian_project_component_files_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_project_component_files_id_seq OWNED BY packages_debian_project_component_files.id; + +CREATE TABLE packages_debian_project_components ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + distribution_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_517559f298 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE packages_debian_project_components_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_project_components_id_seq OWNED BY packages_debian_project_components.id; + +CREATE TABLE packages_debian_project_distributions ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + creator_id bigint, + valid_time_duration_seconds integer, + file_store smallint DEFAULT 1 NOT NULL, + automatic boolean DEFAULT true NOT NULL, + automatic_upgrades boolean DEFAULT false NOT NULL, + codename text NOT NULL, + suite text, + origin text, + label text, + version text, + description text, + encrypted_signing_keys text, + encrypted_signing_keys_iv text, + file text, + file_signature text, + CONSTRAINT check_6177ccd4a6 CHECK ((char_length(origin) <= 255)), + CONSTRAINT check_6f6b55a4c4 CHECK ((char_length(label) <= 255)), + CONSTRAINT check_834dabadb6 CHECK ((char_length(codename) <= 255)), + CONSTRAINT check_96965792c2 CHECK ((char_length(version) <= 255)), + CONSTRAINT check_a56ae58a17 CHECK ((char_length(suite) <= 255)), + CONSTRAINT check_a5a2ac6af2 CHECK ((char_length(file_signature) <= 4096)), + CONSTRAINT check_b93154339f CHECK ((char_length(description) <= 255)), + CONSTRAINT check_c25603a25b CHECK ((char_length(encrypted_signing_keys) <= 2048)), + CONSTRAINT check_cb4ac9599e CHECK ((char_length(file) <= 255)), + CONSTRAINT check_d488f8cce3 CHECK ((char_length(encrypted_signing_keys_iv) <= 255)) +); + +CREATE SEQUENCE packages_debian_project_distributions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_project_distributions_id_seq OWNED BY packages_debian_project_distributions.id; + +CREATE TABLE packages_debian_publications ( + id bigint NOT NULL, + package_id bigint NOT NULL, + distribution_id bigint NOT NULL +); + +CREATE SEQUENCE packages_debian_publications_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_debian_publications_id_seq OWNED BY packages_debian_publications.id; + CREATE TABLE packages_dependencies ( id bigint NOT NULL, name character varying(255) NOT NULL, @@ -4342,6 +15023,25 @@ CREATE SEQUENCE packages_dependency_links_id_seq ALTER SEQUENCE packages_dependency_links_id_seq OWNED BY packages_dependency_links.id; +CREATE TABLE packages_events ( + id bigint NOT NULL, + event_type smallint NOT NULL, + event_scope smallint NOT NULL, + originator_type smallint NOT NULL, + originator bigint, + created_at timestamp with time zone NOT NULL, + package_id bigint +); + +CREATE SEQUENCE packages_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_events_id_seq OWNED BY packages_events.id; + CREATE TABLE packages_maven_metadata ( id bigint NOT NULL, package_id bigint NOT NULL, @@ -4362,18 +15062,57 @@ CREATE SEQUENCE packages_maven_metadata_id_seq ALTER SEQUENCE packages_maven_metadata_id_seq OWNED BY packages_maven_metadata.id; +CREATE TABLE packages_nuget_dependency_link_metadata ( + dependency_link_id bigint NOT NULL, + target_framework text NOT NULL, + CONSTRAINT packages_nuget_dependency_link_metadata_target_framework_constr CHECK ((char_length(target_framework) <= 255)) +); + +CREATE TABLE packages_nuget_metadata ( + package_id bigint NOT NULL, + license_url text, + project_url text, + icon_url text, + CONSTRAINT packages_nuget_metadata_icon_url_constraint CHECK ((char_length(icon_url) <= 255)), + CONSTRAINT packages_nuget_metadata_license_url_constraint CHECK ((char_length(license_url) <= 255)), + CONSTRAINT packages_nuget_metadata_project_url_constraint CHECK ((char_length(project_url) <= 255)) +); + +CREATE TABLE packages_package_file_build_infos ( + id bigint NOT NULL, + package_file_id bigint NOT NULL, + pipeline_id bigint +); + +CREATE SEQUENCE packages_package_file_build_infos_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_package_file_build_infos_id_seq OWNED BY packages_package_file_build_infos.id; + CREATE TABLE packages_package_files ( id bigint NOT NULL, package_id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, size bigint, - file_type integer, - file_store integer, + file_store integer DEFAULT 1, file_md5 bytea, file_sha1 bytea, file_name character varying NOT NULL, - file text NOT NULL + file text NOT NULL, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + verification_failure character varying(255), + verification_retry_count integer, + file_sha256 bytea, + verification_checksum bytea, + verification_state smallint DEFAULT 0 NOT NULL, + verification_started_at timestamp with time zone, + CONSTRAINT check_4c5e6bb0b3 CHECK ((file_store IS NOT NULL)) ); CREATE SEQUENCE packages_package_files_id_seq @@ -4392,7 +15131,8 @@ CREATE TABLE packages_packages ( updated_at timestamp with time zone NOT NULL, name character varying NOT NULL, version character varying, - package_type smallint NOT NULL + package_type smallint NOT NULL, + creator_id integer ); CREATE SEQUENCE packages_packages_id_seq @@ -4404,10 +15144,19 @@ CREATE SEQUENCE packages_packages_id_seq ALTER SEQUENCE packages_packages_id_seq OWNED BY packages_packages.id; +CREATE TABLE packages_pypi_metadata ( + package_id bigint NOT NULL, + required_python text, + CONSTRAINT check_0d9aed55b2 CHECK ((required_python IS NOT NULL)), + CONSTRAINT check_379019d5da CHECK ((char_length(required_python) <= 255)) +); + CREATE TABLE packages_tags ( id bigint NOT NULL, package_id integer NOT NULL, - name character varying(255) NOT NULL + name character varying(255) NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL ); CREATE SEQUENCE packages_tags_id_seq @@ -4419,6 +15168,29 @@ CREATE SEQUENCE packages_tags_id_seq ALTER SEQUENCE packages_tags_id_seq OWNED BY packages_tags.id; +CREATE TABLE pages_deployments ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + ci_build_id bigint, + file_store smallint NOT NULL, + size integer NOT NULL, + file text NOT NULL, + file_count integer NOT NULL, + file_sha256 bytea NOT NULL, + CONSTRAINT check_f0fe8032dd CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE pages_deployments_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE pages_deployments_id_seq OWNED BY pages_deployments.id; + CREATE TABLE pages_domain_acme_orders ( id bigint NOT NULL, pages_domain_id integer NOT NULL, @@ -4458,7 +15230,10 @@ CREATE TABLE pages_domains ( certificate_valid_not_after timestamp with time zone, certificate_source smallint DEFAULT 0 NOT NULL, wildcard boolean DEFAULT false NOT NULL, - domain_type smallint DEFAULT 2 NOT NULL + usage smallint DEFAULT 0 NOT NULL, + scope smallint DEFAULT 2, + auto_ssl_failed boolean DEFAULT false NOT NULL, + CONSTRAINT check_ab7cf26a46 CHECK ((scope IS NOT NULL)) ); CREATE SEQUENCE pages_domains_id_seq @@ -4471,6 +15246,28 @@ CREATE SEQUENCE pages_domains_id_seq ALTER SEQUENCE pages_domains_id_seq OWNED BY pages_domains.id; +CREATE TABLE partitioned_foreign_keys ( + id bigint NOT NULL, + cascade_delete boolean DEFAULT true NOT NULL, + from_table text NOT NULL, + from_column text NOT NULL, + to_table text NOT NULL, + to_column text NOT NULL, + CONSTRAINT check_2c2e02a62b CHECK ((char_length(from_column) <= 63)), + CONSTRAINT check_40738efb57 CHECK ((char_length(to_table) <= 63)), + CONSTRAINT check_741676d405 CHECK ((char_length(from_table) <= 63)), + CONSTRAINT check_7e98be694f CHECK ((char_length(to_column) <= 63)) +); + +CREATE SEQUENCE partitioned_foreign_keys_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE partitioned_foreign_keys_id_seq OWNED BY partitioned_foreign_keys.id; + CREATE TABLE path_locks ( id integer NOT NULL, path character varying NOT NULL, @@ -4502,7 +15299,9 @@ CREATE TABLE personal_access_tokens ( '::character varying NOT NULL, impersonation boolean DEFAULT false NOT NULL, token_digest character varying, - expire_notification_delivered boolean DEFAULT false NOT NULL + expire_notification_delivered boolean DEFAULT false NOT NULL, + last_used_at timestamp with time zone, + after_expiry_notification_delivered boolean DEFAULT false NOT NULL ); CREATE SEQUENCE personal_access_tokens_id_seq @@ -4521,7 +15320,53 @@ CREATE TABLE plan_limits ( ci_pipeline_size integer DEFAULT 0 NOT NULL, ci_active_jobs integer DEFAULT 0 NOT NULL, id bigint NOT NULL, - project_hooks integer DEFAULT 0 NOT NULL + project_hooks integer DEFAULT 100 NOT NULL, + group_hooks integer DEFAULT 50 NOT NULL, + ci_project_subscriptions integer DEFAULT 2 NOT NULL, + ci_pipeline_schedules integer DEFAULT 10 NOT NULL, + offset_pagination_limit integer DEFAULT 50000 NOT NULL, + ci_instance_level_variables integer DEFAULT 25 NOT NULL, + ci_max_artifact_size_lsif integer DEFAULT 100 NOT NULL, + ci_max_artifact_size_archive integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_metadata integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_trace integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_junit integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_sast integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_dependency_scanning integer DEFAULT 350 NOT NULL, + ci_max_artifact_size_container_scanning integer DEFAULT 150 NOT NULL, + ci_max_artifact_size_dast integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_codequality integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_license_management integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_license_scanning integer DEFAULT 100 NOT NULL, + ci_max_artifact_size_performance integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_metrics integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_metrics_referee integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_network_referee integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_dotenv integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_cobertura integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_terraform integer DEFAULT 5 NOT NULL, + ci_max_artifact_size_accessibility integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_cluster_applications integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_secret_detection integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_requirements integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_coverage_fuzzing integer DEFAULT 0 NOT NULL, + storage_size_limit integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_browser_performance integer DEFAULT 0 NOT NULL, + ci_max_artifact_size_load_performance integer DEFAULT 0 NOT NULL, + ci_needs_size_limit integer DEFAULT 50 NOT NULL, + conan_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, + maven_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, + npm_max_file_size bigint DEFAULT 524288000 NOT NULL, + nuget_max_file_size bigint DEFAULT 524288000 NOT NULL, + pypi_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, + generic_packages_max_file_size bigint DEFAULT '5368709120'::bigint NOT NULL, + project_feature_flags integer DEFAULT 200 NOT NULL, + golang_max_file_size bigint DEFAULT 104857600 NOT NULL, + debian_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, + ci_max_artifact_size_api_fuzzing integer DEFAULT 0 NOT NULL, + daily_invites integer DEFAULT 0 NOT NULL, + ci_pipeline_deployments integer DEFAULT 500 NOT NULL, + pull_mirror_interval_seconds integer DEFAULT 300 NOT NULL ); CREATE SEQUENCE plan_limits_id_seq @@ -4568,6 +15413,200 @@ CREATE SEQUENCE pool_repositories_id_seq ALTER SEQUENCE pool_repositories_id_seq OWNED BY pool_repositories.id; +CREATE VIEW postgres_index_bloat_estimates AS + SELECT (((relation_stats.nspname)::text || '.'::text) || (relation_stats.idxname)::text) AS identifier, + ( + CASE + WHEN ((relation_stats.relpages)::double precision > relation_stats.est_pages_ff) THEN ((relation_stats.bs)::double precision * ((relation_stats.relpages)::double precision - relation_stats.est_pages_ff)) + ELSE (0)::double precision + END)::bigint AS bloat_size_bytes + FROM ( SELECT COALESCE(((1)::double precision + ceil((rows_hdr_pdg_stats.reltuples / floor((((((rows_hdr_pdg_stats.bs - (rows_hdr_pdg_stats.pageopqdata)::numeric) - (rows_hdr_pdg_stats.pagehdr)::numeric) * (rows_hdr_pdg_stats.fillfactor)::numeric))::double precision / ((100)::double precision * (((4)::numeric + rows_hdr_pdg_stats.nulldatahdrwidth))::double precision)))))), (0)::double precision) AS est_pages_ff, + rows_hdr_pdg_stats.bs, + rows_hdr_pdg_stats.nspname, + rows_hdr_pdg_stats.tblname, + rows_hdr_pdg_stats.idxname, + rows_hdr_pdg_stats.relpages, + rows_hdr_pdg_stats.is_na + FROM ( SELECT rows_data_stats.maxalign, + rows_data_stats.bs, + rows_data_stats.nspname, + rows_data_stats.tblname, + rows_data_stats.idxname, + rows_data_stats.reltuples, + rows_data_stats.relpages, + rows_data_stats.idxoid, + rows_data_stats.fillfactor, + (((((((rows_data_stats.index_tuple_hdr_bm + rows_data_stats.maxalign) - + CASE + WHEN ((rows_data_stats.index_tuple_hdr_bm % rows_data_stats.maxalign) = 0) THEN rows_data_stats.maxalign + ELSE (rows_data_stats.index_tuple_hdr_bm % rows_data_stats.maxalign) + END))::double precision + rows_data_stats.nulldatawidth) + (rows_data_stats.maxalign)::double precision) - ( + CASE + WHEN (rows_data_stats.nulldatawidth = (0)::double precision) THEN 0 + WHEN (((rows_data_stats.nulldatawidth)::integer % rows_data_stats.maxalign) = 0) THEN rows_data_stats.maxalign + ELSE ((rows_data_stats.nulldatawidth)::integer % rows_data_stats.maxalign) + END)::double precision))::numeric AS nulldatahdrwidth, + rows_data_stats.pagehdr, + rows_data_stats.pageopqdata, + rows_data_stats.is_na + FROM ( SELECT n.nspname, + i.tblname, + i.idxname, + i.reltuples, + i.relpages, + i.idxoid, + i.fillfactor, + (current_setting('block_size'::text))::numeric AS bs, + CASE + WHEN ((version() ~ 'mingw32'::text) OR (version() ~ '64-bit|x86_64|ppc64|ia64|amd64'::text)) THEN 8 + ELSE 4 + END AS maxalign, + 24 AS pagehdr, + 16 AS pageopqdata, + CASE + WHEN (max(COALESCE(s.null_frac, (0)::real)) = (0)::double precision) THEN 2 + ELSE (2 + (((32 + 8) - 1) / 8)) + END AS index_tuple_hdr_bm, + sum((((1)::double precision - COALESCE(s.null_frac, (0)::real)) * (COALESCE(s.avg_width, 1024))::double precision)) AS nulldatawidth, + (max( + CASE + WHEN (i.atttypid = ('name'::regtype)::oid) THEN 1 + ELSE 0 + END) > 0) AS is_na + FROM ((( SELECT ct.relname AS tblname, + ct.relnamespace, + ic.idxname, + ic.attpos, + ic.indkey, + ic.indkey[ic.attpos] AS indkey, + ic.reltuples, + ic.relpages, + ic.tbloid, + ic.idxoid, + ic.fillfactor, + COALESCE(a1.attnum, a2.attnum) AS attnum, + COALESCE(a1.attname, a2.attname) AS attname, + COALESCE(a1.atttypid, a2.atttypid) AS atttypid, +CASE + WHEN (a1.attnum IS NULL) THEN ic.idxname + ELSE ct.relname +END AS attrelname + FROM (((( SELECT idx_data.idxname, + idx_data.reltuples, + idx_data.relpages, + idx_data.tbloid, + idx_data.idxoid, + idx_data.fillfactor, + idx_data.indkey, + generate_series(1, (idx_data.indnatts)::integer) AS attpos + FROM ( SELECT ci.relname AS idxname, + ci.reltuples, + ci.relpages, + i_1.indrelid AS tbloid, + i_1.indexrelid AS idxoid, + COALESCE((("substring"(array_to_string(ci.reloptions, ' '::text), 'fillfactor=([0-9]+)'::text))::smallint)::integer, 90) AS fillfactor, + i_1.indnatts, + (string_to_array(textin(int2vectorout(i_1.indkey)), ' '::text))::integer[] AS indkey + FROM (pg_index i_1 + JOIN pg_class ci ON ((ci.oid = i_1.indexrelid))) + WHERE ((ci.relam = ( SELECT pg_am.oid + FROM pg_am + WHERE (pg_am.amname = 'btree'::name))) AND (ci.relpages > 0))) idx_data) ic + JOIN pg_class ct ON ((ct.oid = ic.tbloid))) + LEFT JOIN pg_attribute a1 ON (((ic.indkey[ic.attpos] <> 0) AND (a1.attrelid = ic.tbloid) AND (a1.attnum = ic.indkey[ic.attpos])))) + LEFT JOIN pg_attribute a2 ON (((ic.indkey[ic.attpos] = 0) AND (a2.attrelid = ic.idxoid) AND (a2.attnum = ic.attpos))))) i(tblname, relnamespace, idxname, attpos, indkey, indkey_1, reltuples, relpages, tbloid, idxoid, fillfactor, attnum, attname, atttypid, attrelname) + JOIN pg_namespace n ON ((n.oid = i.relnamespace))) + JOIN pg_stats s ON (((s.schemaname = n.nspname) AND (s.tablename = i.attrelname) AND (s.attname = i.attname)))) + GROUP BY n.nspname, i.tblname, i.idxname, i.reltuples, i.relpages, i.idxoid, i.fillfactor, (current_setting('block_size'::text))::numeric, + CASE + WHEN ((version() ~ 'mingw32'::text) OR (version() ~ '64-bit|x86_64|ppc64|ia64|amd64'::text)) THEN 8 + ELSE 4 + END, 24::integer, 16::integer) rows_data_stats) rows_hdr_pdg_stats) relation_stats + WHERE ((relation_stats.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name])) AND (NOT relation_stats.is_na)) + ORDER BY relation_stats.nspname, relation_stats.tblname, relation_stats.idxname; + +CREATE VIEW postgres_indexes AS + SELECT (((pg_namespace.nspname)::text || '.'::text) || (pg_class.relname)::text) AS identifier, + pg_index.indexrelid, + pg_namespace.nspname AS schema, + pg_class.relname AS name, + pg_indexes.tablename, + pg_index.indisunique AS "unique", + pg_index.indisvalid AS valid_index, + pg_class.relispartition AS partitioned, + pg_index.indisexclusion AS exclusion, + (pg_index.indexprs IS NOT NULL) AS expression, + (pg_index.indpred IS NOT NULL) AS partial, + pg_indexes.indexdef AS definition, + pg_relation_size((pg_class.oid)::regclass) AS ondisk_size_bytes + FROM (((pg_index + JOIN pg_class ON ((pg_class.oid = pg_index.indexrelid))) + JOIN pg_namespace ON ((pg_class.relnamespace = pg_namespace.oid))) + JOIN pg_indexes ON ((pg_class.relname = pg_indexes.indexname))) + WHERE ((pg_namespace.nspname <> 'pg_catalog'::name) AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name]))); + +CREATE VIEW postgres_partitioned_tables AS + SELECT (((pg_namespace.nspname)::text || '.'::text) || (pg_class.relname)::text) AS identifier, + pg_class.oid, + pg_namespace.nspname AS schema, + pg_class.relname AS name, + CASE partitioned_tables.partstrat + WHEN 'l'::"char" THEN 'list'::text + WHEN 'r'::"char" THEN 'range'::text + WHEN 'h'::"char" THEN 'hash'::text + ELSE NULL::text + END AS strategy, + array_agg(pg_attribute.attname) AS key_columns + FROM (((( SELECT pg_partitioned_table.partrelid, + pg_partitioned_table.partstrat, + unnest(pg_partitioned_table.partattrs) AS column_position + FROM pg_partitioned_table) partitioned_tables + JOIN pg_class ON ((partitioned_tables.partrelid = pg_class.oid))) + JOIN pg_namespace ON ((pg_class.relnamespace = pg_namespace.oid))) + JOIN pg_attribute ON (((pg_attribute.attrelid = pg_class.oid) AND (pg_attribute.attnum = partitioned_tables.column_position)))) + WHERE (pg_namespace.nspname = "current_schema"()) + GROUP BY (((pg_namespace.nspname)::text || '.'::text) || (pg_class.relname)::text), pg_class.oid, pg_namespace.nspname, pg_class.relname, + CASE partitioned_tables.partstrat + WHEN 'l'::"char" THEN 'list'::text + WHEN 'r'::"char" THEN 'range'::text + WHEN 'h'::"char" THEN 'hash'::text + ELSE NULL::text + END; + +CREATE VIEW postgres_partitions AS + SELECT (((pg_namespace.nspname)::text || '.'::text) || (pg_class.relname)::text) AS identifier, + pg_class.oid, + pg_namespace.nspname AS schema, + pg_class.relname AS name, + (((parent_namespace.nspname)::text || '.'::text) || (parent_class.relname)::text) AS parent_identifier, + pg_get_expr(pg_class.relpartbound, pg_inherits.inhrelid) AS condition + FROM ((((pg_class + JOIN pg_namespace ON ((pg_namespace.oid = pg_class.relnamespace))) + JOIN pg_inherits ON ((pg_class.oid = pg_inherits.inhrelid))) + JOIN pg_class parent_class ON ((pg_inherits.inhparent = parent_class.oid))) + JOIN pg_namespace parent_namespace ON ((parent_class.relnamespace = parent_namespace.oid))) + WHERE (pg_class.relispartition AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name]))); + +CREATE TABLE postgres_reindex_actions ( + id bigint NOT NULL, + action_start timestamp with time zone NOT NULL, + action_end timestamp with time zone, + ondisk_size_bytes_start bigint NOT NULL, + ondisk_size_bytes_end bigint, + state smallint DEFAULT 0 NOT NULL, + index_identifier text NOT NULL, + CONSTRAINT check_f12527622c CHECK ((char_length(index_identifier) <= 255)) +); + +CREATE SEQUENCE postgres_reindex_actions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE postgres_reindex_actions_id_seq OWNED BY postgres_reindex_actions.id; + CREATE TABLE programming_languages ( id integer NOT NULL, name character varying NOT NULL, @@ -4585,6 +15624,11 @@ CREATE SEQUENCE programming_languages_id_seq ALTER SEQUENCE programming_languages_id_seq OWNED BY programming_languages.id; +CREATE TABLE project_access_tokens ( + personal_access_token_id bigint NOT NULL, + project_id bigint NOT NULL +); + CREATE TABLE project_alerting_settings ( project_id integer NOT NULL, encrypted_token character varying NOT NULL, @@ -4638,7 +15682,11 @@ CREATE TABLE project_ci_cd_settings ( project_id integer NOT NULL, group_runners_enabled boolean DEFAULT true NOT NULL, merge_pipelines_enabled boolean, - default_git_depth integer + default_git_depth integer, + forward_deployment_enabled boolean, + merge_trains_enabled boolean DEFAULT false, + auto_rollback_enabled boolean DEFAULT false NOT NULL, + keep_latest_artifact boolean DEFAULT true NOT NULL ); CREATE SEQUENCE project_ci_cd_settings_id_seq @@ -4651,6 +15699,22 @@ CREATE SEQUENCE project_ci_cd_settings_id_seq ALTER SEQUENCE project_ci_cd_settings_id_seq OWNED BY project_ci_cd_settings.id; +CREATE TABLE project_compliance_framework_settings ( + project_id bigint NOT NULL, + framework smallint, + framework_id bigint, + CONSTRAINT check_d348de9e2d CHECK ((framework_id IS NOT NULL)) +); + +CREATE SEQUENCE project_compliance_framework_settings_project_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE project_compliance_framework_settings_project_id_seq OWNED BY project_compliance_framework_settings.project_id; + CREATE TABLE project_custom_attributes ( id integer NOT NULL, created_at timestamp with time zone NOT NULL, @@ -4713,6 +15777,24 @@ CREATE TABLE project_error_tracking_settings ( organization_name character varying ); +CREATE TABLE project_export_jobs ( + id bigint NOT NULL, + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status smallint DEFAULT 0 NOT NULL, + jid character varying(100) NOT NULL +); + +CREATE SEQUENCE project_export_jobs_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE project_export_jobs_id_seq OWNED BY project_export_jobs.id; + CREATE TABLE project_feature_usages ( project_id integer NOT NULL, jira_dvcs_cloud_last_sync_at timestamp without time zone, @@ -4730,7 +15812,12 @@ CREATE TABLE project_features ( created_at timestamp without time zone, updated_at timestamp without time zone, repository_access_level integer DEFAULT 20 NOT NULL, - pages_access_level integer NOT NULL + pages_access_level integer NOT NULL, + forking_access_level integer, + metrics_dashboard_access_level integer, + analytics_access_level integer DEFAULT 20 NOT NULL, + requirements_access_level integer DEFAULT 20 NOT NULL, + operations_access_level integer DEFAULT 20 NOT NULL ); CREATE SEQUENCE project_features_id_seq @@ -4784,14 +15871,23 @@ ALTER SEQUENCE project_import_data_id_seq OWNED BY project_import_data.id; CREATE TABLE project_incident_management_settings ( project_id integer NOT NULL, - create_issue boolean DEFAULT true NOT NULL, + create_issue boolean DEFAULT false NOT NULL, send_email boolean DEFAULT false NOT NULL, - issue_template_key text + issue_template_key text, + pagerduty_active boolean DEFAULT false NOT NULL, + encrypted_pagerduty_token bytea, + encrypted_pagerduty_token_iv bytea, + auto_close_incident boolean DEFAULT true NOT NULL, + sla_timer boolean DEFAULT false, + sla_timer_minutes integer, + CONSTRAINT pagerduty_token_iv_length_constraint CHECK ((octet_length(encrypted_pagerduty_token_iv) <= 12)), + CONSTRAINT pagerduty_token_length_constraint CHECK ((octet_length(encrypted_pagerduty_token) <= 255)) ); CREATE TABLE project_metrics_settings ( project_id integer NOT NULL, - external_dashboard_url character varying NOT NULL + external_dashboard_url character varying, + dashboard_timezone smallint DEFAULT 0 NOT NULL ); CREATE TABLE project_mirror_data ( @@ -4805,7 +15901,8 @@ CREATE TABLE project_mirror_data ( last_update_scheduled_at timestamp without time zone, last_update_started_at timestamp without time zone, next_execution_timestamp timestamp without time zone, - retry_count integer DEFAULT 0 NOT NULL + retry_count integer DEFAULT 0 NOT NULL, + correlation_id_value character varying(128) ); CREATE SEQUENCE project_mirror_data_id_seq @@ -4820,7 +15917,9 @@ ALTER SEQUENCE project_mirror_data_id_seq OWNED BY project_mirror_data.id; CREATE TABLE project_pages_metadata ( project_id bigint NOT NULL, - deployed boolean DEFAULT false NOT NULL + deployed boolean DEFAULT false NOT NULL, + artifacts_archive_id bigint, + pages_deployment_id bigint ); CREATE TABLE project_repositories ( @@ -4864,10 +15963,57 @@ CREATE SEQUENCE project_repository_states_id_seq ALTER SEQUENCE project_repository_states_id_seq OWNED BY project_repository_states.id; +CREATE TABLE project_repository_storage_moves ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + state smallint DEFAULT 1 NOT NULL, + source_storage_name text NOT NULL, + destination_storage_name text NOT NULL, + CONSTRAINT project_repository_storage_moves_destination_storage_name CHECK ((char_length(destination_storage_name) <= 255)), + CONSTRAINT project_repository_storage_moves_source_storage_name CHECK ((char_length(source_storage_name) <= 255)) +); + +CREATE SEQUENCE project_repository_storage_moves_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE project_repository_storage_moves_id_seq OWNED BY project_repository_storage_moves.id; + +CREATE TABLE project_security_settings ( + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + auto_fix_container_scanning boolean DEFAULT true NOT NULL, + auto_fix_dast boolean DEFAULT true NOT NULL, + auto_fix_dependency_scanning boolean DEFAULT true NOT NULL, + auto_fix_sast boolean DEFAULT true NOT NULL +); + +CREATE SEQUENCE project_security_settings_project_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE project_security_settings_project_id_seq OWNED BY project_security_settings.project_id; + CREATE TABLE project_settings ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - project_id integer NOT NULL + project_id integer NOT NULL, + show_default_award_emojis boolean DEFAULT true NOT NULL, + allow_merge_on_skipped_pipeline boolean, + push_rule_id bigint, + squash_option smallint DEFAULT 3, + has_confluence boolean DEFAULT false NOT NULL, + cve_id_request_enabled boolean DEFAULT true NOT NULL, + has_vulnerabilities boolean DEFAULT false NOT NULL ); CREATE TABLE project_statistics ( @@ -4882,7 +16028,10 @@ CREATE TABLE project_statistics ( shared_runners_seconds bigint DEFAULT 0 NOT NULL, shared_runners_seconds_last_reset timestamp without time zone, packages_size bigint DEFAULT 0 NOT NULL, - wiki_size bigint + wiki_size bigint, + snippets_size bigint, + pipeline_artifacts_size bigint DEFAULT 0 NOT NULL, + uploads_size bigint DEFAULT 0 NOT NULL ); CREATE SEQUENCE project_statistics_id_seq @@ -4993,7 +16142,8 @@ CREATE TABLE projects ( marked_for_deletion_at date, marked_for_deletion_by_user_id integer, remove_source_branch_after_merge boolean, - suggestion_commit_message character varying(255) + suggestion_commit_message character varying(255), + autoclose_referenced_issues boolean ); CREATE SEQUENCE projects_id_seq @@ -5033,7 +16183,9 @@ CREATE TABLE prometheus_alerts ( operator integer NOT NULL, environment_id integer NOT NULL, project_id integer NOT NULL, - prometheus_metric_id integer NOT NULL + prometheus_metric_id integer NOT NULL, + runbook_url text, + CONSTRAINT check_cb76d7e629 CHECK ((char_length(runbook_url) <= 255)) ); CREATE SEQUENCE prometheus_alerts_id_seq @@ -5058,7 +16210,9 @@ CREATE TABLE prometheus_metrics ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, common boolean DEFAULT false NOT NULL, - identifier character varying + identifier character varying, + dashboard_path text, + CONSTRAINT check_0ad9f01463 CHECK ((char_length(dashboard_path) <= 2048)) ); CREATE SEQUENCE prometheus_metrics_id_seq @@ -5098,7 +16252,8 @@ CREATE TABLE protected_branch_push_access_levels ( created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, group_id integer, - user_id integer + user_id integer, + deploy_key_id integer ); CREATE SEQUENCE protected_branch_push_access_levels_id_seq @@ -5268,6 +16423,24 @@ CREATE SEQUENCE push_rules_id_seq ALTER SEQUENCE push_rules_id_seq OWNED BY push_rules.id; +CREATE TABLE raw_usage_data ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + recorded_at timestamp with time zone NOT NULL, + sent_at timestamp with time zone, + payload jsonb NOT NULL +); + +CREATE SEQUENCE raw_usage_data_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE raw_usage_data_id_seq OWNED BY raw_usage_data.id; + CREATE TABLE redirect_routes ( id integer NOT NULL, source_id integer NOT NULL, @@ -5293,7 +16466,9 @@ CREATE TABLE release_links ( url character varying NOT NULL, name character varying NOT NULL, created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL + updated_at timestamp with time zone NOT NULL, + filepath character varying(128), + link_type smallint DEFAULT 0 ); CREATE SEQUENCE release_links_id_seq @@ -5347,7 +16522,8 @@ CREATE TABLE remote_mirrors ( encrypted_credentials_salt character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, - error_notification_sent boolean + error_notification_sent boolean, + keep_divergent_refs boolean ); CREATE SEQUENCE remote_mirrors_id_seq @@ -5366,6 +16542,84 @@ CREATE TABLE repository_languages ( share double precision NOT NULL ); +CREATE TABLE required_code_owners_sections ( + id bigint NOT NULL, + protected_branch_id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_e58d53741e CHECK ((char_length(name) <= 1024)) +); + +CREATE SEQUENCE required_code_owners_sections_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE required_code_owners_sections_id_seq OWNED BY required_code_owners_sections.id; + +CREATE TABLE requirements ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id integer NOT NULL, + author_id integer, + iid integer NOT NULL, + cached_markdown_version integer, + state smallint DEFAULT 1 NOT NULL, + title character varying(255) NOT NULL, + title_html text, + description text, + description_html text, + CONSTRAINT check_785ae25b9d CHECK ((char_length(description) <= 10000)) +); + +CREATE SEQUENCE requirements_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE requirements_id_seq OWNED BY requirements.id; + +CREATE TABLE requirements_management_test_reports ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + requirement_id bigint NOT NULL, + author_id bigint, + state smallint NOT NULL, + build_id bigint +); + +CREATE SEQUENCE requirements_management_test_reports_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE requirements_management_test_reports_id_seq OWNED BY requirements_management_test_reports.id; + +CREATE TABLE resource_iteration_events ( + id bigint NOT NULL, + user_id bigint NOT NULL, + issue_id bigint, + merge_request_id bigint, + iteration_id bigint, + created_at timestamp with time zone NOT NULL, + action smallint NOT NULL +); + +CREATE SEQUENCE resource_iteration_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE resource_iteration_events_id_seq OWNED BY resource_iteration_events.id; + CREATE TABLE resource_label_events ( id bigint NOT NULL, action integer NOT NULL, @@ -5389,9 +16643,54 @@ CREATE SEQUENCE resource_label_events_id_seq ALTER SEQUENCE resource_label_events_id_seq OWNED BY resource_label_events.id; +CREATE TABLE resource_milestone_events ( + id bigint NOT NULL, + user_id bigint, + issue_id bigint, + merge_request_id bigint, + milestone_id bigint, + action smallint NOT NULL, + state smallint NOT NULL, + created_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE resource_milestone_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE resource_milestone_events_id_seq OWNED BY resource_milestone_events.id; + +CREATE TABLE resource_state_events ( + id bigint NOT NULL, + user_id bigint, + issue_id bigint, + merge_request_id bigint, + created_at timestamp with time zone NOT NULL, + state smallint NOT NULL, + epic_id integer, + source_commit text, + close_after_error_tracking_resolve boolean DEFAULT false NOT NULL, + close_auto_resolve_prometheus_alert boolean DEFAULT false NOT NULL, + source_merge_request_id bigint, + CONSTRAINT check_f0bcfaa3a2 CHECK ((char_length(source_commit) <= 40)), + CONSTRAINT state_events_must_belong_to_issue_or_merge_request_or_epic CHECK ((((issue_id <> NULL::bigint) AND (merge_request_id IS NULL) AND (epic_id IS NULL)) OR ((issue_id IS NULL) AND (merge_request_id <> NULL::bigint) AND (epic_id IS NULL)) OR ((issue_id IS NULL) AND (merge_request_id IS NULL) AND (epic_id <> NULL::integer)))) +); + +CREATE SEQUENCE resource_state_events_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE resource_state_events_id_seq OWNED BY resource_state_events.id; + CREATE TABLE resource_weight_events ( id bigint NOT NULL, - user_id bigint NOT NULL, + user_id bigint, issue_id bigint NOT NULL, weight integer, created_at timestamp with time zone NOT NULL @@ -5443,6 +16742,25 @@ CREATE SEQUENCE routes_id_seq ALTER SEQUENCE routes_id_seq OWNED BY routes.id; +CREATE TABLE saml_group_links ( + id bigint NOT NULL, + access_level smallint NOT NULL, + group_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + saml_group_name text NOT NULL, + CONSTRAINT check_1b3fc49d1e CHECK ((char_length(saml_group_name) <= 255)) +); + +CREATE SEQUENCE saml_group_links_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE saml_group_links_id_seq OWNED BY saml_group_links.id; + CREATE TABLE saml_providers ( id integer NOT NULL, group_id integer NOT NULL, @@ -5451,7 +16769,8 @@ CREATE TABLE saml_providers ( sso_url character varying NOT NULL, enforced_sso boolean DEFAULT false NOT NULL, enforced_group_managed_accounts boolean DEFAULT false NOT NULL, - prohibited_outer_forks boolean DEFAULT false + prohibited_outer_forks boolean DEFAULT true NOT NULL, + default_membership_role smallint DEFAULT 10 NOT NULL ); CREATE SEQUENCE saml_providers_id_seq @@ -5464,6 +16783,25 @@ CREATE SEQUENCE saml_providers_id_seq ALTER SEQUENCE saml_providers_id_seq OWNED BY saml_providers.id; +CREATE TABLE scim_identities ( + id bigint NOT NULL, + group_id bigint NOT NULL, + user_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + active boolean DEFAULT false, + extern_uid character varying(255) NOT NULL +); + +CREATE SEQUENCE scim_identities_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE scim_identities_id_seq OWNED BY scim_identities.id; + CREATE TABLE scim_oauth_access_tokens ( id integer NOT NULL, created_at timestamp with time zone NOT NULL, @@ -5482,6 +16820,45 @@ CREATE SEQUENCE scim_oauth_access_tokens_id_seq ALTER SEQUENCE scim_oauth_access_tokens_id_seq OWNED BY scim_oauth_access_tokens.id; +CREATE TABLE security_findings ( + id bigint NOT NULL, + scan_id bigint NOT NULL, + scanner_id bigint NOT NULL, + severity smallint NOT NULL, + confidence smallint NOT NULL, + project_fingerprint text NOT NULL, + deduplicated boolean DEFAULT false NOT NULL, + "position" integer, + uuid uuid, + CONSTRAINT check_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40)) +); + +CREATE SEQUENCE security_findings_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE security_findings_id_seq OWNED BY security_findings.id; + +CREATE TABLE security_scans ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + build_id bigint NOT NULL, + scan_type smallint NOT NULL +); + +CREATE SEQUENCE security_scans_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE security_scans_id_seq OWNED BY security_scans.id; + CREATE TABLE self_managed_prometheus_alert_events ( id bigint NOT NULL, project_id bigint NOT NULL, @@ -5548,19 +16925,22 @@ CREATE TABLE serverless_domain_cluster ( creator_id bigint, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - uuid character varying(14) NOT NULL + uuid character varying(14) NOT NULL, + encrypted_key text, + encrypted_key_iv character varying(255), + certificate text ); CREATE TABLE service_desk_settings ( project_id bigint NOT NULL, issue_template_key character varying(255), - outgoing_name character varying(255) + outgoing_name character varying(255), + project_key character varying(255) ); CREATE TABLE services ( id integer NOT NULL, type character varying, - title character varying, project_id integer, created_at timestamp without time zone, updated_at timestamp without time zone, @@ -5573,7 +16953,6 @@ CREATE TABLE services ( tag_push_events boolean DEFAULT true, note_events boolean DEFAULT true NOT NULL, category character varying DEFAULT 'common'::character varying NOT NULL, - "default" boolean DEFAULT false, wiki_page_events boolean DEFAULT true, pipeline_events boolean DEFAULT false NOT NULL, confidential_issues_events boolean DEFAULT true NOT NULL, @@ -5581,8 +16960,12 @@ CREATE TABLE services ( job_events boolean DEFAULT false NOT NULL, confidential_note_events boolean DEFAULT true, deployment_events boolean DEFAULT false NOT NULL, - description character varying(500), - comment_on_event_enabled boolean DEFAULT true NOT NULL + comment_on_event_enabled boolean DEFAULT true NOT NULL, + instance boolean DEFAULT false NOT NULL, + comment_detail smallint, + inherit_from_id bigint, + alert_events boolean, + group_id bigint ); CREATE SEQUENCE services_id_seq @@ -5647,6 +17030,46 @@ CREATE SEQUENCE smartcard_identities_id_seq ALTER SEQUENCE smartcard_identities_id_seq OWNED BY smartcard_identities.id; +CREATE TABLE snippet_repositories ( + shard_id bigint NOT NULL, + snippet_id bigint NOT NULL, + disk_path character varying(80) NOT NULL, + verification_retry_count smallint, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + verification_checksum bytea, + verification_failure text, + CONSTRAINT snippet_repositories_verification_failure_text_limit CHECK ((char_length(verification_failure) <= 255)) +); + +CREATE TABLE snippet_repository_storage_moves ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + snippet_id bigint NOT NULL, + state smallint DEFAULT 1 NOT NULL, + source_storage_name text NOT NULL, + destination_storage_name text NOT NULL, + CONSTRAINT snippet_repository_storage_moves_destination_storage_name CHECK ((char_length(destination_storage_name) <= 255)), + CONSTRAINT snippet_repository_storage_moves_source_storage_name CHECK ((char_length(source_storage_name) <= 255)) +); + +CREATE SEQUENCE snippet_repository_storage_moves_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE snippet_repository_storage_moves_id_seq OWNED BY snippet_repository_storage_moves.id; + +CREATE TABLE snippet_statistics ( + snippet_id bigint NOT NULL, + repository_size bigint DEFAULT 0 NOT NULL, + file_count bigint DEFAULT 0 NOT NULL, + commit_count bigint DEFAULT 0 NOT NULL +); + CREATE TABLE snippet_user_mentions ( id bigint NOT NULL, snippet_id integer NOT NULL, @@ -5684,8 +17107,7 @@ CREATE TABLE snippets ( encrypted_secret_token character varying(255), encrypted_secret_token_iv character varying(255), secret boolean DEFAULT false NOT NULL, - repository_storage character varying(255) DEFAULT 'default'::character varying NOT NULL, - storage_version integer DEFAULT 2 NOT NULL + repository_read_only boolean DEFAULT false NOT NULL ); CREATE SEQUENCE snippets_id_seq @@ -5703,6 +17125,8 @@ CREATE TABLE software_license_policies ( project_id integer NOT NULL, software_license_id integer NOT NULL, classification integer DEFAULT 0, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, CONSTRAINT check_8e8751b568 CHECK ((classification IS NOT NULL)) ); @@ -5757,6 +17181,73 @@ CREATE SEQUENCE spam_logs_id_seq ALTER SEQUENCE spam_logs_id_seq OWNED BY spam_logs.id; +CREATE TABLE sprints ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + start_date date, + due_date date, + project_id bigint, + group_id bigint, + iid integer NOT NULL, + cached_markdown_version integer, + title text NOT NULL, + title_html text, + description text, + description_html text, + state_enum smallint DEFAULT 1 NOT NULL, + CONSTRAINT sprints_must_belong_to_project_or_group CHECK ((((project_id <> NULL::bigint) AND (group_id IS NULL)) OR ((group_id <> NULL::bigint) AND (project_id IS NULL)))), + CONSTRAINT sprints_title CHECK ((char_length(title) <= 255)) +); + +CREATE SEQUENCE sprints_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE sprints_id_seq OWNED BY sprints.id; + +CREATE TABLE status_page_published_incidents ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + issue_id bigint NOT NULL +); + +CREATE SEQUENCE status_page_published_incidents_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE status_page_published_incidents_id_seq OWNED BY status_page_published_incidents.id; + +CREATE TABLE status_page_settings ( + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + enabled boolean DEFAULT false NOT NULL, + aws_s3_bucket_name character varying(63) NOT NULL, + aws_region character varying(255) NOT NULL, + aws_access_key character varying(255) NOT NULL, + encrypted_aws_secret_key character varying(255) NOT NULL, + encrypted_aws_secret_key_iv character varying(255) NOT NULL, + status_page_url text, + CONSTRAINT check_75a79cd992 CHECK ((char_length(status_page_url) <= 1024)) +); + +CREATE SEQUENCE status_page_settings_project_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE status_page_settings_project_id_seq OWNED BY status_page_settings.project_id; + CREATE TABLE subscriptions ( id integer NOT NULL, user_id integer, @@ -5876,6 +17367,58 @@ CREATE SEQUENCE term_agreements_id_seq ALTER SEQUENCE term_agreements_id_seq OWNED BY term_agreements.id; +CREATE TABLE terraform_state_versions ( + id bigint NOT NULL, + terraform_state_id bigint NOT NULL, + created_by_user_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + version integer NOT NULL, + file_store smallint NOT NULL, + file text NOT NULL, + verification_retry_count smallint, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + verification_checksum bytea, + verification_failure text, + ci_build_id bigint, + CONSTRAINT check_0824bb7bbd CHECK ((char_length(file) <= 255)), + CONSTRAINT tf_state_versions_verification_failure_text_limit CHECK ((char_length(verification_failure) <= 255)) +); + +CREATE SEQUENCE terraform_state_versions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE terraform_state_versions_id_seq OWNED BY terraform_state_versions.id; + +CREATE TABLE terraform_states ( + id bigint NOT NULL, + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + file_store smallint, + file character varying(255), + lock_xid character varying(255), + locked_at timestamp with time zone, + locked_by_user_id bigint, + uuid character varying(32) NOT NULL, + name character varying(255), + versioning_enabled boolean DEFAULT true NOT NULL +); + +CREATE SEQUENCE terraform_states_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE terraform_states_id_seq OWNED BY terraform_states.id; + CREATE TABLE timelogs ( id integer NOT NULL, time_spent integer NOT NULL, @@ -5884,7 +17427,8 @@ CREATE TABLE timelogs ( updated_at timestamp without time zone NOT NULL, issue_id integer, merge_request_id integer, - spent_at timestamp with time zone + spent_at timestamp with time zone, + note_id integer ); CREATE SEQUENCE timelogs_id_seq @@ -5910,7 +17454,8 @@ CREATE TABLE todos ( updated_at timestamp without time zone, note_id integer, commit_id character varying, - group_id integer + group_id integer, + resolved_by_action smallint ); CREATE SEQUENCE todos_id_seq @@ -5923,6 +17468,22 @@ CREATE SEQUENCE todos_id_seq ALTER SEQUENCE todos_id_seq OWNED BY todos.id; +CREATE TABLE token_with_ivs ( + id bigint NOT NULL, + hashed_token bytea NOT NULL, + hashed_plaintext_token bytea NOT NULL, + iv bytea NOT NULL +); + +CREATE SEQUENCE token_with_ivs_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE token_with_ivs_id_seq OWNED BY token_with_ivs.id; + CREATE TABLE trending_projects ( id integer NOT NULL, project_id integer NOT NULL @@ -5969,9 +17530,10 @@ CREATE TABLE uploads ( model_id integer, uploader character varying NOT NULL, created_at timestamp without time zone NOT NULL, - store integer, + store integer DEFAULT 1, mount_point character varying, - secret character varying + secret character varying, + CONSTRAINT check_5e9547379c CHECK ((store IS NOT NULL)) ); CREATE SEQUENCE uploads_id_seq @@ -6008,7 +17570,8 @@ ALTER SEQUENCE user_agent_details_id_seq OWNED BY user_agent_details.id; CREATE TABLE user_callouts ( id integer NOT NULL, feature_name integer NOT NULL, - user_id integer NOT NULL + user_id integer NOT NULL, + dismissed_at timestamp with time zone ); CREATE SEQUENCE user_callouts_id_seq @@ -6021,6 +17584,23 @@ CREATE SEQUENCE user_callouts_id_seq ALTER SEQUENCE user_callouts_id_seq OWNED BY user_callouts.id; +CREATE TABLE user_canonical_emails ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + user_id bigint NOT NULL, + canonical_email character varying NOT NULL +); + +CREATE SEQUENCE user_canonical_emails_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE user_canonical_emails_id_seq OWNED BY user_canonical_emails.id; + CREATE TABLE user_custom_attributes ( id integer NOT NULL, created_at timestamp with time zone NOT NULL, @@ -6040,11 +17620,64 @@ CREATE SEQUENCE user_custom_attributes_id_seq ALTER SEQUENCE user_custom_attributes_id_seq OWNED BY user_custom_attributes.id; +CREATE TABLE user_details ( + user_id bigint NOT NULL, + job_title character varying(200) DEFAULT ''::character varying NOT NULL, + bio character varying(255) DEFAULT ''::character varying NOT NULL, + webauthn_xid text, + bio_html text, + cached_markdown_version integer, + provisioned_by_group_id bigint, + other_role text, + CONSTRAINT check_245664af82 CHECK ((char_length(webauthn_xid) <= 100)), + CONSTRAINT check_b132136b01 CHECK ((char_length(other_role) <= 100)) +); + +CREATE SEQUENCE user_details_user_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE user_details_user_id_seq OWNED BY user_details.user_id; + +CREATE TABLE user_follow_users ( + follower_id integer NOT NULL, + followee_id integer NOT NULL +); + +CREATE TABLE user_highest_roles ( + updated_at timestamp with time zone NOT NULL, + user_id bigint NOT NULL, + highest_access_level integer +); + CREATE TABLE user_interacted_projects ( user_id integer NOT NULL, project_id integer NOT NULL ); +CREATE TABLE user_permission_export_uploads ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + user_id bigint NOT NULL, + file_store integer, + status smallint DEFAULT 0 NOT NULL, + file text, + CONSTRAINT check_1956806648 CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE user_permission_export_uploads_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE user_permission_export_uploads_id_seq OWNED BY user_permission_export_uploads.id; + CREATE TABLE user_preferences ( id integer NOT NULL, user_id integer NOT NULL, @@ -6067,7 +17700,10 @@ CREATE TABLE user_preferences ( setup_for_company boolean, sourcegraph_enabled boolean, render_whitespace_in_code boolean, - tab_width smallint + tab_width smallint, + experience_level smallint, + view_diffs_file_by_file boolean DEFAULT false NOT NULL, + gitpod_enabled boolean DEFAULT false NOT NULL ); CREATE SEQUENCE user_preferences_id_seq @@ -6085,7 +17721,8 @@ CREATE TABLE user_statuses ( cached_markdown_version integer, emoji character varying DEFAULT 'speech_balloon'::character varying NOT NULL, message character varying(100), - message_html character varying + message_html character varying, + availability smallint DEFAULT 0 NOT NULL ); CREATE SEQUENCE user_statuses_user_id_seq @@ -6137,7 +17774,6 @@ CREATE TABLE users ( skype character varying DEFAULT ''::character varying NOT NULL, linkedin character varying DEFAULT ''::character varying NOT NULL, twitter character varying DEFAULT ''::character varying NOT NULL, - bio character varying, failed_attempts integer DEFAULT 0, locked_at timestamp without time zone, username character varying, @@ -6177,7 +17813,6 @@ CREATE TABLE users ( organization character varying, require_two_factor_authentication_from_group boolean DEFAULT false NOT NULL, two_factor_grace_period integer DEFAULT 48 NOT NULL, - ghost boolean, last_activity_on date, notified_of_own_activity boolean, preferred_language character varying, @@ -6197,11 +17832,11 @@ CREATE TABLE users ( managing_group_id integer, note text, roadmap_layout smallint, - bot_type smallint, static_object_token character varying(255), first_name character varying(255), last_name character varying(255), - role smallint + role smallint, + user_type smallint ); CREATE SEQUENCE users_id_seq @@ -6254,6 +17889,29 @@ CREATE SEQUENCE users_star_projects_id_seq ALTER SEQUENCE users_star_projects_id_seq OWNED BY users_star_projects.id; +CREATE TABLE users_statistics ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + without_groups_and_projects integer DEFAULT 0 NOT NULL, + with_highest_role_guest integer DEFAULT 0 NOT NULL, + with_highest_role_reporter integer DEFAULT 0 NOT NULL, + with_highest_role_developer integer DEFAULT 0 NOT NULL, + with_highest_role_maintainer integer DEFAULT 0 NOT NULL, + with_highest_role_owner integer DEFAULT 0 NOT NULL, + bots integer DEFAULT 0 NOT NULL, + blocked integer DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE users_statistics_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE users_statistics_id_seq OWNED BY users_statistics.id; + CREATE TABLE vulnerabilities ( id bigint NOT NULL, milestone_id bigint, @@ -6264,11 +17922,9 @@ CREATE TABLE vulnerabilities ( last_edited_by_id bigint, start_date_sourcing_milestone_id bigint, due_date_sourcing_milestone_id bigint, - closed_by_id bigint, last_edited_at timestamp with time zone, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - closed_at timestamp with time zone, start_date date, due_date date, state smallint DEFAULT 1 NOT NULL, @@ -6283,7 +17939,12 @@ CREATE TABLE vulnerabilities ( report_type smallint NOT NULL, cached_markdown_version integer, resolved_by_id bigint, - resolved_at timestamp with time zone + resolved_at timestamp with time zone, + confirmed_by_id bigint, + confirmed_at timestamp with time zone, + dismissed_at timestamp with time zone, + dismissed_by_id bigint, + resolved_on_default_branch boolean DEFAULT false NOT NULL ); CREATE SEQUENCE vulnerabilities_id_seq @@ -6295,6 +17956,53 @@ CREATE SEQUENCE vulnerabilities_id_seq ALTER SEQUENCE vulnerabilities_id_seq OWNED BY vulnerabilities.id; +CREATE TABLE vulnerability_exports ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + started_at timestamp with time zone, + finished_at timestamp with time zone, + status character varying(255) NOT NULL, + file character varying(255), + project_id bigint, + author_id bigint NOT NULL, + file_store integer, + format smallint DEFAULT 0 NOT NULL, + group_id integer +); + +CREATE SEQUENCE vulnerability_exports_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE vulnerability_exports_id_seq OWNED BY vulnerability_exports.id; + +CREATE TABLE vulnerability_external_issue_links ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + author_id bigint NOT NULL, + vulnerability_id bigint NOT NULL, + link_type smallint DEFAULT 1 NOT NULL, + external_type smallint DEFAULT 1 NOT NULL, + external_project_key text NOT NULL, + external_issue_key text NOT NULL, + CONSTRAINT check_3200604f5e CHECK ((char_length(external_issue_key) <= 255)), + CONSTRAINT check_68cffd19b0 CHECK ((char_length(external_project_key) <= 255)) +); + +CREATE SEQUENCE vulnerability_external_issue_links_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE vulnerability_external_issue_links_id_seq OWNED BY vulnerability_external_issue_links.id; + CREATE TABLE vulnerability_feedback ( id integer NOT NULL, created_at timestamp with time zone NOT NULL, @@ -6309,7 +18017,8 @@ CREATE TABLE vulnerability_feedback ( merge_request_id integer, comment_author_id integer, comment text, - comment_timestamp timestamp with time zone + comment_timestamp timestamp with time zone, + finding_uuid uuid ); CREATE SEQUENCE vulnerability_feedback_id_seq @@ -6322,6 +18031,86 @@ CREATE SEQUENCE vulnerability_feedback_id_seq ALTER SEQUENCE vulnerability_feedback_id_seq OWNED BY vulnerability_feedback.id; +CREATE TABLE vulnerability_finding_fingerprints ( + id bigint NOT NULL, + finding_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + algorithm_type integer NOT NULL, + fingerprint_sha256 bytea NOT NULL +); + +CREATE SEQUENCE vulnerability_finding_fingerprints_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE vulnerability_finding_fingerprints_id_seq OWNED BY vulnerability_finding_fingerprints.id; + +CREATE TABLE vulnerability_finding_links ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + vulnerability_occurrence_id bigint NOT NULL, + name text, + url text NOT NULL, + CONSTRAINT check_55f0a95439 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_b7fe886df6 CHECK ((char_length(url) <= 2048)) +); + +CREATE SEQUENCE vulnerability_finding_links_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE vulnerability_finding_links_id_seq OWNED BY vulnerability_finding_links.id; + +CREATE TABLE vulnerability_findings_remediations ( + id bigint NOT NULL, + vulnerability_occurrence_id bigint, + vulnerability_remediation_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE vulnerability_findings_remediations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE vulnerability_findings_remediations_id_seq OWNED BY vulnerability_findings_remediations.id; + +CREATE TABLE vulnerability_historical_statistics ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + total integer DEFAULT 0 NOT NULL, + critical integer DEFAULT 0 NOT NULL, + high integer DEFAULT 0 NOT NULL, + medium integer DEFAULT 0 NOT NULL, + low integer DEFAULT 0 NOT NULL, + unknown integer DEFAULT 0 NOT NULL, + info integer DEFAULT 0 NOT NULL, + date date NOT NULL, + letter_grade smallint NOT NULL +); + +CREATE SEQUENCE vulnerability_historical_statistics_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE vulnerability_historical_statistics_id_seq OWNED BY vulnerability_historical_statistics.id; + CREATE TABLE vulnerability_identifiers ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -6411,7 +18200,8 @@ CREATE TABLE vulnerability_occurrences ( name character varying NOT NULL, metadata_version character varying NOT NULL, raw_metadata text NOT NULL, - vulnerability_id bigint + vulnerability_id bigint, + details jsonb DEFAULT '{}'::jsonb NOT NULL ); CREATE SEQUENCE vulnerability_occurrences_id_seq @@ -6423,13 +18213,38 @@ CREATE SEQUENCE vulnerability_occurrences_id_seq ALTER SEQUENCE vulnerability_occurrences_id_seq OWNED BY vulnerability_occurrences.id; +CREATE TABLE vulnerability_remediations ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + file_store smallint, + summary text NOT NULL, + file text NOT NULL, + checksum bytea NOT NULL, + project_id bigint NOT NULL, + CONSTRAINT check_ac0ccabff3 CHECK ((char_length(summary) <= 200)), + CONSTRAINT check_fe3325e3ba CHECK ((char_length(file) <= 255)) +); + +COMMENT ON COLUMN vulnerability_remediations.checksum IS 'Stores the SHA256 checksum of the attached diff file'; + +CREATE SEQUENCE vulnerability_remediations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE vulnerability_remediations_id_seq OWNED BY vulnerability_remediations.id; + CREATE TABLE vulnerability_scanners ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, project_id integer NOT NULL, external_id character varying NOT NULL, - name character varying NOT NULL + name character varying NOT NULL, + vendor text DEFAULT 'GitLab'::text NOT NULL ); CREATE SEQUENCE vulnerability_scanners_id_seq @@ -6441,6 +18256,48 @@ CREATE SEQUENCE vulnerability_scanners_id_seq ALTER SEQUENCE vulnerability_scanners_id_seq OWNED BY vulnerability_scanners.id; +CREATE TABLE vulnerability_statistics ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + total integer DEFAULT 0 NOT NULL, + critical integer DEFAULT 0 NOT NULL, + high integer DEFAULT 0 NOT NULL, + medium integer DEFAULT 0 NOT NULL, + low integer DEFAULT 0 NOT NULL, + unknown integer DEFAULT 0 NOT NULL, + info integer DEFAULT 0 NOT NULL, + letter_grade smallint NOT NULL +); + +CREATE SEQUENCE vulnerability_statistics_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE vulnerability_statistics_id_seq OWNED BY vulnerability_statistics.id; + +CREATE TABLE vulnerability_user_mentions ( + id bigint NOT NULL, + vulnerability_id bigint NOT NULL, + note_id integer, + mentioned_users_ids integer[], + mentioned_projects_ids integer[], + mentioned_groups_ids integer[] +); + +CREATE SEQUENCE vulnerability_user_mentions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE vulnerability_user_mentions_id_seq OWNED BY vulnerability_user_mentions.id; + CREATE TABLE web_hook_logs ( id integer NOT NULL, web_hook_id integer NOT NULL, @@ -6491,7 +18348,11 @@ CREATE TABLE web_hooks ( encrypted_token_iv character varying, encrypted_url character varying, encrypted_url_iv character varying, - group_id integer + group_id integer, + deployment_events boolean DEFAULT false NOT NULL, + feature_flag_events boolean DEFAULT false NOT NULL, + releases_events boolean DEFAULT false NOT NULL, + member_events boolean DEFAULT false NOT NULL ); CREATE SEQUENCE web_hooks_id_seq @@ -6512,7 +18373,10 @@ CREATE TABLE webauthn_registrations ( updated_at timestamp with time zone NOT NULL, credential_xid text NOT NULL, name text NOT NULL, - public_key text NOT NULL + public_key text NOT NULL, + u2f_registration_id integer, + CONSTRAINT check_2f02e74321 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_e54008d9ce CHECK ((char_length(credential_xid) <= 340)) ); CREATE SEQUENCE webauthn_registrations_id_seq @@ -6524,6 +18388,43 @@ CREATE SEQUENCE webauthn_registrations_id_seq ALTER SEQUENCE webauthn_registrations_id_seq OWNED BY webauthn_registrations.id; +CREATE TABLE wiki_page_meta ( + id integer NOT NULL, + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + title character varying(255) NOT NULL +); + +CREATE SEQUENCE wiki_page_meta_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE wiki_page_meta_id_seq OWNED BY wiki_page_meta.id; + +CREATE TABLE wiki_page_slugs ( + id integer NOT NULL, + canonical boolean DEFAULT false NOT NULL, + wiki_page_meta_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + slug character varying(2048) NOT NULL +); + +CREATE SEQUENCE wiki_page_slugs_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE wiki_page_slugs_id_seq OWNED BY wiki_page_slugs.id; + CREATE TABLE x509_certificates ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -6603,19 +18504,31 @@ ALTER SEQUENCE zoom_meetings_id_seq OWNED BY zoom_meetings.id; ALTER TABLE ONLY abuse_reports ALTER COLUMN id SET DEFAULT nextval('abuse_reports_id_seq'::regclass); +ALTER TABLE ONLY alert_management_alert_assignees ALTER COLUMN id SET DEFAULT nextval('alert_management_alert_assignees_id_seq'::regclass); + +ALTER TABLE ONLY alert_management_alert_user_mentions ALTER COLUMN id SET DEFAULT nextval('alert_management_alert_user_mentions_id_seq'::regclass); + +ALTER TABLE ONLY alert_management_alerts ALTER COLUMN id SET DEFAULT nextval('alert_management_alerts_id_seq'::regclass); + +ALTER TABLE ONLY alert_management_http_integrations ALTER COLUMN id SET DEFAULT nextval('alert_management_http_integrations_id_seq'::regclass); + ALTER TABLE ONLY alerts_service_data ALTER COLUMN id SET DEFAULT nextval('alerts_service_data_id_seq'::regclass); ALTER TABLE ONLY allowed_email_domains ALTER COLUMN id SET DEFAULT nextval('allowed_email_domains_id_seq'::regclass); ALTER TABLE ONLY analytics_cycle_analytics_group_stages ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_group_stages_id_seq'::regclass); +ALTER TABLE ONLY analytics_cycle_analytics_group_value_streams ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_group_value_streams_id_seq'::regclass); + ALTER TABLE ONLY analytics_cycle_analytics_project_stages ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_project_stages_id_seq'::regclass); -ALTER TABLE ONLY analytics_repository_file_commits ALTER COLUMN id SET DEFAULT nextval('analytics_repository_file_commits_id_seq'::regclass); +ALTER TABLE ONLY analytics_devops_adoption_segment_selections ALTER COLUMN id SET DEFAULT nextval('analytics_devops_adoption_segment_selections_id_seq'::regclass); -ALTER TABLE ONLY analytics_repository_file_edits ALTER COLUMN id SET DEFAULT nextval('analytics_repository_file_edits_id_seq'::regclass); +ALTER TABLE ONLY analytics_devops_adoption_segments ALTER COLUMN id SET DEFAULT nextval('analytics_devops_adoption_segments_id_seq'::regclass); -ALTER TABLE ONLY analytics_repository_files ALTER COLUMN id SET DEFAULT nextval('analytics_repository_files_id_seq'::regclass); +ALTER TABLE ONLY analytics_devops_adoption_snapshots ALTER COLUMN id SET DEFAULT nextval('analytics_devops_adoption_snapshots_id_seq'::regclass); + +ALTER TABLE ONLY analytics_instance_statistics_measurements ALTER COLUMN id SET DEFAULT nextval('analytics_instance_statistics_measurements_id_seq'::regclass); ALTER TABLE ONLY appearances ALTER COLUMN id SET DEFAULT nextval('appearances_id_seq'::regclass); @@ -6645,10 +18558,16 @@ ALTER TABLE ONLY approver_groups ALTER COLUMN id SET DEFAULT nextval('approver_g ALTER TABLE ONLY approvers ALTER COLUMN id SET DEFAULT nextval('approvers_id_seq'::regclass); +ALTER TABLE ONLY atlassian_identities ALTER COLUMN user_id SET DEFAULT nextval('atlassian_identities_user_id_seq'::regclass); + ALTER TABLE ONLY audit_events ALTER COLUMN id SET DEFAULT nextval('audit_events_id_seq'::regclass); +ALTER TABLE ONLY authentication_events ALTER COLUMN id SET DEFAULT nextval('authentication_events_id_seq'::regclass); + ALTER TABLE ONLY award_emoji ALTER COLUMN id SET DEFAULT nextval('award_emoji_id_seq'::regclass); +ALTER TABLE ONLY background_migration_jobs ALTER COLUMN id SET DEFAULT nextval('background_migration_jobs_id_seq'::regclass); + ALTER TABLE ONLY badges ALTER COLUMN id SET DEFAULT nextval('badges_id_seq'::regclass); ALTER TABLE ONLY board_assignees ALTER COLUMN id SET DEFAULT nextval('board_assignees_id_seq'::regclass); @@ -6659,16 +18578,40 @@ ALTER TABLE ONLY board_labels ALTER COLUMN id SET DEFAULT nextval('board_labels_ ALTER TABLE ONLY board_project_recent_visits ALTER COLUMN id SET DEFAULT nextval('board_project_recent_visits_id_seq'::regclass); +ALTER TABLE ONLY board_user_preferences ALTER COLUMN id SET DEFAULT nextval('board_user_preferences_id_seq'::regclass); + ALTER TABLE ONLY boards ALTER COLUMN id SET DEFAULT nextval('boards_id_seq'::regclass); +ALTER TABLE ONLY boards_epic_board_labels ALTER COLUMN id SET DEFAULT nextval('boards_epic_board_labels_id_seq'::regclass); + +ALTER TABLE ONLY boards_epic_board_positions ALTER COLUMN id SET DEFAULT nextval('boards_epic_board_positions_id_seq'::regclass); + +ALTER TABLE ONLY boards_epic_boards ALTER COLUMN id SET DEFAULT nextval('boards_epic_boards_id_seq'::regclass); + +ALTER TABLE ONLY boards_epic_user_preferences ALTER COLUMN id SET DEFAULT nextval('boards_epic_user_preferences_id_seq'::regclass); + ALTER TABLE ONLY broadcast_messages ALTER COLUMN id SET DEFAULT nextval('broadcast_messages_id_seq'::regclass); +ALTER TABLE ONLY bulk_import_configurations ALTER COLUMN id SET DEFAULT nextval('bulk_import_configurations_id_seq'::regclass); + +ALTER TABLE ONLY bulk_import_entities ALTER COLUMN id SET DEFAULT nextval('bulk_import_entities_id_seq'::regclass); + +ALTER TABLE ONLY bulk_import_failures ALTER COLUMN id SET DEFAULT nextval('bulk_import_failures_id_seq'::regclass); + +ALTER TABLE ONLY bulk_import_trackers ALTER COLUMN id SET DEFAULT nextval('bulk_import_trackers_id_seq'::regclass); + +ALTER TABLE ONLY bulk_imports ALTER COLUMN id SET DEFAULT nextval('bulk_imports_id_seq'::regclass); + ALTER TABLE ONLY chat_names ALTER COLUMN id SET DEFAULT nextval('chat_names_id_seq'::regclass); ALTER TABLE ONLY chat_teams ALTER COLUMN id SET DEFAULT nextval('chat_teams_id_seq'::regclass); ALTER TABLE ONLY ci_build_needs ALTER COLUMN id SET DEFAULT nextval('ci_build_needs_id_seq'::regclass); +ALTER TABLE ONLY ci_build_pending_states ALTER COLUMN id SET DEFAULT nextval('ci_build_pending_states_id_seq'::regclass); + +ALTER TABLE ONLY ci_build_report_results ALTER COLUMN build_id SET DEFAULT nextval('ci_build_report_results_build_id_seq'::regclass); + ALTER TABLE ONLY ci_build_trace_chunks ALTER COLUMN id SET DEFAULT nextval('ci_build_trace_chunks_id_seq'::regclass); ALTER TABLE ONLY ci_build_trace_section_names ALTER COLUMN id SET DEFAULT nextval('ci_build_trace_section_names_id_seq'::regclass); @@ -6679,14 +18622,26 @@ ALTER TABLE ONLY ci_builds_metadata ALTER COLUMN id SET DEFAULT nextval('ci_buil ALTER TABLE ONLY ci_builds_runner_session ALTER COLUMN id SET DEFAULT nextval('ci_builds_runner_session_id_seq'::regclass); +ALTER TABLE ONLY ci_daily_build_group_report_results ALTER COLUMN id SET DEFAULT nextval('ci_daily_build_group_report_results_id_seq'::regclass); + +ALTER TABLE ONLY ci_deleted_objects ALTER COLUMN id SET DEFAULT nextval('ci_deleted_objects_id_seq'::regclass); + +ALTER TABLE ONLY ci_freeze_periods ALTER COLUMN id SET DEFAULT nextval('ci_freeze_periods_id_seq'::regclass); + ALTER TABLE ONLY ci_group_variables ALTER COLUMN id SET DEFAULT nextval('ci_group_variables_id_seq'::regclass); +ALTER TABLE ONLY ci_instance_variables ALTER COLUMN id SET DEFAULT nextval('ci_instance_variables_id_seq'::regclass); + ALTER TABLE ONLY ci_job_artifacts ALTER COLUMN id SET DEFAULT nextval('ci_job_artifacts_id_seq'::regclass); ALTER TABLE ONLY ci_job_variables ALTER COLUMN id SET DEFAULT nextval('ci_job_variables_id_seq'::regclass); +ALTER TABLE ONLY ci_pipeline_artifacts ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_artifacts_id_seq'::regclass); + ALTER TABLE ONLY ci_pipeline_chat_data ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_chat_data_id_seq'::regclass); +ALTER TABLE ONLY ci_pipeline_messages ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_messages_id_seq'::regclass); + ALTER TABLE ONLY ci_pipeline_schedule_variables ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_schedule_variables_id_seq'::regclass); ALTER TABLE ONLY ci_pipeline_schedules ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_schedules_id_seq'::regclass); @@ -6697,6 +18652,8 @@ ALTER TABLE ONLY ci_pipelines ALTER COLUMN id SET DEFAULT nextval('ci_pipelines_ ALTER TABLE ONLY ci_pipelines_config ALTER COLUMN pipeline_id SET DEFAULT nextval('ci_pipelines_config_pipeline_id_seq'::regclass); +ALTER TABLE ONLY ci_platform_metrics ALTER COLUMN id SET DEFAULT nextval('ci_platform_metrics_id_seq'::regclass); + ALTER TABLE ONLY ci_refs ALTER COLUMN id SET DEFAULT nextval('ci_refs_id_seq'::regclass); ALTER TABLE ONLY ci_resource_groups ALTER COLUMN id SET DEFAULT nextval('ci_resource_groups_id_seq'::regclass); @@ -6711,16 +18668,26 @@ ALTER TABLE ONLY ci_runners ALTER COLUMN id SET DEFAULT nextval('ci_runners_id_s ALTER TABLE ONLY ci_sources_pipelines ALTER COLUMN id SET DEFAULT nextval('ci_sources_pipelines_id_seq'::regclass); +ALTER TABLE ONLY ci_sources_projects ALTER COLUMN id SET DEFAULT nextval('ci_sources_projects_id_seq'::regclass); + ALTER TABLE ONLY ci_stages ALTER COLUMN id SET DEFAULT nextval('ci_stages_id_seq'::regclass); ALTER TABLE ONLY ci_subscriptions_projects ALTER COLUMN id SET DEFAULT nextval('ci_subscriptions_projects_id_seq'::regclass); +ALTER TABLE ONLY ci_test_case_failures ALTER COLUMN id SET DEFAULT nextval('ci_test_case_failures_id_seq'::regclass); + +ALTER TABLE ONLY ci_test_cases ALTER COLUMN id SET DEFAULT nextval('ci_test_cases_id_seq'::regclass); + ALTER TABLE ONLY ci_trigger_requests ALTER COLUMN id SET DEFAULT nextval('ci_trigger_requests_id_seq'::regclass); ALTER TABLE ONLY ci_triggers ALTER COLUMN id SET DEFAULT nextval('ci_triggers_id_seq'::regclass); ALTER TABLE ONLY ci_variables ALTER COLUMN id SET DEFAULT nextval('ci_variables_id_seq'::regclass); +ALTER TABLE ONLY cluster_agent_tokens ALTER COLUMN id SET DEFAULT nextval('cluster_agent_tokens_id_seq'::regclass); + +ALTER TABLE ONLY cluster_agents ALTER COLUMN id SET DEFAULT nextval('cluster_agents_id_seq'::regclass); + ALTER TABLE ONLY cluster_groups ALTER COLUMN id SET DEFAULT nextval('cluster_groups_id_seq'::regclass); ALTER TABLE ONLY cluster_platforms_kubernetes ALTER COLUMN id SET DEFAULT nextval('cluster_platforms_kubernetes_id_seq'::regclass); @@ -6735,10 +18702,14 @@ ALTER TABLE ONLY clusters ALTER COLUMN id SET DEFAULT nextval('clusters_id_seq': ALTER TABLE ONLY clusters_applications_cert_managers ALTER COLUMN id SET DEFAULT nextval('clusters_applications_cert_managers_id_seq'::regclass); +ALTER TABLE ONLY clusters_applications_cilium ALTER COLUMN id SET DEFAULT nextval('clusters_applications_cilium_id_seq'::regclass); + ALTER TABLE ONLY clusters_applications_crossplane ALTER COLUMN id SET DEFAULT nextval('clusters_applications_crossplane_id_seq'::regclass); ALTER TABLE ONLY clusters_applications_elastic_stacks ALTER COLUMN id SET DEFAULT nextval('clusters_applications_elastic_stacks_id_seq'::regclass); +ALTER TABLE ONLY clusters_applications_fluentd ALTER COLUMN id SET DEFAULT nextval('clusters_applications_fluentd_id_seq'::regclass); + ALTER TABLE ONLY clusters_applications_helm ALTER COLUMN id SET DEFAULT nextval('clusters_applications_helm_id_seq'::regclass); ALTER TABLE ONLY clusters_applications_ingress ALTER COLUMN id SET DEFAULT nextval('clusters_applications_ingress_id_seq'::regclass); @@ -6755,14 +18726,32 @@ ALTER TABLE ONLY clusters_kubernetes_namespaces ALTER COLUMN id SET DEFAULT next ALTER TABLE ONLY commit_user_mentions ALTER COLUMN id SET DEFAULT nextval('commit_user_mentions_id_seq'::regclass); +ALTER TABLE ONLY compliance_management_frameworks ALTER COLUMN id SET DEFAULT nextval('compliance_management_frameworks_id_seq'::regclass); + ALTER TABLE ONLY container_repositories ALTER COLUMN id SET DEFAULT nextval('container_repositories_id_seq'::regclass); ALTER TABLE ONLY conversational_development_index_metrics ALTER COLUMN id SET DEFAULT nextval('conversational_development_index_metrics_id_seq'::regclass); +ALTER TABLE ONLY csv_issue_imports ALTER COLUMN id SET DEFAULT nextval('csv_issue_imports_id_seq'::regclass); + +ALTER TABLE ONLY custom_emoji ALTER COLUMN id SET DEFAULT nextval('custom_emoji_id_seq'::regclass); + +ALTER TABLE ONLY dast_scanner_profiles ALTER COLUMN id SET DEFAULT nextval('dast_scanner_profiles_id_seq'::regclass); + +ALTER TABLE ONLY dast_site_profiles ALTER COLUMN id SET DEFAULT nextval('dast_site_profiles_id_seq'::regclass); + +ALTER TABLE ONLY dast_site_tokens ALTER COLUMN id SET DEFAULT nextval('dast_site_tokens_id_seq'::regclass); + +ALTER TABLE ONLY dast_site_validations ALTER COLUMN id SET DEFAULT nextval('dast_site_validations_id_seq'::regclass); + +ALTER TABLE ONLY dast_sites ALTER COLUMN id SET DEFAULT nextval('dast_sites_id_seq'::regclass); + ALTER TABLE ONLY dependency_proxy_blobs ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_blobs_id_seq'::regclass); ALTER TABLE ONLY dependency_proxy_group_settings ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_group_settings_id_seq'::regclass); +ALTER TABLE ONLY dependency_proxy_manifests ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_manifests_id_seq'::regclass); + ALTER TABLE ONLY deploy_keys_projects ALTER COLUMN id SET DEFAULT nextval('deploy_keys_projects_id_seq'::regclass); ALTER TABLE ONLY deploy_tokens ALTER COLUMN id SET DEFAULT nextval('deploy_tokens_id_seq'::regclass); @@ -6773,12 +18762,18 @@ ALTER TABLE ONLY description_versions ALTER COLUMN id SET DEFAULT nextval('descr ALTER TABLE ONLY design_management_designs ALTER COLUMN id SET DEFAULT nextval('design_management_designs_id_seq'::regclass); +ALTER TABLE ONLY design_management_designs_versions ALTER COLUMN id SET DEFAULT nextval('design_management_designs_versions_id_seq'::regclass); + ALTER TABLE ONLY design_management_versions ALTER COLUMN id SET DEFAULT nextval('design_management_versions_id_seq'::regclass); ALTER TABLE ONLY design_user_mentions ALTER COLUMN id SET DEFAULT nextval('design_user_mentions_id_seq'::regclass); +ALTER TABLE ONLY diff_note_positions ALTER COLUMN id SET DEFAULT nextval('diff_note_positions_id_seq'::regclass); + ALTER TABLE ONLY draft_notes ALTER COLUMN id SET DEFAULT nextval('draft_notes_id_seq'::regclass); +ALTER TABLE ONLY elastic_reindexing_tasks ALTER COLUMN id SET DEFAULT nextval('elastic_reindexing_tasks_id_seq'::regclass); + ALTER TABLE ONLY emails ALTER COLUMN id SET DEFAULT nextval('emails_id_seq'::regclass); ALTER TABLE ONLY environments ALTER COLUMN id SET DEFAULT nextval('environments_id_seq'::regclass); @@ -6795,6 +18790,12 @@ ALTER TABLE ONLY events ALTER COLUMN id SET DEFAULT nextval('events_id_seq'::reg ALTER TABLE ONLY evidences ALTER COLUMN id SET DEFAULT nextval('evidences_id_seq'::regclass); +ALTER TABLE ONLY experiment_subjects ALTER COLUMN id SET DEFAULT nextval('experiment_subjects_id_seq'::regclass); + +ALTER TABLE ONLY experiment_users ALTER COLUMN id SET DEFAULT nextval('experiment_users_id_seq'::regclass); + +ALTER TABLE ONLY experiments ALTER COLUMN id SET DEFAULT nextval('experiments_id_seq'::regclass); + ALTER TABLE ONLY external_pull_requests ALTER COLUMN id SET DEFAULT nextval('external_pull_requests_id_seq'::regclass); ALTER TABLE ONLY feature_gates ALTER COLUMN id SET DEFAULT nextval('feature_gates_id_seq'::regclass); @@ -6805,14 +18806,14 @@ ALTER TABLE ONLY fork_network_members ALTER COLUMN id SET DEFAULT nextval('fork_ ALTER TABLE ONLY fork_networks ALTER COLUMN id SET DEFAULT nextval('fork_networks_id_seq'::regclass); -ALTER TABLE ONLY forked_project_links ALTER COLUMN id SET DEFAULT nextval('forked_project_links_id_seq'::regclass); - ALTER TABLE ONLY geo_cache_invalidation_events ALTER COLUMN id SET DEFAULT nextval('geo_cache_invalidation_events_id_seq'::regclass); ALTER TABLE ONLY geo_container_repository_updated_events ALTER COLUMN id SET DEFAULT nextval('geo_container_repository_updated_events_id_seq'::regclass); ALTER TABLE ONLY geo_event_log ALTER COLUMN id SET DEFAULT nextval('geo_event_log_id_seq'::regclass); +ALTER TABLE ONLY geo_events ALTER COLUMN id SET DEFAULT nextval('geo_events_id_seq'::regclass); + ALTER TABLE ONLY geo_hashed_storage_attachments_events ALTER COLUMN id SET DEFAULT nextval('geo_hashed_storage_attachments_events_id_seq'::regclass); ALTER TABLE ONLY geo_hashed_storage_migrated_events ALTER COLUMN id SET DEFAULT nextval('geo_hashed_storage_migrated_events_id_seq'::regclass); @@ -6855,8 +18856,16 @@ ALTER TABLE ONLY grafana_integrations ALTER COLUMN id SET DEFAULT nextval('grafa ALTER TABLE ONLY group_custom_attributes ALTER COLUMN id SET DEFAULT nextval('group_custom_attributes_id_seq'::regclass); +ALTER TABLE ONLY group_deploy_keys ALTER COLUMN id SET DEFAULT nextval('group_deploy_keys_id_seq'::regclass); + +ALTER TABLE ONLY group_deploy_keys_groups ALTER COLUMN id SET DEFAULT nextval('group_deploy_keys_groups_id_seq'::regclass); + +ALTER TABLE ONLY group_deploy_tokens ALTER COLUMN id SET DEFAULT nextval('group_deploy_tokens_id_seq'::regclass); + ALTER TABLE ONLY group_group_links ALTER COLUMN id SET DEFAULT nextval('group_group_links_id_seq'::regclass); +ALTER TABLE ONLY group_import_states ALTER COLUMN group_id SET DEFAULT nextval('group_import_states_group_id_seq'::regclass); + ALTER TABLE ONLY historical_data ALTER COLUMN id SET DEFAULT nextval('historical_data_id_seq'::regclass); ALTER TABLE ONLY identities ALTER COLUMN id SET DEFAULT nextval('identities_id_seq'::regclass); @@ -6865,6 +18874,14 @@ ALTER TABLE ONLY import_export_uploads ALTER COLUMN id SET DEFAULT nextval('impo ALTER TABLE ONLY import_failures ALTER COLUMN id SET DEFAULT nextval('import_failures_id_seq'::regclass); +ALTER TABLE ONLY incident_management_oncall_participants ALTER COLUMN id SET DEFAULT nextval('incident_management_oncall_participants_id_seq'::regclass); + +ALTER TABLE ONLY incident_management_oncall_rotations ALTER COLUMN id SET DEFAULT nextval('incident_management_oncall_rotations_id_seq'::regclass); + +ALTER TABLE ONLY incident_management_oncall_schedules ALTER COLUMN id SET DEFAULT nextval('incident_management_oncall_schedules_id_seq'::regclass); + +ALTER TABLE ONLY incident_management_oncall_shifts ALTER COLUMN id SET DEFAULT nextval('incident_management_oncall_shifts_id_seq'::regclass); + ALTER TABLE ONLY index_statuses ALTER COLUMN id SET DEFAULT nextval('index_statuses_id_seq'::regclass); ALTER TABLE ONLY insights ALTER COLUMN id SET DEFAULT nextval('insights_id_seq'::regclass); @@ -6873,6 +18890,14 @@ ALTER TABLE ONLY internal_ids ALTER COLUMN id SET DEFAULT nextval('internal_ids_ ALTER TABLE ONLY ip_restrictions ALTER COLUMN id SET DEFAULT nextval('ip_restrictions_id_seq'::regclass); +ALTER TABLE ONLY issuable_metric_images ALTER COLUMN id SET DEFAULT nextval('issuable_metric_images_id_seq'::regclass); + +ALTER TABLE ONLY issuable_severities ALTER COLUMN id SET DEFAULT nextval('issuable_severities_id_seq'::regclass); + +ALTER TABLE ONLY issuable_slas ALTER COLUMN id SET DEFAULT nextval('issuable_slas_id_seq'::regclass); + +ALTER TABLE ONLY issue_email_participants ALTER COLUMN id SET DEFAULT nextval('issue_email_participants_id_seq'::regclass); + ALTER TABLE ONLY issue_links ALTER COLUMN id SET DEFAULT nextval('issue_links_id_seq'::regclass); ALTER TABLE ONLY issue_metrics ALTER COLUMN id SET DEFAULT nextval('issue_metrics_id_seq'::regclass); @@ -6887,6 +18912,8 @@ ALTER TABLE ONLY jira_connect_installations ALTER COLUMN id SET DEFAULT nextval( ALTER TABLE ONLY jira_connect_subscriptions ALTER COLUMN id SET DEFAULT nextval('jira_connect_subscriptions_id_seq'::regclass); +ALTER TABLE ONLY jira_imports ALTER COLUMN id SET DEFAULT nextval('jira_imports_id_seq'::regclass); + ALTER TABLE ONLY jira_tracker_data ALTER COLUMN id SET DEFAULT nextval('jira_tracker_data_id_seq'::regclass); ALTER TABLE ONLY keys ALTER COLUMN id SET DEFAULT nextval('keys_id_seq'::regclass); @@ -6917,12 +18944,18 @@ ALTER TABLE ONLY merge_request_assignees ALTER COLUMN id SET DEFAULT nextval('me ALTER TABLE ONLY merge_request_blocks ALTER COLUMN id SET DEFAULT nextval('merge_request_blocks_id_seq'::regclass); +ALTER TABLE ONLY merge_request_cleanup_schedules ALTER COLUMN merge_request_id SET DEFAULT nextval('merge_request_cleanup_schedules_merge_request_id_seq'::regclass); + ALTER TABLE ONLY merge_request_context_commits ALTER COLUMN id SET DEFAULT nextval('merge_request_context_commits_id_seq'::regclass); +ALTER TABLE ONLY merge_request_diff_details ALTER COLUMN merge_request_diff_id SET DEFAULT nextval('merge_request_diff_details_merge_request_diff_id_seq'::regclass); + ALTER TABLE ONLY merge_request_diffs ALTER COLUMN id SET DEFAULT nextval('merge_request_diffs_id_seq'::regclass); ALTER TABLE ONLY merge_request_metrics ALTER COLUMN id SET DEFAULT nextval('merge_request_metrics_id_seq'::regclass); +ALTER TABLE ONLY merge_request_reviewers ALTER COLUMN id SET DEFAULT nextval('merge_request_reviewers_id_seq'::regclass); + ALTER TABLE ONLY merge_request_user_mentions ALTER COLUMN id SET DEFAULT nextval('merge_request_user_mentions_id_seq'::regclass); ALTER TABLE ONLY merge_requests ALTER COLUMN id SET DEFAULT nextval('merge_requests_id_seq'::regclass); @@ -6931,10 +18964,16 @@ ALTER TABLE ONLY merge_requests_closing_issues ALTER COLUMN id SET DEFAULT nextv ALTER TABLE ONLY merge_trains ALTER COLUMN id SET DEFAULT nextval('merge_trains_id_seq'::regclass); +ALTER TABLE ONLY metrics_dashboard_annotations ALTER COLUMN id SET DEFAULT nextval('metrics_dashboard_annotations_id_seq'::regclass); + +ALTER TABLE ONLY metrics_users_starred_dashboards ALTER COLUMN id SET DEFAULT nextval('metrics_users_starred_dashboards_id_seq'::regclass); + ALTER TABLE ONLY milestones ALTER COLUMN id SET DEFAULT nextval('milestones_id_seq'::regclass); ALTER TABLE ONLY namespace_aggregation_schedules ALTER COLUMN namespace_id SET DEFAULT nextval('namespace_aggregation_schedules_namespace_id_seq'::regclass); +ALTER TABLE ONLY namespace_onboarding_actions ALTER COLUMN id SET DEFAULT nextval('namespace_onboarding_actions_id_seq'::regclass); + ALTER TABLE ONLY namespace_root_storage_statistics ALTER COLUMN namespace_id SET DEFAULT nextval('namespace_root_storage_statistics_namespace_id_seq'::regclass); ALTER TABLE ONLY namespace_statistics ALTER COLUMN id SET DEFAULT nextval('namespace_statistics_id_seq'::regclass); @@ -6955,34 +18994,72 @@ ALTER TABLE ONLY oauth_applications ALTER COLUMN id SET DEFAULT nextval('oauth_a ALTER TABLE ONLY oauth_openid_requests ALTER COLUMN id SET DEFAULT nextval('oauth_openid_requests_id_seq'::regclass); +ALTER TABLE ONLY open_project_tracker_data ALTER COLUMN id SET DEFAULT nextval('open_project_tracker_data_id_seq'::regclass); + ALTER TABLE ONLY operations_feature_flag_scopes ALTER COLUMN id SET DEFAULT nextval('operations_feature_flag_scopes_id_seq'::regclass); ALTER TABLE ONLY operations_feature_flags ALTER COLUMN id SET DEFAULT nextval('operations_feature_flags_id_seq'::regclass); ALTER TABLE ONLY operations_feature_flags_clients ALTER COLUMN id SET DEFAULT nextval('operations_feature_flags_clients_id_seq'::regclass); +ALTER TABLE ONLY operations_feature_flags_issues ALTER COLUMN id SET DEFAULT nextval('operations_feature_flags_issues_id_seq'::regclass); + +ALTER TABLE ONLY operations_scopes ALTER COLUMN id SET DEFAULT nextval('operations_scopes_id_seq'::regclass); + +ALTER TABLE ONLY operations_strategies ALTER COLUMN id SET DEFAULT nextval('operations_strategies_id_seq'::regclass); + +ALTER TABLE ONLY operations_strategies_user_lists ALTER COLUMN id SET DEFAULT nextval('operations_strategies_user_lists_id_seq'::regclass); + +ALTER TABLE ONLY operations_user_lists ALTER COLUMN id SET DEFAULT nextval('operations_user_lists_id_seq'::regclass); + ALTER TABLE ONLY packages_build_infos ALTER COLUMN id SET DEFAULT nextval('packages_build_infos_id_seq'::regclass); ALTER TABLE ONLY packages_conan_file_metadata ALTER COLUMN id SET DEFAULT nextval('packages_conan_file_metadata_id_seq'::regclass); ALTER TABLE ONLY packages_conan_metadata ALTER COLUMN id SET DEFAULT nextval('packages_conan_metadata_id_seq'::regclass); +ALTER TABLE ONLY packages_debian_group_architectures ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_architectures_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_group_component_files ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_component_files_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_group_components ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_components_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_group_distributions ALTER COLUMN id SET DEFAULT nextval('packages_debian_group_distributions_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_project_architectures ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_architectures_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_project_component_files ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_component_files_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_project_components ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_components_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_project_distributions ALTER COLUMN id SET DEFAULT nextval('packages_debian_project_distributions_id_seq'::regclass); + +ALTER TABLE ONLY packages_debian_publications ALTER COLUMN id SET DEFAULT nextval('packages_debian_publications_id_seq'::regclass); + ALTER TABLE ONLY packages_dependencies ALTER COLUMN id SET DEFAULT nextval('packages_dependencies_id_seq'::regclass); ALTER TABLE ONLY packages_dependency_links ALTER COLUMN id SET DEFAULT nextval('packages_dependency_links_id_seq'::regclass); +ALTER TABLE ONLY packages_events ALTER COLUMN id SET DEFAULT nextval('packages_events_id_seq'::regclass); + ALTER TABLE ONLY packages_maven_metadata ALTER COLUMN id SET DEFAULT nextval('packages_maven_metadata_id_seq'::regclass); +ALTER TABLE ONLY packages_package_file_build_infos ALTER COLUMN id SET DEFAULT nextval('packages_package_file_build_infos_id_seq'::regclass); + ALTER TABLE ONLY packages_package_files ALTER COLUMN id SET DEFAULT nextval('packages_package_files_id_seq'::regclass); ALTER TABLE ONLY packages_packages ALTER COLUMN id SET DEFAULT nextval('packages_packages_id_seq'::regclass); ALTER TABLE ONLY packages_tags ALTER COLUMN id SET DEFAULT nextval('packages_tags_id_seq'::regclass); +ALTER TABLE ONLY pages_deployments ALTER COLUMN id SET DEFAULT nextval('pages_deployments_id_seq'::regclass); + ALTER TABLE ONLY pages_domain_acme_orders ALTER COLUMN id SET DEFAULT nextval('pages_domain_acme_orders_id_seq'::regclass); ALTER TABLE ONLY pages_domains ALTER COLUMN id SET DEFAULT nextval('pages_domains_id_seq'::regclass); +ALTER TABLE ONLY partitioned_foreign_keys ALTER COLUMN id SET DEFAULT nextval('partitioned_foreign_keys_id_seq'::regclass); + ALTER TABLE ONLY path_locks ALTER COLUMN id SET DEFAULT nextval('path_locks_id_seq'::regclass); ALTER TABLE ONLY personal_access_tokens ALTER COLUMN id SET DEFAULT nextval('personal_access_tokens_id_seq'::regclass); @@ -6993,6 +19070,10 @@ ALTER TABLE ONLY plans ALTER COLUMN id SET DEFAULT nextval('plans_id_seq'::regcl ALTER TABLE ONLY pool_repositories ALTER COLUMN id SET DEFAULT nextval('pool_repositories_id_seq'::regclass); +ALTER TABLE ONLY postgres_reindex_actions ALTER COLUMN id SET DEFAULT nextval('postgres_reindex_actions_id_seq'::regclass); + +ALTER TABLE ONLY product_analytics_events_experimental ALTER COLUMN id SET DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass); + ALTER TABLE ONLY programming_languages ALTER COLUMN id SET DEFAULT nextval('programming_languages_id_seq'::regclass); ALTER TABLE ONLY project_aliases ALTER COLUMN id SET DEFAULT nextval('project_aliases_id_seq'::regclass); @@ -7001,12 +19082,16 @@ ALTER TABLE ONLY project_auto_devops ALTER COLUMN id SET DEFAULT nextval('projec ALTER TABLE ONLY project_ci_cd_settings ALTER COLUMN id SET DEFAULT nextval('project_ci_cd_settings_id_seq'::regclass); +ALTER TABLE ONLY project_compliance_framework_settings ALTER COLUMN project_id SET DEFAULT nextval('project_compliance_framework_settings_project_id_seq'::regclass); + ALTER TABLE ONLY project_custom_attributes ALTER COLUMN id SET DEFAULT nextval('project_custom_attributes_id_seq'::regclass); ALTER TABLE ONLY project_daily_statistics ALTER COLUMN id SET DEFAULT nextval('project_daily_statistics_id_seq'::regclass); ALTER TABLE ONLY project_deploy_tokens ALTER COLUMN id SET DEFAULT nextval('project_deploy_tokens_id_seq'::regclass); +ALTER TABLE ONLY project_export_jobs ALTER COLUMN id SET DEFAULT nextval('project_export_jobs_id_seq'::regclass); + ALTER TABLE ONLY project_features ALTER COLUMN id SET DEFAULT nextval('project_features_id_seq'::regclass); ALTER TABLE ONLY project_group_links ALTER COLUMN id SET DEFAULT nextval('project_group_links_id_seq'::regclass); @@ -7019,6 +19104,10 @@ ALTER TABLE ONLY project_repositories ALTER COLUMN id SET DEFAULT nextval('proje ALTER TABLE ONLY project_repository_states ALTER COLUMN id SET DEFAULT nextval('project_repository_states_id_seq'::regclass); +ALTER TABLE ONLY project_repository_storage_moves ALTER COLUMN id SET DEFAULT nextval('project_repository_storage_moves_id_seq'::regclass); + +ALTER TABLE ONLY project_security_settings ALTER COLUMN project_id SET DEFAULT nextval('project_security_settings_project_id_seq'::regclass); + ALTER TABLE ONLY project_statistics ALTER COLUMN id SET DEFAULT nextval('project_statistics_id_seq'::regclass); ALTER TABLE ONLY project_tracing_settings ALTER COLUMN id SET DEFAULT nextval('project_tracing_settings_id_seq'::regclass); @@ -7049,6 +19138,8 @@ ALTER TABLE ONLY protected_tags ALTER COLUMN id SET DEFAULT nextval('protected_t ALTER TABLE ONLY push_rules ALTER COLUMN id SET DEFAULT nextval('push_rules_id_seq'::regclass); +ALTER TABLE ONLY raw_usage_data ALTER COLUMN id SET DEFAULT nextval('raw_usage_data_id_seq'::regclass); + ALTER TABLE ONLY redirect_routes ALTER COLUMN id SET DEFAULT nextval('redirect_routes_id_seq'::regclass); ALTER TABLE ONLY release_links ALTER COLUMN id SET DEFAULT nextval('release_links_id_seq'::regclass); @@ -7057,18 +19148,38 @@ ALTER TABLE ONLY releases ALTER COLUMN id SET DEFAULT nextval('releases_id_seq': ALTER TABLE ONLY remote_mirrors ALTER COLUMN id SET DEFAULT nextval('remote_mirrors_id_seq'::regclass); +ALTER TABLE ONLY required_code_owners_sections ALTER COLUMN id SET DEFAULT nextval('required_code_owners_sections_id_seq'::regclass); + +ALTER TABLE ONLY requirements ALTER COLUMN id SET DEFAULT nextval('requirements_id_seq'::regclass); + +ALTER TABLE ONLY requirements_management_test_reports ALTER COLUMN id SET DEFAULT nextval('requirements_management_test_reports_id_seq'::regclass); + +ALTER TABLE ONLY resource_iteration_events ALTER COLUMN id SET DEFAULT nextval('resource_iteration_events_id_seq'::regclass); + ALTER TABLE ONLY resource_label_events ALTER COLUMN id SET DEFAULT nextval('resource_label_events_id_seq'::regclass); +ALTER TABLE ONLY resource_milestone_events ALTER COLUMN id SET DEFAULT nextval('resource_milestone_events_id_seq'::regclass); + +ALTER TABLE ONLY resource_state_events ALTER COLUMN id SET DEFAULT nextval('resource_state_events_id_seq'::regclass); + ALTER TABLE ONLY resource_weight_events ALTER COLUMN id SET DEFAULT nextval('resource_weight_events_id_seq'::regclass); ALTER TABLE ONLY reviews ALTER COLUMN id SET DEFAULT nextval('reviews_id_seq'::regclass); ALTER TABLE ONLY routes ALTER COLUMN id SET DEFAULT nextval('routes_id_seq'::regclass); +ALTER TABLE ONLY saml_group_links ALTER COLUMN id SET DEFAULT nextval('saml_group_links_id_seq'::regclass); + ALTER TABLE ONLY saml_providers ALTER COLUMN id SET DEFAULT nextval('saml_providers_id_seq'::regclass); +ALTER TABLE ONLY scim_identities ALTER COLUMN id SET DEFAULT nextval('scim_identities_id_seq'::regclass); + ALTER TABLE ONLY scim_oauth_access_tokens ALTER COLUMN id SET DEFAULT nextval('scim_oauth_access_tokens_id_seq'::regclass); +ALTER TABLE ONLY security_findings ALTER COLUMN id SET DEFAULT nextval('security_findings_id_seq'::regclass); + +ALTER TABLE ONLY security_scans ALTER COLUMN id SET DEFAULT nextval('security_scans_id_seq'::regclass); + ALTER TABLE ONLY self_managed_prometheus_alert_events ALTER COLUMN id SET DEFAULT nextval('self_managed_prometheus_alert_events_id_seq'::regclass); ALTER TABLE ONLY sent_notifications ALTER COLUMN id SET DEFAULT nextval('sent_notifications_id_seq'::regclass); @@ -7083,6 +19194,8 @@ ALTER TABLE ONLY slack_integrations ALTER COLUMN id SET DEFAULT nextval('slack_i ALTER TABLE ONLY smartcard_identities ALTER COLUMN id SET DEFAULT nextval('smartcard_identities_id_seq'::regclass); +ALTER TABLE ONLY snippet_repository_storage_moves ALTER COLUMN id SET DEFAULT nextval('snippet_repository_storage_moves_id_seq'::regclass); + ALTER TABLE ONLY snippet_user_mentions ALTER COLUMN id SET DEFAULT nextval('snippet_user_mentions_id_seq'::regclass); ALTER TABLE ONLY snippets ALTER COLUMN id SET DEFAULT nextval('snippets_id_seq'::regclass); @@ -7093,6 +19206,12 @@ ALTER TABLE ONLY software_licenses ALTER COLUMN id SET DEFAULT nextval('software ALTER TABLE ONLY spam_logs ALTER COLUMN id SET DEFAULT nextval('spam_logs_id_seq'::regclass); +ALTER TABLE ONLY sprints ALTER COLUMN id SET DEFAULT nextval('sprints_id_seq'::regclass); + +ALTER TABLE ONLY status_page_published_incidents ALTER COLUMN id SET DEFAULT nextval('status_page_published_incidents_id_seq'::regclass); + +ALTER TABLE ONLY status_page_settings ALTER COLUMN project_id SET DEFAULT nextval('status_page_settings_project_id_seq'::regclass); + ALTER TABLE ONLY subscriptions ALTER COLUMN id SET DEFAULT nextval('subscriptions_id_seq'::regclass); ALTER TABLE ONLY suggestions ALTER COLUMN id SET DEFAULT nextval('suggestions_id_seq'::regclass); @@ -7105,10 +19224,16 @@ ALTER TABLE ONLY tags ALTER COLUMN id SET DEFAULT nextval('tags_id_seq'::regclas ALTER TABLE ONLY term_agreements ALTER COLUMN id SET DEFAULT nextval('term_agreements_id_seq'::regclass); +ALTER TABLE ONLY terraform_state_versions ALTER COLUMN id SET DEFAULT nextval('terraform_state_versions_id_seq'::regclass); + +ALTER TABLE ONLY terraform_states ALTER COLUMN id SET DEFAULT nextval('terraform_states_id_seq'::regclass); + ALTER TABLE ONLY timelogs ALTER COLUMN id SET DEFAULT nextval('timelogs_id_seq'::regclass); ALTER TABLE ONLY todos ALTER COLUMN id SET DEFAULT nextval('todos_id_seq'::regclass); +ALTER TABLE ONLY token_with_ivs ALTER COLUMN id SET DEFAULT nextval('token_with_ivs_id_seq'::regclass); + ALTER TABLE ONLY trending_projects ALTER COLUMN id SET DEFAULT nextval('trending_projects_id_seq'::regclass); ALTER TABLE ONLY u2f_registrations ALTER COLUMN id SET DEFAULT nextval('u2f_registrations_id_seq'::regclass); @@ -7119,8 +19244,14 @@ ALTER TABLE ONLY user_agent_details ALTER COLUMN id SET DEFAULT nextval('user_ag ALTER TABLE ONLY user_callouts ALTER COLUMN id SET DEFAULT nextval('user_callouts_id_seq'::regclass); +ALTER TABLE ONLY user_canonical_emails ALTER COLUMN id SET DEFAULT nextval('user_canonical_emails_id_seq'::regclass); + ALTER TABLE ONLY user_custom_attributes ALTER COLUMN id SET DEFAULT nextval('user_custom_attributes_id_seq'::regclass); +ALTER TABLE ONLY user_details ALTER COLUMN user_id SET DEFAULT nextval('user_details_user_id_seq'::regclass); + +ALTER TABLE ONLY user_permission_export_uploads ALTER COLUMN id SET DEFAULT nextval('user_permission_export_uploads_id_seq'::regclass); + ALTER TABLE ONLY user_preferences ALTER COLUMN id SET DEFAULT nextval('user_preferences_id_seq'::regclass); ALTER TABLE ONLY user_statuses ALTER COLUMN user_id SET DEFAULT nextval('user_statuses_user_id_seq'::regclass); @@ -7133,10 +19264,24 @@ ALTER TABLE ONLY users_ops_dashboard_projects ALTER COLUMN id SET DEFAULT nextva ALTER TABLE ONLY users_star_projects ALTER COLUMN id SET DEFAULT nextval('users_star_projects_id_seq'::regclass); +ALTER TABLE ONLY users_statistics ALTER COLUMN id SET DEFAULT nextval('users_statistics_id_seq'::regclass); + ALTER TABLE ONLY vulnerabilities ALTER COLUMN id SET DEFAULT nextval('vulnerabilities_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_exports ALTER COLUMN id SET DEFAULT nextval('vulnerability_exports_id_seq'::regclass); + +ALTER TABLE ONLY vulnerability_external_issue_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_external_issue_links_id_seq'::regclass); + ALTER TABLE ONLY vulnerability_feedback ALTER COLUMN id SET DEFAULT nextval('vulnerability_feedback_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_finding_fingerprints ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_fingerprints_id_seq'::regclass); + +ALTER TABLE ONLY vulnerability_finding_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_links_id_seq'::regclass); + +ALTER TABLE ONLY vulnerability_findings_remediations ALTER COLUMN id SET DEFAULT nextval('vulnerability_findings_remediations_id_seq'::regclass); + +ALTER TABLE ONLY vulnerability_historical_statistics ALTER COLUMN id SET DEFAULT nextval('vulnerability_historical_statistics_id_seq'::regclass); + ALTER TABLE ONLY vulnerability_identifiers ALTER COLUMN id SET DEFAULT nextval('vulnerability_identifiers_id_seq'::regclass); ALTER TABLE ONLY vulnerability_issue_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_issue_links_id_seq'::regclass); @@ -7147,14 +19292,24 @@ ALTER TABLE ONLY vulnerability_occurrence_pipelines ALTER COLUMN id SET DEFAULT ALTER TABLE ONLY vulnerability_occurrences ALTER COLUMN id SET DEFAULT nextval('vulnerability_occurrences_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_remediations ALTER COLUMN id SET DEFAULT nextval('vulnerability_remediations_id_seq'::regclass); + ALTER TABLE ONLY vulnerability_scanners ALTER COLUMN id SET DEFAULT nextval('vulnerability_scanners_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_statistics ALTER COLUMN id SET DEFAULT nextval('vulnerability_statistics_id_seq'::regclass); + +ALTER TABLE ONLY vulnerability_user_mentions ALTER COLUMN id SET DEFAULT nextval('vulnerability_user_mentions_id_seq'::regclass); + ALTER TABLE ONLY web_hook_logs ALTER COLUMN id SET DEFAULT nextval('web_hook_logs_id_seq'::regclass); ALTER TABLE ONLY web_hooks ALTER COLUMN id SET DEFAULT nextval('web_hooks_id_seq'::regclass); ALTER TABLE ONLY webauthn_registrations ALTER COLUMN id SET DEFAULT nextval('webauthn_registrations_id_seq'::regclass); +ALTER TABLE ONLY wiki_page_meta ALTER COLUMN id SET DEFAULT nextval('wiki_page_meta_id_seq'::regclass); + +ALTER TABLE ONLY wiki_page_slugs ALTER COLUMN id SET DEFAULT nextval('wiki_page_slugs_id_seq'::regclass); + ALTER TABLE ONLY x509_certificates ALTER COLUMN id SET DEFAULT nextval('x509_certificates_id_seq'::regclass); ALTER TABLE ONLY x509_commit_signatures ALTER COLUMN id SET DEFAULT nextval('x509_commit_signatures_id_seq'::regclass); @@ -7163,9 +19318,216 @@ ALTER TABLE ONLY x509_issuers ALTER COLUMN id SET DEFAULT nextval('x509_issuers_ ALTER TABLE ONLY zoom_meetings ALTER COLUMN id SET DEFAULT nextval('zoom_meetings_id_seq'::regclass); +ALTER TABLE ONLY product_analytics_events_experimental + ADD CONSTRAINT product_analytics_events_experimental_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_00 + ADD CONSTRAINT product_analytics_events_experimental_00_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_01 + ADD CONSTRAINT product_analytics_events_experimental_01_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_02 + ADD CONSTRAINT product_analytics_events_experimental_02_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_03 + ADD CONSTRAINT product_analytics_events_experimental_03_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_04 + ADD CONSTRAINT product_analytics_events_experimental_04_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_05 + ADD CONSTRAINT product_analytics_events_experimental_05_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_06 + ADD CONSTRAINT product_analytics_events_experimental_06_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_07 + ADD CONSTRAINT product_analytics_events_experimental_07_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_08 + ADD CONSTRAINT product_analytics_events_experimental_08_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_09 + ADD CONSTRAINT product_analytics_events_experimental_09_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_10 + ADD CONSTRAINT product_analytics_events_experimental_10_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_11 + ADD CONSTRAINT product_analytics_events_experimental_11_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_12 + ADD CONSTRAINT product_analytics_events_experimental_12_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_13 + ADD CONSTRAINT product_analytics_events_experimental_13_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_14 + ADD CONSTRAINT product_analytics_events_experimental_14_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_15 + ADD CONSTRAINT product_analytics_events_experimental_15_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_16 + ADD CONSTRAINT product_analytics_events_experimental_16_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_17 + ADD CONSTRAINT product_analytics_events_experimental_17_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_18 + ADD CONSTRAINT product_analytics_events_experimental_18_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_19 + ADD CONSTRAINT product_analytics_events_experimental_19_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_20 + ADD CONSTRAINT product_analytics_events_experimental_20_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_21 + ADD CONSTRAINT product_analytics_events_experimental_21_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_22 + ADD CONSTRAINT product_analytics_events_experimental_22_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_23 + ADD CONSTRAINT product_analytics_events_experimental_23_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_24 + ADD CONSTRAINT product_analytics_events_experimental_24_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_25 + ADD CONSTRAINT product_analytics_events_experimental_25_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_26 + ADD CONSTRAINT product_analytics_events_experimental_26_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_27 + ADD CONSTRAINT product_analytics_events_experimental_27_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_28 + ADD CONSTRAINT product_analytics_events_experimental_28_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_29 + ADD CONSTRAINT product_analytics_events_experimental_29_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_30 + ADD CONSTRAINT product_analytics_events_experimental_30_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_31 + ADD CONSTRAINT product_analytics_events_experimental_31_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_32 + ADD CONSTRAINT product_analytics_events_experimental_32_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_33 + ADD CONSTRAINT product_analytics_events_experimental_33_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_34 + ADD CONSTRAINT product_analytics_events_experimental_34_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_35 + ADD CONSTRAINT product_analytics_events_experimental_35_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_36 + ADD CONSTRAINT product_analytics_events_experimental_36_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_37 + ADD CONSTRAINT product_analytics_events_experimental_37_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_38 + ADD CONSTRAINT product_analytics_events_experimental_38_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_39 + ADD CONSTRAINT product_analytics_events_experimental_39_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_40 + ADD CONSTRAINT product_analytics_events_experimental_40_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_41 + ADD CONSTRAINT product_analytics_events_experimental_41_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_42 + ADD CONSTRAINT product_analytics_events_experimental_42_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_43 + ADD CONSTRAINT product_analytics_events_experimental_43_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_44 + ADD CONSTRAINT product_analytics_events_experimental_44_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_45 + ADD CONSTRAINT product_analytics_events_experimental_45_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_46 + ADD CONSTRAINT product_analytics_events_experimental_46_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_47 + ADD CONSTRAINT product_analytics_events_experimental_47_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_48 + ADD CONSTRAINT product_analytics_events_experimental_48_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_49 + ADD CONSTRAINT product_analytics_events_experimental_49_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_50 + ADD CONSTRAINT product_analytics_events_experimental_50_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_51 + ADD CONSTRAINT product_analytics_events_experimental_51_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_52 + ADD CONSTRAINT product_analytics_events_experimental_52_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_53 + ADD CONSTRAINT product_analytics_events_experimental_53_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_54 + ADD CONSTRAINT product_analytics_events_experimental_54_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_55 + ADD CONSTRAINT product_analytics_events_experimental_55_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_56 + ADD CONSTRAINT product_analytics_events_experimental_56_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_57 + ADD CONSTRAINT product_analytics_events_experimental_57_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_58 + ADD CONSTRAINT product_analytics_events_experimental_58_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_59 + ADD CONSTRAINT product_analytics_events_experimental_59_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_60 + ADD CONSTRAINT product_analytics_events_experimental_60_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_61 + ADD CONSTRAINT product_analytics_events_experimental_61_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_62 + ADD CONSTRAINT product_analytics_events_experimental_62_pkey PRIMARY KEY (id, project_id); + +ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_63 + ADD CONSTRAINT product_analytics_events_experimental_63_pkey PRIMARY KEY (id, project_id); + ALTER TABLE ONLY abuse_reports ADD CONSTRAINT abuse_reports_pkey PRIMARY KEY (id); +ALTER TABLE ONLY alert_management_alert_assignees + ADD CONSTRAINT alert_management_alert_assignees_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY alert_management_alert_user_mentions + ADD CONSTRAINT alert_management_alert_user_mentions_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY alert_management_alerts + ADD CONSTRAINT alert_management_alerts_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY alert_management_http_integrations + ADD CONSTRAINT alert_management_http_integrations_pkey PRIMARY KEY (id); + ALTER TABLE ONLY alerts_service_data ADD CONSTRAINT alerts_service_data_pkey PRIMARY KEY (id); @@ -7175,17 +19537,26 @@ ALTER TABLE ONLY allowed_email_domains ALTER TABLE ONLY analytics_cycle_analytics_group_stages ADD CONSTRAINT analytics_cycle_analytics_group_stages_pkey PRIMARY KEY (id); +ALTER TABLE ONLY analytics_cycle_analytics_group_value_streams + ADD CONSTRAINT analytics_cycle_analytics_group_value_streams_pkey PRIMARY KEY (id); + ALTER TABLE ONLY analytics_cycle_analytics_project_stages ADD CONSTRAINT analytics_cycle_analytics_project_stages_pkey PRIMARY KEY (id); -ALTER TABLE ONLY analytics_repository_file_commits - ADD CONSTRAINT analytics_repository_file_commits_pkey PRIMARY KEY (id); +ALTER TABLE ONLY analytics_devops_adoption_segment_selections + ADD CONSTRAINT analytics_devops_adoption_segment_selections_pkey PRIMARY KEY (id); -ALTER TABLE ONLY analytics_repository_file_edits - ADD CONSTRAINT analytics_repository_file_edits_pkey PRIMARY KEY (id); +ALTER TABLE ONLY analytics_devops_adoption_segments + ADD CONSTRAINT analytics_devops_adoption_segments_pkey PRIMARY KEY (id); -ALTER TABLE ONLY analytics_repository_files - ADD CONSTRAINT analytics_repository_files_pkey PRIMARY KEY (id); +ALTER TABLE ONLY analytics_devops_adoption_snapshots + ADD CONSTRAINT analytics_devops_adoption_snapshots_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY analytics_instance_statistics_measurements + ADD CONSTRAINT analytics_instance_statistics_measurements_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY analytics_language_trend_repository_languages + ADD CONSTRAINT analytics_language_trend_repository_languages_pkey PRIMARY KEY (programming_language_id, project_id, snapshot_date); ALTER TABLE ONLY appearances ADD CONSTRAINT appearances_pkey PRIMARY KEY (id); @@ -7217,6 +19588,9 @@ ALTER TABLE ONLY approval_project_rules_groups ALTER TABLE ONLY approval_project_rules ADD CONSTRAINT approval_project_rules_pkey PRIMARY KEY (id); +ALTER TABLE ONLY approval_project_rules_protected_branches + ADD CONSTRAINT approval_project_rules_protected_branches_pkey PRIMARY KEY (approval_project_rule_id, protected_branch_id); + ALTER TABLE ONLY approval_project_rules_users ADD CONSTRAINT approval_project_rules_users_pkey PRIMARY KEY (id); @@ -7229,8 +19603,17 @@ ALTER TABLE ONLY approver_groups ALTER TABLE ONLY approvers ADD CONSTRAINT approvers_pkey PRIMARY KEY (id); +ALTER TABLE ONLY atlassian_identities + ADD CONSTRAINT atlassian_identities_pkey PRIMARY KEY (user_id); + +ALTER TABLE ONLY audit_events_archived + ADD CONSTRAINT audit_events_archived_pkey PRIMARY KEY (id); + ALTER TABLE ONLY audit_events - ADD CONSTRAINT audit_events_pkey PRIMARY KEY (id); + ADD CONSTRAINT audit_events_pkey PRIMARY KEY (id, created_at); + +ALTER TABLE ONLY authentication_events + ADD CONSTRAINT authentication_events_pkey PRIMARY KEY (id); ALTER TABLE ONLY award_emoji ADD CONSTRAINT award_emoji_pkey PRIMARY KEY (id); @@ -7238,6 +19621,12 @@ ALTER TABLE ONLY award_emoji ALTER TABLE ONLY aws_roles ADD CONSTRAINT aws_roles_pkey PRIMARY KEY (user_id); +ALTER TABLE ONLY background_migration_jobs + ADD CONSTRAINT background_migration_jobs_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY backup_labels + ADD CONSTRAINT backup_labels_pkey PRIMARY KEY (id); + ALTER TABLE ONLY badges ADD CONSTRAINT badges_pkey PRIMARY KEY (id); @@ -7253,27 +19642,72 @@ ALTER TABLE ONLY board_labels ALTER TABLE ONLY board_project_recent_visits ADD CONSTRAINT board_project_recent_visits_pkey PRIMARY KEY (id); +ALTER TABLE ONLY board_user_preferences + ADD CONSTRAINT board_user_preferences_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY boards_epic_board_labels + ADD CONSTRAINT boards_epic_board_labels_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY boards_epic_board_positions + ADD CONSTRAINT boards_epic_board_positions_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY boards_epic_boards + ADD CONSTRAINT boards_epic_boards_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY boards_epic_user_preferences + ADD CONSTRAINT boards_epic_user_preferences_pkey PRIMARY KEY (id); + ALTER TABLE ONLY boards ADD CONSTRAINT boards_pkey PRIMARY KEY (id); ALTER TABLE ONLY broadcast_messages ADD CONSTRAINT broadcast_messages_pkey PRIMARY KEY (id); +ALTER TABLE ONLY bulk_import_configurations + ADD CONSTRAINT bulk_import_configurations_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY bulk_import_entities + ADD CONSTRAINT bulk_import_entities_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY bulk_import_failures + ADD CONSTRAINT bulk_import_failures_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY bulk_import_trackers + ADD CONSTRAINT bulk_import_trackers_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY bulk_imports + ADD CONSTRAINT bulk_imports_pkey PRIMARY KEY (id); + ALTER TABLE ONLY chat_names ADD CONSTRAINT chat_names_pkey PRIMARY KEY (id); ALTER TABLE ONLY chat_teams ADD CONSTRAINT chat_teams_pkey PRIMARY KEY (id); +ALTER TABLE vulnerability_scanners + ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID; + +ALTER TABLE group_import_states + ADD CONSTRAINT check_cda75c7c3f CHECK ((user_id IS NOT NULL)) NOT VALID; + ALTER TABLE ONLY ci_build_needs ADD CONSTRAINT ci_build_needs_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ci_build_pending_states + ADD CONSTRAINT ci_build_pending_states_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY ci_build_report_results + ADD CONSTRAINT ci_build_report_results_pkey PRIMARY KEY (build_id); + ALTER TABLE ONLY ci_build_trace_chunks ADD CONSTRAINT ci_build_trace_chunks_pkey PRIMARY KEY (id); ALTER TABLE ONLY ci_build_trace_section_names ADD CONSTRAINT ci_build_trace_section_names_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ci_build_trace_sections + ADD CONSTRAINT ci_build_trace_sections_pkey PRIMARY KEY (build_id, section_name_id); + ALTER TABLE ONLY ci_builds_metadata ADD CONSTRAINT ci_builds_metadata_pkey PRIMARY KEY (id); @@ -7283,18 +19717,36 @@ ALTER TABLE ONLY ci_builds ALTER TABLE ONLY ci_builds_runner_session ADD CONSTRAINT ci_builds_runner_session_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ci_daily_build_group_report_results + ADD CONSTRAINT ci_daily_build_group_report_results_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY ci_deleted_objects + ADD CONSTRAINT ci_deleted_objects_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY ci_freeze_periods + ADD CONSTRAINT ci_freeze_periods_pkey PRIMARY KEY (id); + ALTER TABLE ONLY ci_group_variables ADD CONSTRAINT ci_group_variables_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ci_instance_variables + ADD CONSTRAINT ci_instance_variables_pkey PRIMARY KEY (id); + ALTER TABLE ONLY ci_job_artifacts ADD CONSTRAINT ci_job_artifacts_pkey PRIMARY KEY (id); ALTER TABLE ONLY ci_job_variables ADD CONSTRAINT ci_job_variables_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ci_pipeline_artifacts + ADD CONSTRAINT ci_pipeline_artifacts_pkey PRIMARY KEY (id); + ALTER TABLE ONLY ci_pipeline_chat_data ADD CONSTRAINT ci_pipeline_chat_data_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ci_pipeline_messages + ADD CONSTRAINT ci_pipeline_messages_pkey PRIMARY KEY (id); + ALTER TABLE ONLY ci_pipeline_schedule_variables ADD CONSTRAINT ci_pipeline_schedule_variables_pkey PRIMARY KEY (id); @@ -7310,6 +19762,9 @@ ALTER TABLE ONLY ci_pipelines_config ALTER TABLE ONLY ci_pipelines ADD CONSTRAINT ci_pipelines_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ci_platform_metrics + ADD CONSTRAINT ci_platform_metrics_pkey PRIMARY KEY (id); + ALTER TABLE ONLY ci_refs ADD CONSTRAINT ci_refs_pkey PRIMARY KEY (id); @@ -7331,12 +19786,21 @@ ALTER TABLE ONLY ci_runners ALTER TABLE ONLY ci_sources_pipelines ADD CONSTRAINT ci_sources_pipelines_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ci_sources_projects + ADD CONSTRAINT ci_sources_projects_pkey PRIMARY KEY (id); + ALTER TABLE ONLY ci_stages ADD CONSTRAINT ci_stages_pkey PRIMARY KEY (id); ALTER TABLE ONLY ci_subscriptions_projects ADD CONSTRAINT ci_subscriptions_projects_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ci_test_case_failures + ADD CONSTRAINT ci_test_case_failures_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY ci_test_cases + ADD CONSTRAINT ci_test_cases_pkey PRIMARY KEY (id); + ALTER TABLE ONLY ci_trigger_requests ADD CONSTRAINT ci_trigger_requests_pkey PRIMARY KEY (id); @@ -7346,6 +19810,12 @@ ALTER TABLE ONLY ci_triggers ALTER TABLE ONLY ci_variables ADD CONSTRAINT ci_variables_pkey PRIMARY KEY (id); +ALTER TABLE ONLY cluster_agent_tokens + ADD CONSTRAINT cluster_agent_tokens_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY cluster_agents + ADD CONSTRAINT cluster_agents_pkey PRIMARY KEY (id); + ALTER TABLE ONLY cluster_groups ADD CONSTRAINT cluster_groups_pkey PRIMARY KEY (id); @@ -7364,12 +19834,18 @@ ALTER TABLE ONLY cluster_providers_gcp ALTER TABLE ONLY clusters_applications_cert_managers ADD CONSTRAINT clusters_applications_cert_managers_pkey PRIMARY KEY (id); +ALTER TABLE ONLY clusters_applications_cilium + ADD CONSTRAINT clusters_applications_cilium_pkey PRIMARY KEY (id); + ALTER TABLE ONLY clusters_applications_crossplane ADD CONSTRAINT clusters_applications_crossplane_pkey PRIMARY KEY (id); ALTER TABLE ONLY clusters_applications_elastic_stacks ADD CONSTRAINT clusters_applications_elastic_stacks_pkey PRIMARY KEY (id); +ALTER TABLE ONLY clusters_applications_fluentd + ADD CONSTRAINT clusters_applications_fluentd_pkey PRIMARY KEY (id); + ALTER TABLE ONLY clusters_applications_helm ADD CONSTRAINT clusters_applications_helm_pkey PRIMARY KEY (id); @@ -7397,6 +19873,9 @@ ALTER TABLE ONLY clusters ALTER TABLE ONLY commit_user_mentions ADD CONSTRAINT commit_user_mentions_pkey PRIMARY KEY (id); +ALTER TABLE ONLY compliance_management_frameworks + ADD CONSTRAINT compliance_management_frameworks_pkey PRIMARY KEY (id); + ALTER TABLE ONLY container_expiration_policies ADD CONSTRAINT container_expiration_policies_pkey PRIMARY KEY (project_id); @@ -7406,18 +19885,48 @@ ALTER TABLE ONLY container_repositories ALTER TABLE ONLY conversational_development_index_metrics ADD CONSTRAINT conversational_development_index_metrics_pkey PRIMARY KEY (id); +ALTER TABLE ONLY csv_issue_imports + ADD CONSTRAINT csv_issue_imports_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY custom_emoji + ADD CONSTRAINT custom_emoji_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY dast_scanner_profiles + ADD CONSTRAINT dast_scanner_profiles_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY dast_site_profiles + ADD CONSTRAINT dast_site_profiles_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY dast_site_tokens + ADD CONSTRAINT dast_site_tokens_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY dast_site_validations + ADD CONSTRAINT dast_site_validations_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY dast_sites + ADD CONSTRAINT dast_sites_pkey PRIMARY KEY (id); + ALTER TABLE ONLY dependency_proxy_blobs ADD CONSTRAINT dependency_proxy_blobs_pkey PRIMARY KEY (id); ALTER TABLE ONLY dependency_proxy_group_settings ADD CONSTRAINT dependency_proxy_group_settings_pkey PRIMARY KEY (id); +ALTER TABLE ONLY dependency_proxy_manifests + ADD CONSTRAINT dependency_proxy_manifests_pkey PRIMARY KEY (id); + ALTER TABLE ONLY deploy_keys_projects ADD CONSTRAINT deploy_keys_projects_pkey PRIMARY KEY (id); ALTER TABLE ONLY deploy_tokens ADD CONSTRAINT deploy_tokens_pkey PRIMARY KEY (id); +ALTER TABLE ONLY deployment_clusters + ADD CONSTRAINT deployment_clusters_pkey PRIMARY KEY (deployment_id); + +ALTER TABLE ONLY deployment_merge_requests + ADD CONSTRAINT deployment_merge_requests_pkey PRIMARY KEY (deployment_id, merge_request_id); + ALTER TABLE ONLY deployments ADD CONSTRAINT deployments_pkey PRIMARY KEY (id); @@ -7427,15 +19936,30 @@ ALTER TABLE ONLY description_versions ALTER TABLE ONLY design_management_designs ADD CONSTRAINT design_management_designs_pkey PRIMARY KEY (id); +ALTER TABLE ONLY design_management_designs_versions + ADD CONSTRAINT design_management_designs_versions_pkey PRIMARY KEY (id); + ALTER TABLE ONLY design_management_versions ADD CONSTRAINT design_management_versions_pkey PRIMARY KEY (id); ALTER TABLE ONLY design_user_mentions ADD CONSTRAINT design_user_mentions_pkey PRIMARY KEY (id); +ALTER TABLE ONLY diff_note_positions + ADD CONSTRAINT diff_note_positions_pkey PRIMARY KEY (id); + ALTER TABLE ONLY draft_notes ADD CONSTRAINT draft_notes_pkey PRIMARY KEY (id); +ALTER TABLE ONLY elastic_reindexing_tasks + ADD CONSTRAINT elastic_reindexing_tasks_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY elasticsearch_indexed_namespaces + ADD CONSTRAINT elasticsearch_indexed_namespaces_pkey PRIMARY KEY (namespace_id); + +ALTER TABLE ONLY elasticsearch_indexed_projects + ADD CONSTRAINT elasticsearch_indexed_projects_pkey PRIMARY KEY (project_id); + ALTER TABLE ONLY emails ADD CONSTRAINT emails_pkey PRIMARY KEY (id); @@ -7460,6 +19984,15 @@ ALTER TABLE ONLY events ALTER TABLE ONLY evidences ADD CONSTRAINT evidences_pkey PRIMARY KEY (id); +ALTER TABLE ONLY experiment_subjects + ADD CONSTRAINT experiment_subjects_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY experiment_users + ADD CONSTRAINT experiment_users_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY experiments + ADD CONSTRAINT experiments_pkey PRIMARY KEY (id); + ALTER TABLE ONLY external_pull_requests ADD CONSTRAINT external_pull_requests_pkey PRIMARY KEY (id); @@ -7475,9 +20008,6 @@ ALTER TABLE ONLY fork_network_members ALTER TABLE ONLY fork_networks ADD CONSTRAINT fork_networks_pkey PRIMARY KEY (id); -ALTER TABLE ONLY forked_project_links - ADD CONSTRAINT forked_project_links_pkey PRIMARY KEY (id); - ALTER TABLE ONLY geo_cache_invalidation_events ADD CONSTRAINT geo_cache_invalidation_events_pkey PRIMARY KEY (id); @@ -7487,6 +20017,9 @@ ALTER TABLE ONLY geo_container_repository_updated_events ALTER TABLE ONLY geo_event_log ADD CONSTRAINT geo_event_log_pkey PRIMARY KEY (id); +ALTER TABLE ONLY geo_events + ADD CONSTRAINT geo_events_pkey PRIMARY KEY (id); + ALTER TABLE ONLY geo_hashed_storage_attachments_events ADD CONSTRAINT geo_hashed_storage_attachments_events_pkey PRIMARY KEY (id); @@ -7553,9 +20086,24 @@ ALTER TABLE ONLY group_custom_attributes ALTER TABLE ONLY group_deletion_schedules ADD CONSTRAINT group_deletion_schedules_pkey PRIMARY KEY (group_id); +ALTER TABLE ONLY group_deploy_keys_groups + ADD CONSTRAINT group_deploy_keys_groups_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY group_deploy_keys + ADD CONSTRAINT group_deploy_keys_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY group_deploy_tokens + ADD CONSTRAINT group_deploy_tokens_pkey PRIMARY KEY (id); + ALTER TABLE ONLY group_group_links ADD CONSTRAINT group_group_links_pkey PRIMARY KEY (id); +ALTER TABLE ONLY group_import_states + ADD CONSTRAINT group_import_states_pkey PRIMARY KEY (group_id); + +ALTER TABLE ONLY group_wiki_repositories + ADD CONSTRAINT group_wiki_repositories_pkey PRIMARY KEY (group_id); + ALTER TABLE ONLY historical_data ADD CONSTRAINT historical_data_pkey PRIMARY KEY (id); @@ -7568,6 +20116,21 @@ ALTER TABLE ONLY import_export_uploads ALTER TABLE ONLY import_failures ADD CONSTRAINT import_failures_pkey PRIMARY KEY (id); +ALTER TABLE ONLY incident_management_oncall_shifts + ADD CONSTRAINT inc_mgmnt_no_overlapping_oncall_shifts EXCLUDE USING gist (rotation_id WITH =, tstzrange(starts_at, ends_at, '[)'::text) WITH &&); + +ALTER TABLE ONLY incident_management_oncall_participants + ADD CONSTRAINT incident_management_oncall_participants_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY incident_management_oncall_rotations + ADD CONSTRAINT incident_management_oncall_rotations_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY incident_management_oncall_schedules + ADD CONSTRAINT incident_management_oncall_schedules_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY incident_management_oncall_shifts + ADD CONSTRAINT incident_management_oncall_shifts_pkey PRIMARY KEY (id); + ALTER TABLE ONLY index_statuses ADD CONSTRAINT index_statuses_pkey PRIMARY KEY (id); @@ -7580,6 +20143,21 @@ ALTER TABLE ONLY internal_ids ALTER TABLE ONLY ip_restrictions ADD CONSTRAINT ip_restrictions_pkey PRIMARY KEY (id); +ALTER TABLE ONLY issuable_metric_images + ADD CONSTRAINT issuable_metric_images_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY issuable_severities + ADD CONSTRAINT issuable_severities_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY issuable_slas + ADD CONSTRAINT issuable_slas_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY issue_assignees + ADD CONSTRAINT issue_assignees_pkey PRIMARY KEY (issue_id, user_id); + +ALTER TABLE ONLY issue_email_participants + ADD CONSTRAINT issue_email_participants_pkey PRIMARY KEY (id); + ALTER TABLE ONLY issue_links ADD CONSTRAINT issue_links_pkey PRIMARY KEY (id); @@ -7595,12 +20173,27 @@ ALTER TABLE ONLY issue_user_mentions ALTER TABLE ONLY issues ADD CONSTRAINT issues_pkey PRIMARY KEY (id); +ALTER TABLE ONLY issues_prometheus_alert_events + ADD CONSTRAINT issues_prometheus_alert_events_pkey PRIMARY KEY (issue_id, prometheus_alert_event_id); + +ALTER TABLE ONLY issues_self_managed_prometheus_alert_events + ADD CONSTRAINT issues_self_managed_prometheus_alert_events_pkey PRIMARY KEY (issue_id, self_managed_prometheus_alert_event_id); + +ALTER TABLE ONLY sprints + ADD CONSTRAINT iteration_start_and_due_daterange_group_id_constraint EXCLUDE USING gist (group_id WITH =, daterange(start_date, due_date, '[]'::text) WITH &&) WHERE ((group_id IS NOT NULL)); + +ALTER TABLE ONLY sprints + ADD CONSTRAINT iteration_start_and_due_daterange_project_id_constraint EXCLUDE USING gist (project_id WITH =, daterange(start_date, due_date, '[]'::text) WITH &&) WHERE ((project_id IS NOT NULL)); + ALTER TABLE ONLY jira_connect_installations ADD CONSTRAINT jira_connect_installations_pkey PRIMARY KEY (id); ALTER TABLE ONLY jira_connect_subscriptions ADD CONSTRAINT jira_connect_subscriptions_pkey PRIMARY KEY (id); +ALTER TABLE ONLY jira_imports + ADD CONSTRAINT jira_imports_pkey PRIMARY KEY (id); + ALTER TABLE ONLY jira_tracker_data ADD CONSTRAINT jira_tracker_data_pkey PRIMARY KEY (id); @@ -7646,15 +20239,33 @@ ALTER TABLE ONLY merge_request_assignees ALTER TABLE ONLY merge_request_blocks ADD CONSTRAINT merge_request_blocks_pkey PRIMARY KEY (id); +ALTER TABLE ONLY merge_request_cleanup_schedules + ADD CONSTRAINT merge_request_cleanup_schedules_pkey PRIMARY KEY (merge_request_id); + +ALTER TABLE ONLY merge_request_context_commit_diff_files + ADD CONSTRAINT merge_request_context_commit_diff_files_pkey PRIMARY KEY (merge_request_context_commit_id, relative_order); + ALTER TABLE ONLY merge_request_context_commits ADD CONSTRAINT merge_request_context_commits_pkey PRIMARY KEY (id); +ALTER TABLE ONLY merge_request_diff_commits + ADD CONSTRAINT merge_request_diff_commits_pkey PRIMARY KEY (merge_request_diff_id, relative_order); + +ALTER TABLE ONLY merge_request_diff_details + ADD CONSTRAINT merge_request_diff_details_pkey PRIMARY KEY (merge_request_diff_id); + +ALTER TABLE ONLY merge_request_diff_files + ADD CONSTRAINT merge_request_diff_files_pkey PRIMARY KEY (merge_request_diff_id, relative_order); + ALTER TABLE ONLY merge_request_diffs ADD CONSTRAINT merge_request_diffs_pkey PRIMARY KEY (id); ALTER TABLE ONLY merge_request_metrics ADD CONSTRAINT merge_request_metrics_pkey PRIMARY KEY (id); +ALTER TABLE ONLY merge_request_reviewers + ADD CONSTRAINT merge_request_reviewers_pkey PRIMARY KEY (id); + ALTER TABLE ONLY merge_request_user_mentions ADD CONSTRAINT merge_request_user_mentions_pkey PRIMARY KEY (id); @@ -7667,15 +20278,33 @@ ALTER TABLE ONLY merge_requests ALTER TABLE ONLY merge_trains ADD CONSTRAINT merge_trains_pkey PRIMARY KEY (id); +ALTER TABLE ONLY metrics_dashboard_annotations + ADD CONSTRAINT metrics_dashboard_annotations_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY metrics_users_starred_dashboards + ADD CONSTRAINT metrics_users_starred_dashboards_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY milestone_releases + ADD CONSTRAINT milestone_releases_pkey PRIMARY KEY (milestone_id, release_id); + ALTER TABLE ONLY milestones ADD CONSTRAINT milestones_pkey PRIMARY KEY (id); ALTER TABLE ONLY namespace_aggregation_schedules ADD CONSTRAINT namespace_aggregation_schedules_pkey PRIMARY KEY (namespace_id); +ALTER TABLE ONLY namespace_limits + ADD CONSTRAINT namespace_limits_pkey PRIMARY KEY (namespace_id); + +ALTER TABLE ONLY namespace_onboarding_actions + ADD CONSTRAINT namespace_onboarding_actions_pkey PRIMARY KEY (id); + ALTER TABLE ONLY namespace_root_storage_statistics ADD CONSTRAINT namespace_root_storage_statistics_pkey PRIMARY KEY (namespace_id); +ALTER TABLE ONLY namespace_settings + ADD CONSTRAINT namespace_settings_pkey PRIMARY KEY (namespace_id); + ALTER TABLE ONLY namespace_statistics ADD CONSTRAINT namespace_statistics_pkey PRIMARY KEY (id); @@ -7703,48 +20332,120 @@ ALTER TABLE ONLY oauth_applications ALTER TABLE ONLY oauth_openid_requests ADD CONSTRAINT oauth_openid_requests_pkey PRIMARY KEY (id); +ALTER TABLE ONLY open_project_tracker_data + ADD CONSTRAINT open_project_tracker_data_pkey PRIMARY KEY (id); + ALTER TABLE ONLY operations_feature_flag_scopes ADD CONSTRAINT operations_feature_flag_scopes_pkey PRIMARY KEY (id); ALTER TABLE ONLY operations_feature_flags_clients ADD CONSTRAINT operations_feature_flags_clients_pkey PRIMARY KEY (id); +ALTER TABLE ONLY operations_feature_flags_issues + ADD CONSTRAINT operations_feature_flags_issues_pkey PRIMARY KEY (id); + ALTER TABLE ONLY operations_feature_flags ADD CONSTRAINT operations_feature_flags_pkey PRIMARY KEY (id); +ALTER TABLE ONLY operations_scopes + ADD CONSTRAINT operations_scopes_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY operations_strategies + ADD CONSTRAINT operations_strategies_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY operations_strategies_user_lists + ADD CONSTRAINT operations_strategies_user_lists_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY operations_user_lists + ADD CONSTRAINT operations_user_lists_pkey PRIMARY KEY (id); + ALTER TABLE ONLY packages_build_infos ADD CONSTRAINT packages_build_infos_pkey PRIMARY KEY (id); +ALTER TABLE ONLY packages_composer_metadata + ADD CONSTRAINT packages_composer_metadata_pkey PRIMARY KEY (package_id); + ALTER TABLE ONLY packages_conan_file_metadata ADD CONSTRAINT packages_conan_file_metadata_pkey PRIMARY KEY (id); ALTER TABLE ONLY packages_conan_metadata ADD CONSTRAINT packages_conan_metadata_pkey PRIMARY KEY (id); +ALTER TABLE ONLY packages_debian_file_metadata + ADD CONSTRAINT packages_debian_file_metadata_pkey PRIMARY KEY (package_file_id); + +ALTER TABLE ONLY packages_debian_group_architectures + ADD CONSTRAINT packages_debian_group_architectures_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY packages_debian_group_component_files + ADD CONSTRAINT packages_debian_group_component_files_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY packages_debian_group_components + ADD CONSTRAINT packages_debian_group_components_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY packages_debian_group_distributions + ADD CONSTRAINT packages_debian_group_distributions_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY packages_debian_project_architectures + ADD CONSTRAINT packages_debian_project_architectures_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY packages_debian_project_component_files + ADD CONSTRAINT packages_debian_project_component_files_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY packages_debian_project_components + ADD CONSTRAINT packages_debian_project_components_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY packages_debian_project_distributions + ADD CONSTRAINT packages_debian_project_distributions_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY packages_debian_publications + ADD CONSTRAINT packages_debian_publications_pkey PRIMARY KEY (id); + ALTER TABLE ONLY packages_dependencies ADD CONSTRAINT packages_dependencies_pkey PRIMARY KEY (id); ALTER TABLE ONLY packages_dependency_links ADD CONSTRAINT packages_dependency_links_pkey PRIMARY KEY (id); +ALTER TABLE ONLY packages_events + ADD CONSTRAINT packages_events_pkey PRIMARY KEY (id); + ALTER TABLE ONLY packages_maven_metadata ADD CONSTRAINT packages_maven_metadata_pkey PRIMARY KEY (id); +ALTER TABLE ONLY packages_nuget_dependency_link_metadata + ADD CONSTRAINT packages_nuget_dependency_link_metadata_pkey PRIMARY KEY (dependency_link_id); + +ALTER TABLE ONLY packages_nuget_metadata + ADD CONSTRAINT packages_nuget_metadata_pkey PRIMARY KEY (package_id); + +ALTER TABLE ONLY packages_package_file_build_infos + ADD CONSTRAINT packages_package_file_build_infos_pkey PRIMARY KEY (id); + ALTER TABLE ONLY packages_package_files ADD CONSTRAINT packages_package_files_pkey PRIMARY KEY (id); ALTER TABLE ONLY packages_packages ADD CONSTRAINT packages_packages_pkey PRIMARY KEY (id); +ALTER TABLE ONLY packages_pypi_metadata + ADD CONSTRAINT packages_pypi_metadata_pkey PRIMARY KEY (package_id); + ALTER TABLE ONLY packages_tags ADD CONSTRAINT packages_tags_pkey PRIMARY KEY (id); +ALTER TABLE ONLY pages_deployments + ADD CONSTRAINT pages_deployments_pkey PRIMARY KEY (id); + ALTER TABLE ONLY pages_domain_acme_orders ADD CONSTRAINT pages_domain_acme_orders_pkey PRIMARY KEY (id); ALTER TABLE ONLY pages_domains ADD CONSTRAINT pages_domains_pkey PRIMARY KEY (id); +ALTER TABLE ONLY partitioned_foreign_keys + ADD CONSTRAINT partitioned_foreign_keys_pkey PRIMARY KEY (id); + ALTER TABLE ONLY path_locks ADD CONSTRAINT path_locks_pkey PRIMARY KEY (id); @@ -7760,21 +20461,33 @@ ALTER TABLE ONLY plans ALTER TABLE ONLY pool_repositories ADD CONSTRAINT pool_repositories_pkey PRIMARY KEY (id); +ALTER TABLE ONLY postgres_reindex_actions + ADD CONSTRAINT postgres_reindex_actions_pkey PRIMARY KEY (id); + ALTER TABLE ONLY programming_languages ADD CONSTRAINT programming_languages_pkey PRIMARY KEY (id); +ALTER TABLE ONLY project_access_tokens + ADD CONSTRAINT project_access_tokens_pkey PRIMARY KEY (personal_access_token_id, project_id); + ALTER TABLE ONLY project_alerting_settings ADD CONSTRAINT project_alerting_settings_pkey PRIMARY KEY (project_id); ALTER TABLE ONLY project_aliases ADD CONSTRAINT project_aliases_pkey PRIMARY KEY (id); +ALTER TABLE ONLY project_authorizations + ADD CONSTRAINT project_authorizations_pkey PRIMARY KEY (user_id, project_id, access_level); + ALTER TABLE ONLY project_auto_devops ADD CONSTRAINT project_auto_devops_pkey PRIMARY KEY (id); ALTER TABLE ONLY project_ci_cd_settings ADD CONSTRAINT project_ci_cd_settings_pkey PRIMARY KEY (id); +ALTER TABLE ONLY project_compliance_framework_settings + ADD CONSTRAINT project_compliance_framework_settings_pkey PRIMARY KEY (project_id); + ALTER TABLE ONLY project_custom_attributes ADD CONSTRAINT project_custom_attributes_pkey PRIMARY KEY (id); @@ -7787,6 +20500,9 @@ ALTER TABLE ONLY project_deploy_tokens ALTER TABLE ONLY project_error_tracking_settings ADD CONSTRAINT project_error_tracking_settings_pkey PRIMARY KEY (project_id); +ALTER TABLE ONLY project_export_jobs + ADD CONSTRAINT project_export_jobs_pkey PRIMARY KEY (id); + ALTER TABLE ONLY project_feature_usages ADD CONSTRAINT project_feature_usages_pkey PRIMARY KEY (project_id); @@ -7808,12 +20524,21 @@ ALTER TABLE ONLY project_metrics_settings ALTER TABLE ONLY project_mirror_data ADD CONSTRAINT project_mirror_data_pkey PRIMARY KEY (id); +ALTER TABLE ONLY project_pages_metadata + ADD CONSTRAINT project_pages_metadata_pkey PRIMARY KEY (project_id); + ALTER TABLE ONLY project_repositories ADD CONSTRAINT project_repositories_pkey PRIMARY KEY (id); ALTER TABLE ONLY project_repository_states ADD CONSTRAINT project_repository_states_pkey PRIMARY KEY (id); +ALTER TABLE ONLY project_repository_storage_moves + ADD CONSTRAINT project_repository_storage_moves_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY project_security_settings + ADD CONSTRAINT project_security_settings_pkey PRIMARY KEY (project_id); + ALTER TABLE ONLY project_settings ADD CONSTRAINT project_settings_pkey PRIMARY KEY (project_id); @@ -7859,9 +20584,15 @@ ALTER TABLE ONLY protected_tag_create_access_levels ALTER TABLE ONLY protected_tags ADD CONSTRAINT protected_tags_pkey PRIMARY KEY (id); +ALTER TABLE ONLY push_event_payloads + ADD CONSTRAINT push_event_payloads_pkey PRIMARY KEY (event_id); + ALTER TABLE ONLY push_rules ADD CONSTRAINT push_rules_pkey PRIMARY KEY (id); +ALTER TABLE ONLY raw_usage_data + ADD CONSTRAINT raw_usage_data_pkey PRIMARY KEY (id); + ALTER TABLE ONLY redirect_routes ADD CONSTRAINT redirect_routes_pkey PRIMARY KEY (id); @@ -7874,9 +20605,30 @@ ALTER TABLE ONLY releases ALTER TABLE ONLY remote_mirrors ADD CONSTRAINT remote_mirrors_pkey PRIMARY KEY (id); +ALTER TABLE ONLY repository_languages + ADD CONSTRAINT repository_languages_pkey PRIMARY KEY (project_id, programming_language_id); + +ALTER TABLE ONLY required_code_owners_sections + ADD CONSTRAINT required_code_owners_sections_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY requirements_management_test_reports + ADD CONSTRAINT requirements_management_test_reports_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY requirements + ADD CONSTRAINT requirements_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY resource_iteration_events + ADD CONSTRAINT resource_iteration_events_pkey PRIMARY KEY (id); + ALTER TABLE ONLY resource_label_events ADD CONSTRAINT resource_label_events_pkey PRIMARY KEY (id); +ALTER TABLE ONLY resource_milestone_events + ADD CONSTRAINT resource_milestone_events_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY resource_state_events + ADD CONSTRAINT resource_state_events_pkey PRIMARY KEY (id); + ALTER TABLE ONLY resource_weight_events ADD CONSTRAINT resource_weight_events_pkey PRIMARY KEY (id); @@ -7886,12 +20638,24 @@ ALTER TABLE ONLY reviews ALTER TABLE ONLY routes ADD CONSTRAINT routes_pkey PRIMARY KEY (id); +ALTER TABLE ONLY saml_group_links + ADD CONSTRAINT saml_group_links_pkey PRIMARY KEY (id); + ALTER TABLE ONLY saml_providers ADD CONSTRAINT saml_providers_pkey PRIMARY KEY (id); +ALTER TABLE ONLY scim_identities + ADD CONSTRAINT scim_identities_pkey PRIMARY KEY (id); + ALTER TABLE ONLY scim_oauth_access_tokens ADD CONSTRAINT scim_oauth_access_tokens_pkey PRIMARY KEY (id); +ALTER TABLE ONLY security_findings + ADD CONSTRAINT security_findings_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY security_scans + ADD CONSTRAINT security_scans_pkey PRIMARY KEY (id); + ALTER TABLE ONLY self_managed_prometheus_alert_events ADD CONSTRAINT self_managed_prometheus_alert_events_pkey PRIMARY KEY (id); @@ -7919,6 +20683,15 @@ ALTER TABLE ONLY slack_integrations ALTER TABLE ONLY smartcard_identities ADD CONSTRAINT smartcard_identities_pkey PRIMARY KEY (id); +ALTER TABLE ONLY snippet_repositories + ADD CONSTRAINT snippet_repositories_pkey PRIMARY KEY (snippet_id); + +ALTER TABLE ONLY snippet_repository_storage_moves + ADD CONSTRAINT snippet_repository_storage_moves_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY snippet_statistics + ADD CONSTRAINT snippet_statistics_pkey PRIMARY KEY (snippet_id); + ALTER TABLE ONLY snippet_user_mentions ADD CONSTRAINT snippet_user_mentions_pkey PRIMARY KEY (id); @@ -7934,6 +20707,15 @@ ALTER TABLE ONLY software_licenses ALTER TABLE ONLY spam_logs ADD CONSTRAINT spam_logs_pkey PRIMARY KEY (id); +ALTER TABLE ONLY sprints + ADD CONSTRAINT sprints_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY status_page_published_incidents + ADD CONSTRAINT status_page_published_incidents_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY status_page_settings + ADD CONSTRAINT status_page_settings_pkey PRIMARY KEY (project_id); + ALTER TABLE ONLY subscriptions ADD CONSTRAINT subscriptions_pkey PRIMARY KEY (id); @@ -7952,12 +20734,21 @@ ALTER TABLE ONLY tags ALTER TABLE ONLY term_agreements ADD CONSTRAINT term_agreements_pkey PRIMARY KEY (id); +ALTER TABLE ONLY terraform_state_versions + ADD CONSTRAINT terraform_state_versions_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY terraform_states + ADD CONSTRAINT terraform_states_pkey PRIMARY KEY (id); + ALTER TABLE ONLY timelogs ADD CONSTRAINT timelogs_pkey PRIMARY KEY (id); ALTER TABLE ONLY todos ADD CONSTRAINT todos_pkey PRIMARY KEY (id); +ALTER TABLE ONLY token_with_ivs + ADD CONSTRAINT token_with_ivs_pkey PRIMARY KEY (id); + ALTER TABLE ONLY trending_projects ADD CONSTRAINT trending_projects_pkey PRIMARY KEY (id); @@ -7973,9 +20764,27 @@ ALTER TABLE ONLY user_agent_details ALTER TABLE ONLY user_callouts ADD CONSTRAINT user_callouts_pkey PRIMARY KEY (id); +ALTER TABLE ONLY user_canonical_emails + ADD CONSTRAINT user_canonical_emails_pkey PRIMARY KEY (id); + ALTER TABLE ONLY user_custom_attributes ADD CONSTRAINT user_custom_attributes_pkey PRIMARY KEY (id); +ALTER TABLE ONLY user_details + ADD CONSTRAINT user_details_pkey PRIMARY KEY (user_id); + +ALTER TABLE ONLY user_follow_users + ADD CONSTRAINT user_follow_users_pkey PRIMARY KEY (follower_id, followee_id); + +ALTER TABLE ONLY user_highest_roles + ADD CONSTRAINT user_highest_roles_pkey PRIMARY KEY (user_id); + +ALTER TABLE ONLY user_interacted_projects + ADD CONSTRAINT user_interacted_projects_pkey PRIMARY KEY (project_id, user_id); + +ALTER TABLE ONLY user_permission_export_uploads + ADD CONSTRAINT user_permission_export_uploads_pkey PRIMARY KEY (id); + ALTER TABLE ONLY user_preferences ADD CONSTRAINT user_preferences_pkey PRIMARY KEY (id); @@ -7991,15 +20800,39 @@ ALTER TABLE ONLY users_ops_dashboard_projects ALTER TABLE ONLY users ADD CONSTRAINT users_pkey PRIMARY KEY (id); +ALTER TABLE ONLY users_security_dashboard_projects + ADD CONSTRAINT users_security_dashboard_projects_pkey PRIMARY KEY (project_id, user_id); + ALTER TABLE ONLY users_star_projects ADD CONSTRAINT users_star_projects_pkey PRIMARY KEY (id); +ALTER TABLE ONLY users_statistics + ADD CONSTRAINT users_statistics_pkey PRIMARY KEY (id); + ALTER TABLE ONLY vulnerabilities ADD CONSTRAINT vulnerabilities_pkey PRIMARY KEY (id); +ALTER TABLE ONLY vulnerability_exports + ADD CONSTRAINT vulnerability_exports_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY vulnerability_external_issue_links + ADD CONSTRAINT vulnerability_external_issue_links_pkey PRIMARY KEY (id); + ALTER TABLE ONLY vulnerability_feedback ADD CONSTRAINT vulnerability_feedback_pkey PRIMARY KEY (id); +ALTER TABLE ONLY vulnerability_finding_fingerprints + ADD CONSTRAINT vulnerability_finding_fingerprints_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY vulnerability_finding_links + ADD CONSTRAINT vulnerability_finding_links_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY vulnerability_findings_remediations + ADD CONSTRAINT vulnerability_findings_remediations_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY vulnerability_historical_statistics + ADD CONSTRAINT vulnerability_historical_statistics_pkey PRIMARY KEY (id); + ALTER TABLE ONLY vulnerability_identifiers ADD CONSTRAINT vulnerability_identifiers_pkey PRIMARY KEY (id); @@ -8015,9 +20848,18 @@ ALTER TABLE ONLY vulnerability_occurrence_pipelines ALTER TABLE ONLY vulnerability_occurrences ADD CONSTRAINT vulnerability_occurrences_pkey PRIMARY KEY (id); +ALTER TABLE ONLY vulnerability_remediations + ADD CONSTRAINT vulnerability_remediations_pkey PRIMARY KEY (id); + ALTER TABLE ONLY vulnerability_scanners ADD CONSTRAINT vulnerability_scanners_pkey PRIMARY KEY (id); +ALTER TABLE ONLY vulnerability_statistics + ADD CONSTRAINT vulnerability_statistics_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY vulnerability_user_mentions + ADD CONSTRAINT vulnerability_user_mentions_pkey PRIMARY KEY (id); + ALTER TABLE ONLY web_hook_logs ADD CONSTRAINT web_hook_logs_pkey PRIMARY KEY (id); @@ -8027,6 +20869,12 @@ ALTER TABLE ONLY web_hooks ALTER TABLE ONLY webauthn_registrations ADD CONSTRAINT webauthn_registrations_pkey PRIMARY KEY (id); +ALTER TABLE ONLY wiki_page_meta + ADD CONSTRAINT wiki_page_meta_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY wiki_page_slugs + ADD CONSTRAINT wiki_page_slugs_pkey PRIMARY KEY (id); + ALTER TABLE ONLY x509_certificates ADD CONSTRAINT x509_certificates_pkey PRIMARY KEY (id); @@ -8039,19 +20887,167 @@ ALTER TABLE ONLY x509_issuers ALTER TABLE ONLY zoom_meetings ADD CONSTRAINT zoom_meetings_pkey PRIMARY KEY (id); -CREATE INDEX analytics_index_audit_events_on_created_at_and_author_id ON audit_events USING btree (created_at, author_id); +CREATE INDEX index_product_analytics_events_experimental_project_and_time ON ONLY product_analytics_events_experimental USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx10 ON gitlab_partitions_static.product_analytics_events_experimental_10 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx11 ON gitlab_partitions_static.product_analytics_events_experimental_11 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx12 ON gitlab_partitions_static.product_analytics_events_experimental_12 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx13 ON gitlab_partitions_static.product_analytics_events_experimental_13 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx14 ON gitlab_partitions_static.product_analytics_events_experimental_14 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx15 ON gitlab_partitions_static.product_analytics_events_experimental_15 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx16 ON gitlab_partitions_static.product_analytics_events_experimental_16 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx17 ON gitlab_partitions_static.product_analytics_events_experimental_17 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx18 ON gitlab_partitions_static.product_analytics_events_experimental_18 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx19 ON gitlab_partitions_static.product_analytics_events_experimental_19 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx20 ON gitlab_partitions_static.product_analytics_events_experimental_20 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx21 ON gitlab_partitions_static.product_analytics_events_experimental_21 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx22 ON gitlab_partitions_static.product_analytics_events_experimental_22 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx23 ON gitlab_partitions_static.product_analytics_events_experimental_23 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx24 ON gitlab_partitions_static.product_analytics_events_experimental_24 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx25 ON gitlab_partitions_static.product_analytics_events_experimental_25 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx26 ON gitlab_partitions_static.product_analytics_events_experimental_26 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx27 ON gitlab_partitions_static.product_analytics_events_experimental_27 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx28 ON gitlab_partitions_static.product_analytics_events_experimental_28 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx29 ON gitlab_partitions_static.product_analytics_events_experimental_29 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx30 ON gitlab_partitions_static.product_analytics_events_experimental_30 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx31 ON gitlab_partitions_static.product_analytics_events_experimental_31 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx32 ON gitlab_partitions_static.product_analytics_events_experimental_32 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx33 ON gitlab_partitions_static.product_analytics_events_experimental_33 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx34 ON gitlab_partitions_static.product_analytics_events_experimental_34 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx35 ON gitlab_partitions_static.product_analytics_events_experimental_35 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx36 ON gitlab_partitions_static.product_analytics_events_experimental_36 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx37 ON gitlab_partitions_static.product_analytics_events_experimental_37 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx38 ON gitlab_partitions_static.product_analytics_events_experimental_38 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx39 ON gitlab_partitions_static.product_analytics_events_experimental_39 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx40 ON gitlab_partitions_static.product_analytics_events_experimental_40 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx41 ON gitlab_partitions_static.product_analytics_events_experimental_41 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx42 ON gitlab_partitions_static.product_analytics_events_experimental_42 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx43 ON gitlab_partitions_static.product_analytics_events_experimental_43 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx44 ON gitlab_partitions_static.product_analytics_events_experimental_44 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx45 ON gitlab_partitions_static.product_analytics_events_experimental_45 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx46 ON gitlab_partitions_static.product_analytics_events_experimental_46 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx47 ON gitlab_partitions_static.product_analytics_events_experimental_47 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx48 ON gitlab_partitions_static.product_analytics_events_experimental_48 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx49 ON gitlab_partitions_static.product_analytics_events_experimental_49 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx50 ON gitlab_partitions_static.product_analytics_events_experimental_50 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx51 ON gitlab_partitions_static.product_analytics_events_experimental_51 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx52 ON gitlab_partitions_static.product_analytics_events_experimental_52 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx53 ON gitlab_partitions_static.product_analytics_events_experimental_53 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx54 ON gitlab_partitions_static.product_analytics_events_experimental_54 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx55 ON gitlab_partitions_static.product_analytics_events_experimental_55 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx56 ON gitlab_partitions_static.product_analytics_events_experimental_56 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx57 ON gitlab_partitions_static.product_analytics_events_experimental_57 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx58 ON gitlab_partitions_static.product_analytics_events_experimental_58 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx59 ON gitlab_partitions_static.product_analytics_events_experimental_59 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx60 ON gitlab_partitions_static.product_analytics_events_experimental_60 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx61 ON gitlab_partitions_static.product_analytics_events_experimental_61 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx62 ON gitlab_partitions_static.product_analytics_events_experimental_62 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx63 ON gitlab_partitions_static.product_analytics_events_experimental_63 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx1 ON gitlab_partitions_static.product_analytics_events_experimental_01 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx2 ON gitlab_partitions_static.product_analytics_events_experimental_02 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx3 ON gitlab_partitions_static.product_analytics_events_experimental_03 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx4 ON gitlab_partitions_static.product_analytics_events_experimental_04 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx5 ON gitlab_partitions_static.product_analytics_events_experimental_05 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx6 ON gitlab_partitions_static.product_analytics_events_experimental_06 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx7 ON gitlab_partitions_static.product_analytics_events_experimental_07 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx8 ON gitlab_partitions_static.product_analytics_events_experimental_08 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx9 ON gitlab_partitions_static.product_analytics_events_experimental_09 USING btree (project_id, collector_tstamp); + +CREATE INDEX product_analytics_events_experi_project_id_collector_tstamp_idx ON gitlab_partitions_static.product_analytics_events_experimental_00 USING btree (project_id, collector_tstamp); + +CREATE INDEX active_billable_users ON users USING btree (id) WHERE (((state)::text = 'active'::text) AND ((user_type IS NULL) OR (user_type = ANY (ARRAY[NULL::integer, 6, 4]))) AND ((user_type IS NULL) OR (user_type <> ALL ('{2,6,1,3,7,8}'::smallint[])))); + +CREATE INDEX analytics_index_audit_events_on_created_at_and_author_id ON audit_events_archived USING btree (created_at, author_id); + +CREATE INDEX analytics_index_audit_events_part_on_created_at_and_author_id ON ONLY audit_events USING btree (created_at, author_id); CREATE INDEX analytics_index_events_on_created_at_and_author_id ON events USING btree (created_at, author_id); CREATE INDEX analytics_repository_languages_on_project_id ON analytics_language_trend_repository_languages USING btree (project_id); -CREATE UNIQUE INDEX analytics_repository_languages_unique_index ON analytics_language_trend_repository_languages USING btree (programming_language_id, project_id, snapshot_date); - CREATE UNIQUE INDEX any_approver_merge_request_rule_type_unique_index ON approval_merge_request_rules USING btree (merge_request_id, rule_type) WHERE (rule_type = 4); CREATE UNIQUE INDEX any_approver_project_rule_type_unique_index ON approval_project_rules USING btree (project_id) WHERE (rule_type = 3); -CREATE UNIQUE INDEX approval_rule_name_index_for_code_owners ON approval_merge_request_rules USING btree (merge_request_id, code_owner, name) WHERE (code_owner = true); +CREATE INDEX approval_mr_rule_index_merge_request_id ON approval_merge_request_rules USING btree (merge_request_id); + +CREATE UNIQUE INDEX backup_labels_group_id_project_id_title_idx ON backup_labels USING btree (group_id, project_id, title); + +CREATE INDEX backup_labels_group_id_title_idx ON backup_labels USING btree (group_id, title) WHERE (project_id = NULL::integer); + +CREATE INDEX backup_labels_project_id_idx ON backup_labels USING btree (project_id); + +CREATE INDEX backup_labels_project_id_title_idx ON backup_labels USING btree (project_id, title) WHERE (group_id = NULL::integer); + +CREATE INDEX backup_labels_template_idx ON backup_labels USING btree (template) WHERE template; + +CREATE INDEX backup_labels_title_idx ON backup_labels USING btree (title); + +CREATE INDEX backup_labels_type_project_id_idx ON backup_labels USING btree (type, project_id); + +CREATE UNIQUE INDEX bulk_import_trackers_uniq_relation_by_entity ON bulk_import_trackers USING btree (bulk_import_entity_id, relation); CREATE INDEX ci_builds_gitlab_monitor_metrics ON ci_builds USING btree (status, created_at, project_id) WHERE ((type)::text = 'Ci::Build'::text); @@ -8063,22 +21059,36 @@ CREATE UNIQUE INDEX design_management_designs_versions_uniqueness ON design_mana CREATE INDEX design_user_mentions_on_design_id_and_note_id_index ON design_user_mentions USING btree (design_id, note_id); -CREATE INDEX epic_mentions_temp_index ON notes USING btree (id) WHERE ((note ~~ '%@%'::text) AND ((noteable_type)::text = 'Epic'::text)); - CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_and_note_id_index ON epic_user_mentions USING btree (epic_id, note_id); CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_index ON epic_user_mentions USING btree (epic_id) WHERE (note_id IS NULL); -CREATE UNIQUE INDEX idx_deployment_merge_requests_unique_index ON deployment_merge_requests USING btree (deployment_id, merge_request_id); +CREATE INDEX expired_artifacts_temp_index ON ci_job_artifacts USING btree (id, created_at) WHERE ((expire_at IS NULL) AND (created_at < '2020-06-22 02:00:00+02'::timestamp with time zone)); + +CREATE INDEX finding_links_on_vulnerability_occurrence_id ON vulnerability_finding_links USING btree (vulnerability_occurrence_id); + +CREATE INDEX idx_audit_events_on_entity_id_desc_author_id_created_at ON audit_events_archived USING btree (entity_id, entity_type, id DESC, author_id, created_at); + +CREATE INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ON ONLY audit_events USING btree (entity_id, entity_type, id DESC, author_id, created_at); + +CREATE INDEX idx_ci_pipelines_artifacts_locked ON ci_pipelines USING btree (ci_ref_id, id) WHERE (locked = 1); + +CREATE INDEX idx_container_exp_policies_on_project_id_next_run_at_enabled ON container_expiration_policies USING btree (project_id, next_run_at, enabled); + +CREATE INDEX idx_container_repositories_on_exp_cleanup_status_and_start_date ON container_repositories USING btree (expiration_policy_cleanup_status, expiration_policy_started_at); + +CREATE INDEX idx_deployment_clusters_on_cluster_id_and_kubernetes_namespace ON deployment_clusters USING btree (cluster_id, kubernetes_namespace); + +CREATE UNIQUE INDEX idx_environment_merge_requests_unique_index ON deployment_merge_requests USING btree (environment_id, merge_request_id); CREATE INDEX idx_geo_con_rep_updated_events_on_container_repository_id ON geo_container_repository_updated_events USING btree (container_repository_id); +CREATE INDEX idx_issues_on_health_status_not_null ON issues USING btree (health_status) WHERE (health_status IS NOT NULL); + CREATE INDEX idx_issues_on_project_id_and_created_at_and_id_and_state_id ON issues USING btree (project_id, created_at, id, state_id); CREATE INDEX idx_issues_on_project_id_and_due_date_and_id_and_state_id ON issues USING btree (project_id, due_date, id, state_id) WHERE (due_date IS NOT NULL); -CREATE INDEX idx_issues_on_project_id_and_due_date_and_id_and_state_partial ON issues USING btree (project_id, due_date, id, state) WHERE (due_date IS NOT NULL); - CREATE INDEX idx_issues_on_project_id_and_rel_position_and_state_id_and_id ON issues USING btree (project_id, relative_position, state_id, id DESC); CREATE INDEX idx_issues_on_project_id_and_updated_at_and_id_and_state_id ON issues USING btree (project_id, updated_at, id, state_id); @@ -8089,20 +21099,40 @@ CREATE INDEX idx_jira_connect_subscriptions_on_installation_id ON jira_connect_s CREATE UNIQUE INDEX idx_jira_connect_subscriptions_on_installation_id_namespace_id ON jira_connect_subscriptions USING btree (jira_connect_installation_id, namespace_id); +CREATE INDEX idx_members_created_at_user_id_invite_token ON members USING btree (created_at) WHERE ((invite_token IS NOT NULL) AND (user_id IS NULL)); + CREATE INDEX idx_merge_requests_on_id_and_merge_jid ON merge_requests USING btree (id, merge_jid) WHERE ((merge_jid IS NOT NULL) AND (state_id = 4)); +CREATE INDEX idx_merge_requests_on_merged_state ON merge_requests USING btree (id) WHERE (state_id = 3); + CREATE INDEX idx_merge_requests_on_source_project_and_branch_state_opened ON merge_requests USING btree (source_project_id, source_branch) WHERE (state_id = 1); CREATE INDEX idx_merge_requests_on_state_id_and_merge_status ON merge_requests USING btree (state_id, merge_status) WHERE ((state_id = 1) AND ((merge_status)::text = 'can_be_merged'::text)); CREATE INDEX idx_merge_requests_on_target_project_id_and_iid_opened ON merge_requests USING btree (target_project_id, iid) WHERE (state_id = 1); -CREATE INDEX idx_mr_cc_diff_files_on_mr_cc_id ON merge_request_context_commit_diff_files USING btree (merge_request_context_commit_id); +CREATE INDEX idx_merge_requests_on_target_project_id_and_locked_state ON merge_requests USING btree (target_project_id) WHERE (state_id = 4); + +CREATE UNIQUE INDEX idx_metrics_users_starred_dashboard_on_user_project_dashboard ON metrics_users_starred_dashboards USING btree (user_id, project_id, dashboard_path); CREATE INDEX idx_mr_cc_diff_files_on_mr_cc_id_and_sha ON merge_request_context_commit_diff_files USING btree (merge_request_context_commit_id, sha); +CREATE UNIQUE INDEX idx_on_compliance_management_frameworks_namespace_id_name ON compliance_management_frameworks USING btree (namespace_id, name); + +CREATE INDEX idx_on_issues_where_service_desk_reply_to_is_not_null ON issues USING btree (id) WHERE (service_desk_reply_to IS NOT NULL); + +CREATE INDEX idx_packages_build_infos_on_package_id ON packages_build_infos USING btree (package_id); + +CREATE INDEX idx_packages_debian_group_component_files_on_architecture_id ON packages_debian_group_component_files USING btree (architecture_id); + +CREATE INDEX idx_packages_debian_project_component_files_on_architecture_id ON packages_debian_project_component_files USING btree (architecture_id); + CREATE INDEX idx_packages_packages_on_project_id_name_version_package_type ON packages_packages USING btree (project_id, name, version, package_type); +CREATE INDEX idx_pkgs_deb_grp_architectures_on_distribution_id ON packages_debian_group_architectures USING btree (distribution_id); + +CREATE INDEX idx_pkgs_deb_proj_architectures_on_distribution_id ON packages_debian_project_architectures USING btree (distribution_id); + CREATE UNIQUE INDEX idx_pkgs_dep_links_on_pkg_id_dependency_id_dependency_type ON packages_dependency_links USING btree (package_id, dependency_id, dependency_type); CREATE INDEX idx_proj_feat_usg_on_jira_dvcs_cloud_last_sync_at_and_proj_id ON project_feature_usages USING btree (jira_dvcs_cloud_last_sync_at, project_id) WHERE (jira_dvcs_cloud_last_sync_at IS NOT NULL); @@ -8113,6 +21143,10 @@ CREATE UNIQUE INDEX idx_project_id_payload_key_self_managed_prometheus_alert_eve CREATE INDEX idx_project_repository_check_partial ON projects USING btree (repository_storage, created_at) WHERE (last_repository_check_at IS NULL); +CREATE INDEX idx_projects_id_created_at_disable_overriding_approvers_false ON projects USING btree (id, created_at) WHERE ((disable_overriding_approvers_per_merge_request = false) OR (disable_overriding_approvers_per_merge_request IS NULL)); + +CREATE INDEX idx_projects_id_created_at_disable_overriding_approvers_true ON projects USING btree (id, created_at) WHERE (disable_overriding_approvers_per_merge_request = true); + CREATE INDEX idx_projects_on_repository_storage_last_repository_updated_at ON projects USING btree (id, repository_storage, last_repository_updated_at); CREATE INDEX idx_repository_states_on_last_repository_verification_ran_at ON project_repository_states USING btree (project_id, last_repository_verification_ran_at) WHERE ((repository_verification_checksum IS NOT NULL) AND (last_repository_verification_failure IS NULL)); @@ -8125,14 +21159,48 @@ CREATE INDEX idx_repository_states_on_wiki_failure_partial ON project_repository CREATE INDEX idx_repository_states_outdated_checksums ON project_repository_states USING btree (project_id) WHERE (((repository_verification_checksum IS NULL) AND (last_repository_verification_failure IS NULL)) OR ((wiki_verification_checksum IS NULL) AND (last_wiki_verification_failure IS NULL))); +CREATE UNIQUE INDEX idx_security_scans_on_build_and_scan_type ON security_scans USING btree (build_id, scan_type); + +CREATE INDEX idx_security_scans_on_scan_type ON security_scans USING btree (scan_type); + CREATE UNIQUE INDEX idx_serverless_domain_cluster_on_clusters_applications_knative ON serverless_domain_cluster USING btree (clusters_applications_knative_id); +CREATE UNIQUE INDEX idx_vuln_fingerprints_on_occurrences_id_and_fingerprint ON vulnerability_finding_fingerprints USING btree (finding_id, fingerprint_sha256); + +CREATE UNIQUE INDEX idx_vuln_fingerprints_uniqueness ON vulnerability_finding_fingerprints USING btree (finding_id, algorithm_type, fingerprint_sha256); + +CREATE UNIQUE INDEX idx_vulnerability_ext_issue_links_on_vulne_id_and_ext_issue ON vulnerability_external_issue_links USING btree (vulnerability_id, external_type, external_project_key, external_issue_key); + +CREATE UNIQUE INDEX idx_vulnerability_ext_issue_links_on_vulne_id_and_link_type ON vulnerability_external_issue_links USING btree (vulnerability_id, link_type) WHERE (link_type = 1); + CREATE UNIQUE INDEX idx_vulnerability_issue_links_on_vulnerability_id_and_issue_id ON vulnerability_issue_links USING btree (vulnerability_id, issue_id); CREATE UNIQUE INDEX idx_vulnerability_issue_links_on_vulnerability_id_and_link_type ON vulnerability_issue_links USING btree (vulnerability_id, link_type) WHERE (link_type = 2); CREATE INDEX index_abuse_reports_on_user_id ON abuse_reports USING btree (user_id); +CREATE INDEX index_alert_assignees_on_alert_id ON alert_management_alert_assignees USING btree (alert_id); + +CREATE UNIQUE INDEX index_alert_assignees_on_user_id_and_alert_id ON alert_management_alert_assignees USING btree (user_id, alert_id); + +CREATE INDEX index_alert_management_alerts_on_domain ON alert_management_alerts USING btree (domain); + +CREATE INDEX index_alert_management_alerts_on_environment_id ON alert_management_alerts USING btree (environment_id) WHERE (environment_id IS NOT NULL); + +CREATE INDEX index_alert_management_alerts_on_issue_id ON alert_management_alerts USING btree (issue_id); + +CREATE UNIQUE INDEX index_alert_management_alerts_on_project_id_and_iid ON alert_management_alerts USING btree (project_id, iid); + +CREATE INDEX index_alert_management_alerts_on_prometheus_alert_id ON alert_management_alerts USING btree (prometheus_alert_id) WHERE (prometheus_alert_id IS NOT NULL); + +CREATE INDEX index_alert_management_http_integrations_on_project_id ON alert_management_http_integrations USING btree (project_id); + +CREATE UNIQUE INDEX index_alert_user_mentions_on_alert_id ON alert_management_alert_user_mentions USING btree (alert_management_alert_id) WHERE (note_id IS NULL); + +CREATE UNIQUE INDEX index_alert_user_mentions_on_alert_id_and_note_id ON alert_management_alert_user_mentions USING btree (alert_management_alert_id, note_id); + +CREATE UNIQUE INDEX index_alert_user_mentions_on_note_id ON alert_management_alert_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); + CREATE INDEX index_alerts_service_data_on_service_id ON alerts_service_data USING btree (service_id); CREATE INDEX index_allowed_email_domains_on_group_id ON allowed_email_domains USING btree (group_id); @@ -8141,12 +21209,14 @@ CREATE INDEX index_analytics_ca_group_stages_on_end_event_label_id ON analytics_ CREATE INDEX index_analytics_ca_group_stages_on_group_id ON analytics_cycle_analytics_group_stages USING btree (group_id); -CREATE UNIQUE INDEX index_analytics_ca_group_stages_on_group_id_and_name ON analytics_cycle_analytics_group_stages USING btree (group_id, name); - CREATE INDEX index_analytics_ca_group_stages_on_relative_position ON analytics_cycle_analytics_group_stages USING btree (relative_position); CREATE INDEX index_analytics_ca_group_stages_on_start_event_label_id ON analytics_cycle_analytics_group_stages USING btree (start_event_label_id); +CREATE INDEX index_analytics_ca_group_stages_on_value_stream_id ON analytics_cycle_analytics_group_stages USING btree (group_value_stream_id); + +CREATE UNIQUE INDEX index_analytics_ca_group_value_streams_on_group_id_and_name ON analytics_cycle_analytics_group_value_streams USING btree (group_id, name); + CREATE INDEX index_analytics_ca_project_stages_on_end_event_label_id ON analytics_cycle_analytics_project_stages USING btree (end_event_label_id); CREATE INDEX index_analytics_ca_project_stages_on_project_id ON analytics_cycle_analytics_project_stages USING btree (project_id); @@ -8157,16 +21227,18 @@ CREATE INDEX index_analytics_ca_project_stages_on_relative_position ON analytics CREATE INDEX index_analytics_ca_project_stages_on_start_event_label_id ON analytics_cycle_analytics_project_stages USING btree (start_event_label_id); -CREATE INDEX index_analytics_repository_file_commits_file_id ON analytics_repository_file_commits USING btree (analytics_repository_file_id); +CREATE INDEX index_analytics_cycle_analytics_group_stages_custom_only ON analytics_cycle_analytics_group_stages USING btree (id) WHERE (custom = true); -CREATE INDEX index_analytics_repository_file_edits_on_project_id ON analytics_repository_file_edits USING btree (project_id); - -CREATE UNIQUE INDEX index_analytics_repository_files_on_project_id_and_file_path ON analytics_repository_files USING btree (project_id, file_path); +CREATE UNIQUE INDEX index_analytics_devops_adoption_segments_on_name ON analytics_devops_adoption_segments USING btree (name); CREATE INDEX index_application_settings_on_custom_project_templates_group_id ON application_settings USING btree (custom_project_templates_group_id); CREATE INDEX index_application_settings_on_file_template_project_id ON application_settings USING btree (file_template_project_id); +CREATE INDEX index_application_settings_on_instance_administrators_group_id ON application_settings USING btree (instance_administrators_group_id); + +CREATE UNIQUE INDEX index_application_settings_on_push_rule_id ON application_settings USING btree (push_rule_id); + CREATE INDEX index_application_settings_on_usage_stats_set_by_user_id ON application_settings USING btree (usage_stats_set_by_user_id); CREATE INDEX index_applicationsettings_on_instance_administration_project_id ON application_settings USING btree (instance_administration_project_id); @@ -8175,8 +21247,6 @@ CREATE UNIQUE INDEX index_approval_merge_request_rule_sources_1 ON approval_merg CREATE INDEX index_approval_merge_request_rule_sources_2 ON approval_merge_request_rule_sources USING btree (approval_project_rule_id); -CREATE INDEX index_approval_merge_request_rules_1 ON approval_merge_request_rules USING btree (merge_request_id, code_owner); - CREATE UNIQUE INDEX index_approval_merge_request_rules_approved_approvers_1 ON approval_merge_request_rules_approved_approvers USING btree (approval_merge_request_rule_id, user_id); CREATE INDEX index_approval_merge_request_rules_approved_approvers_2 ON approval_merge_request_rules_approved_approvers USING btree (user_id); @@ -8193,20 +21263,30 @@ CREATE UNIQUE INDEX index_approval_project_rules_groups_1 ON approval_project_ru CREATE INDEX index_approval_project_rules_groups_2 ON approval_project_rules_groups USING btree (group_id); +CREATE INDEX index_approval_project_rules_on_id_with_regular_type ON approval_project_rules USING btree (id) WHERE (rule_type = 0); + CREATE INDEX index_approval_project_rules_on_project_id ON approval_project_rules USING btree (project_id); CREATE INDEX index_approval_project_rules_on_rule_type ON approval_project_rules USING btree (rule_type); +CREATE INDEX index_approval_project_rules_protected_branches_pb_id ON approval_project_rules_protected_branches USING btree (protected_branch_id); + CREATE UNIQUE INDEX index_approval_project_rules_users_1 ON approval_project_rules_users USING btree (approval_project_rule_id, user_id); CREATE INDEX index_approval_project_rules_users_2 ON approval_project_rules_users USING btree (user_id); -CREATE UNIQUE INDEX index_approval_rule_name_for_code_owners_rule_type ON approval_merge_request_rules USING btree (merge_request_id, rule_type, name) WHERE (rule_type = 2); +CREATE INDEX index_approval_project_rules_users_on_approval_project_rule_id ON approval_project_rules_users USING btree (approval_project_rule_id); + +CREATE UNIQUE INDEX index_approval_rule_name_for_code_owners_rule_type ON approval_merge_request_rules USING btree (merge_request_id, name) WHERE ((rule_type = 2) AND (section IS NULL)); + +CREATE UNIQUE INDEX index_approval_rule_name_for_sectional_code_owners_rule_type ON approval_merge_request_rules USING btree (merge_request_id, name, section) WHERE (rule_type = 2); CREATE INDEX index_approval_rules_code_owners_rule_type ON approval_merge_request_rules USING btree (merge_request_id, rule_type) WHERE (rule_type = 2); CREATE INDEX index_approvals_on_merge_request_id ON approvals USING btree (merge_request_id); +CREATE INDEX index_approvals_on_merge_request_id_and_created_at ON approvals USING btree (merge_request_id, created_at); + CREATE UNIQUE INDEX index_approvals_on_user_id_and_merge_request_id ON approvals USING btree (user_id, merge_request_id); CREATE INDEX index_approver_groups_on_group_id ON approver_groups USING btree (group_id); @@ -8217,7 +21297,13 @@ CREATE INDEX index_approvers_on_target_id_and_target_type ON approvers USING btr CREATE INDEX index_approvers_on_user_id ON approvers USING btree (user_id); -CREATE INDEX index_audit_events_on_entity_id_and_entity_type ON audit_events USING btree (entity_id, entity_type); +CREATE UNIQUE INDEX index_atlassian_identities_on_extern_uid ON atlassian_identities USING btree (extern_uid); + +CREATE INDEX index_authentication_events_on_provider ON authentication_events USING btree (provider); + +CREATE INDEX index_authentication_events_on_provider_user_id_created_at ON authentication_events USING btree (provider, user_id, created_at) WHERE (result = 1); + +CREATE INDEX index_authentication_events_on_user_id ON authentication_events USING btree (user_id); CREATE INDEX index_award_emoji_on_awardable_type_and_awardable_id ON award_emoji USING btree (awardable_type, awardable_id); @@ -8227,6 +21313,12 @@ CREATE UNIQUE INDEX index_aws_roles_on_role_external_id ON aws_roles USING btree CREATE UNIQUE INDEX index_aws_roles_on_user_id ON aws_roles USING btree (user_id); +CREATE INDEX index_background_migration_jobs_for_partitioning_migrations ON background_migration_jobs USING btree (((arguments ->> 2))) WHERE (class_name = 'Gitlab::Database::PartitioningMigrationHelpers::BackfillPartitionedTable'::text); + +CREATE INDEX index_background_migration_jobs_on_class_name_and_arguments ON background_migration_jobs USING btree (class_name, arguments); + +CREATE INDEX index_background_migration_jobs_on_class_name_and_status_and_id ON background_migration_jobs USING btree (class_name, status, id); + CREATE INDEX index_badges_on_group_id ON badges USING btree (group_id); CREATE INDEX index_badges_on_project_id ON badges USING btree (project_id); @@ -8255,13 +21347,55 @@ CREATE INDEX index_board_project_recent_visits_on_user_id ON board_project_recen CREATE UNIQUE INDEX index_board_project_recent_visits_on_user_project_and_board ON board_project_recent_visits USING btree (user_id, project_id, board_id); +CREATE INDEX index_board_user_preferences_on_board_id ON board_user_preferences USING btree (board_id); + +CREATE INDEX index_board_user_preferences_on_user_id ON board_user_preferences USING btree (user_id); + +CREATE UNIQUE INDEX index_board_user_preferences_on_user_id_and_board_id ON board_user_preferences USING btree (user_id, board_id); + +CREATE INDEX index_boards_epic_board_labels_on_epic_board_id ON boards_epic_board_labels USING btree (epic_board_id); + +CREATE INDEX index_boards_epic_board_labels_on_label_id ON boards_epic_board_labels USING btree (label_id); + +CREATE UNIQUE INDEX index_boards_epic_board_positions_on_epic_board_id_and_epic_id ON boards_epic_board_positions USING btree (epic_board_id, epic_id); + +CREATE INDEX index_boards_epic_board_positions_on_epic_id ON boards_epic_board_positions USING btree (epic_id); + +CREATE INDEX index_boards_epic_boards_on_group_id ON boards_epic_boards USING btree (group_id); + +CREATE INDEX index_boards_epic_user_preferences_on_board_id ON boards_epic_user_preferences USING btree (board_id); + +CREATE UNIQUE INDEX index_boards_epic_user_preferences_on_board_user_epic_unique ON boards_epic_user_preferences USING btree (board_id, user_id, epic_id); + +CREATE INDEX index_boards_epic_user_preferences_on_epic_id ON boards_epic_user_preferences USING btree (epic_id); + +CREATE INDEX index_boards_epic_user_preferences_on_user_id ON boards_epic_user_preferences USING btree (user_id); + CREATE INDEX index_boards_on_group_id ON boards USING btree (group_id); +CREATE INDEX index_boards_on_iteration_id ON boards USING btree (iteration_id); + CREATE INDEX index_boards_on_milestone_id ON boards USING btree (milestone_id); CREATE INDEX index_boards_on_project_id ON boards USING btree (project_id); -CREATE INDEX index_broadcast_messages_on_starts_at_and_ends_at_and_id ON broadcast_messages USING btree (starts_at, ends_at, id); +CREATE INDEX index_broadcast_message_on_ends_at_and_broadcast_type_and_id ON broadcast_messages USING btree (ends_at, broadcast_type, id); + +CREATE INDEX index_bulk_import_configurations_on_bulk_import_id ON bulk_import_configurations USING btree (bulk_import_id); + +CREATE INDEX index_bulk_import_entities_on_bulk_import_id ON bulk_import_entities USING btree (bulk_import_id); + +CREATE INDEX index_bulk_import_entities_on_namespace_id ON bulk_import_entities USING btree (namespace_id); + +CREATE INDEX index_bulk_import_entities_on_parent_id ON bulk_import_entities USING btree (parent_id); + +CREATE INDEX index_bulk_import_entities_on_project_id ON bulk_import_entities USING btree (project_id); + +CREATE INDEX index_bulk_import_failures_on_bulk_import_entity_id ON bulk_import_failures USING btree (bulk_import_entity_id); + +CREATE INDEX index_bulk_import_failures_on_correlation_id_value ON bulk_import_failures USING btree (correlation_id_value); + +CREATE INDEX index_bulk_imports_on_user_id ON bulk_imports USING btree (user_id); CREATE UNIQUE INDEX index_chat_names_on_service_id_and_team_id_and_chat_id ON chat_names USING btree (service_id, team_id, chat_id); @@ -8271,12 +21405,14 @@ CREATE UNIQUE INDEX index_chat_teams_on_namespace_id ON chat_teams USING btree ( CREATE UNIQUE INDEX index_ci_build_needs_on_build_id_and_name ON ci_build_needs USING btree (build_id, name); +CREATE UNIQUE INDEX index_ci_build_pending_states_on_build_id ON ci_build_pending_states USING btree (build_id); + +CREATE INDEX index_ci_build_report_results_on_project_id ON ci_build_report_results USING btree (project_id); + CREATE UNIQUE INDEX index_ci_build_trace_chunks_on_build_id_and_chunk_index ON ci_build_trace_chunks USING btree (build_id, chunk_index); CREATE UNIQUE INDEX index_ci_build_trace_section_names_on_project_id_and_name ON ci_build_trace_section_names USING btree (project_id, name); -CREATE UNIQUE INDEX index_ci_build_trace_sections_on_build_id_and_section_name_id ON ci_build_trace_sections USING btree (build_id, section_name_id); - CREATE INDEX index_ci_build_trace_sections_on_project_id ON ci_build_trace_sections USING btree (project_id); CREATE INDEX index_ci_build_trace_sections_on_section_name_id ON ci_build_trace_sections USING btree (section_name_id); @@ -8293,8 +21429,6 @@ CREATE INDEX index_ci_builds_on_artifacts_expire_at ON ci_builds USING btree (ar CREATE INDEX index_ci_builds_on_auto_canceled_by_id ON ci_builds USING btree (auto_canceled_by_id); -CREATE INDEX index_ci_builds_on_commit_id_and_artifacts_expireatandidpartial ON ci_builds USING btree (commit_id, artifacts_expire_at, id) WHERE (((type)::text = 'Ci::Build'::text) AND ((retried = false) OR (retried IS NULL)) AND ((name)::text = ANY (ARRAY[('sast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('sast:container'::character varying)::text, ('container_scanning'::character varying)::text, ('dast'::character varying)::text]))); - CREATE INDEX index_ci_builds_on_commit_id_and_stage_idx_and_created_at ON ci_builds USING btree (commit_id, stage_idx, created_at); CREATE INDEX index_ci_builds_on_commit_id_and_status_and_type ON ci_builds USING btree (commit_id, status, type); @@ -8303,7 +21437,7 @@ CREATE INDEX index_ci_builds_on_commit_id_and_type_and_name_and_ref ON ci_builds CREATE INDEX index_ci_builds_on_commit_id_and_type_and_ref ON ci_builds USING btree (commit_id, type, ref); -CREATE INDEX index_ci_builds_on_name_for_security_products_values ON ci_builds USING btree (name) WHERE ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text])); +CREATE INDEX index_ci_builds_on_commit_id_artifacts_expired_at_and_id ON ci_builds USING btree (commit_id, artifacts_expire_at, id) WHERE (((type)::text = 'Ci::Build'::text) AND ((retried = false) OR (retried IS NULL)) AND ((name)::text = ANY (ARRAY[('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('dependency_scanning'::character varying)::text, ('container_scanning'::character varying)::text, ('dast'::character varying)::text]))); CREATE INDEX index_ci_builds_on_project_id_and_id ON ci_builds USING btree (project_id, id); @@ -8315,7 +21449,7 @@ CREATE INDEX index_ci_builds_on_protected ON ci_builds USING btree (protected); CREATE INDEX index_ci_builds_on_queued_at ON ci_builds USING btree (queued_at); -CREATE INDEX index_ci_builds_on_runner_id ON ci_builds USING btree (runner_id); +CREATE INDEX index_ci_builds_on_runner_id_and_id_desc ON ci_builds USING btree (runner_id, id DESC); CREATE INDEX index_ci_builds_on_stage_id ON ci_builds USING btree (stage_id); @@ -8331,12 +21465,28 @@ CREATE INDEX index_ci_builds_on_upstream_pipeline_id ON ci_builds USING btree (u CREATE INDEX index_ci_builds_on_user_id ON ci_builds USING btree (user_id); +CREATE INDEX index_ci_builds_on_user_id_and_created_at_and_type_eq_ci_build ON ci_builds USING btree (user_id, created_at) WHERE ((type)::text = 'Ci::Build'::text); + CREATE INDEX index_ci_builds_project_id_and_status_for_live_jobs_partial2 ON ci_builds USING btree (project_id, status) WHERE (((type)::text = 'Ci::Build'::text) AND ((status)::text = ANY (ARRAY[('running'::character varying)::text, ('pending'::character varying)::text, ('created'::character varying)::text]))); CREATE UNIQUE INDEX index_ci_builds_runner_session_on_build_id ON ci_builds_runner_session USING btree (build_id); +CREATE INDEX index_ci_daily_build_group_report_results_on_last_pipeline_id ON ci_daily_build_group_report_results USING btree (last_pipeline_id); + +CREATE INDEX index_ci_daily_build_group_report_results_on_project_and_date ON ci_daily_build_group_report_results USING btree (project_id, date DESC) WHERE ((default_branch = true) AND ((data -> 'coverage'::text) IS NOT NULL)); + +CREATE INDEX index_ci_deleted_objects_on_pick_up_at ON ci_deleted_objects USING btree (pick_up_at); + +CREATE INDEX index_ci_freeze_periods_on_project_id ON ci_freeze_periods USING btree (project_id); + CREATE UNIQUE INDEX index_ci_group_variables_on_group_id_and_key ON ci_group_variables USING btree (group_id, key); +CREATE UNIQUE INDEX index_ci_instance_variables_on_key ON ci_instance_variables USING btree (key); + +CREATE INDEX index_ci_job_artifacts_for_terraform_reports ON ci_job_artifacts USING btree (project_id, id) WHERE (file_type = 18); + +CREATE INDEX index_ci_job_artifacts_id_for_terraform_reports ON ci_job_artifacts USING btree (id) WHERE (file_type = 18); + CREATE INDEX index_ci_job_artifacts_on_expire_at_and_job_id ON ci_job_artifacts USING btree (expire_at, job_id); CREATE INDEX index_ci_job_artifacts_on_file_store ON ci_job_artifacts USING btree (file_store); @@ -8351,10 +21501,20 @@ CREATE INDEX index_ci_job_variables_on_job_id ON ci_job_variables USING btree (j CREATE UNIQUE INDEX index_ci_job_variables_on_key_and_job_id ON ci_job_variables USING btree (key, job_id); +CREATE INDEX index_ci_pipeline_artifacts_on_expire_at ON ci_pipeline_artifacts USING btree (expire_at); + +CREATE INDEX index_ci_pipeline_artifacts_on_pipeline_id ON ci_pipeline_artifacts USING btree (pipeline_id); + +CREATE UNIQUE INDEX index_ci_pipeline_artifacts_on_pipeline_id_and_file_type ON ci_pipeline_artifacts USING btree (pipeline_id, file_type); + +CREATE INDEX index_ci_pipeline_artifacts_on_project_id ON ci_pipeline_artifacts USING btree (project_id); + CREATE INDEX index_ci_pipeline_chat_data_on_chat_name_id ON ci_pipeline_chat_data USING btree (chat_name_id); CREATE UNIQUE INDEX index_ci_pipeline_chat_data_on_pipeline_id ON ci_pipeline_chat_data USING btree (pipeline_id); +CREATE INDEX index_ci_pipeline_messages_on_pipeline_id ON ci_pipeline_messages USING btree (pipeline_id); + CREATE UNIQUE INDEX index_ci_pipeline_schedule_variables_on_schedule_id_and_key ON ci_pipeline_schedule_variables USING btree (pipeline_schedule_id, key); CREATE INDEX index_ci_pipeline_schedules_on_next_run_at_and_active ON ci_pipeline_schedules USING btree (next_run_at, active); @@ -8363,14 +21523,16 @@ CREATE INDEX index_ci_pipeline_schedules_on_owner_id ON ci_pipeline_schedules US CREATE INDEX index_ci_pipeline_schedules_on_project_id ON ci_pipeline_schedules USING btree (project_id); -CREATE INDEX index_ci_pipeline_variables_on_pipeline_id ON ci_pipeline_variables USING btree (pipeline_id) WHERE ((key)::text = 'AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE'::text); - CREATE UNIQUE INDEX index_ci_pipeline_variables_on_pipeline_id_and_key ON ci_pipeline_variables USING btree (pipeline_id, key); CREATE INDEX index_ci_pipelines_config_on_pipeline_id ON ci_pipelines_config USING btree (pipeline_id); +CREATE INDEX index_ci_pipelines_for_ondemand_dast_scans ON ci_pipelines USING btree (id) WHERE (source = 13); + CREATE INDEX index_ci_pipelines_on_auto_canceled_by_id ON ci_pipelines USING btree (auto_canceled_by_id); +CREATE INDEX index_ci_pipelines_on_ci_ref_id_and_more ON ci_pipelines USING btree (ci_ref_id, id DESC, source, status) WHERE (ci_ref_id IS NOT NULL); + CREATE INDEX index_ci_pipelines_on_external_pull_request_id ON ci_pipelines USING btree (external_pull_request_id) WHERE (external_pull_request_id IS NOT NULL); CREATE INDEX index_ci_pipelines_on_merge_request_id ON ci_pipelines USING btree (merge_request_id) WHERE (merge_request_id IS NOT NULL); @@ -8389,17 +21551,21 @@ CREATE INDEX index_ci_pipelines_on_project_id_and_source ON ci_pipelines USING b CREATE INDEX index_ci_pipelines_on_project_id_and_status_and_config_source ON ci_pipelines USING btree (project_id, status, config_source); +CREATE INDEX index_ci_pipelines_on_project_id_and_status_and_created_at ON ci_pipelines USING btree (project_id, status, created_at); + CREATE INDEX index_ci_pipelines_on_project_id_and_status_and_updated_at ON ci_pipelines USING btree (project_id, status, updated_at); +CREATE INDEX index_ci_pipelines_on_project_id_and_user_id_and_status_and_ref ON ci_pipelines USING btree (project_id, user_id, status, ref) WHERE (source <> 12); + CREATE INDEX index_ci_pipelines_on_project_idandrefandiddesc ON ci_pipelines USING btree (project_id, ref, id DESC); -CREATE INDEX index_ci_pipelines_on_status ON ci_pipelines USING btree (status); +CREATE INDEX index_ci_pipelines_on_status_and_id ON ci_pipelines USING btree (status, id); -CREATE INDEX index_ci_pipelines_on_user_id ON ci_pipelines USING btree (user_id); +CREATE INDEX index_ci_pipelines_on_user_id_and_created_at_and_config_source ON ci_pipelines USING btree (user_id, created_at, config_source); -CREATE INDEX index_ci_refs_on_last_updated_by_pipeline_id ON ci_refs USING btree (last_updated_by_pipeline_id); +CREATE INDEX index_ci_pipelines_on_user_id_and_created_at_and_source ON ci_pipelines USING btree (user_id, created_at, source); -CREATE UNIQUE INDEX index_ci_refs_on_project_id_and_ref_and_tag ON ci_refs USING btree (project_id, ref, tag); +CREATE UNIQUE INDEX index_ci_refs_on_project_id_and_ref_path ON ci_refs USING btree (project_id, ref_path); CREATE UNIQUE INDEX index_ci_resource_groups_on_project_id_and_key ON ci_resource_groups USING btree (project_id, key); @@ -8437,6 +21603,10 @@ CREATE INDEX index_ci_sources_pipelines_on_source_pipeline_id ON ci_sources_pipe CREATE INDEX index_ci_sources_pipelines_on_source_project_id ON ci_sources_pipelines USING btree (source_project_id); +CREATE INDEX index_ci_sources_projects_on_pipeline_id ON ci_sources_projects USING btree (pipeline_id); + +CREATE UNIQUE INDEX index_ci_sources_projects_on_source_project_id_and_pipeline_id ON ci_sources_projects USING btree (source_project_id, pipeline_id); + CREATE INDEX index_ci_stages_on_pipeline_id ON ci_stages USING btree (pipeline_id); CREATE UNIQUE INDEX index_ci_stages_on_pipeline_id_and_name ON ci_stages USING btree (pipeline_id, name); @@ -8449,6 +21619,10 @@ CREATE INDEX index_ci_subscriptions_projects_on_upstream_project_id ON ci_subscr CREATE UNIQUE INDEX index_ci_subscriptions_projects_unique_subscription ON ci_subscriptions_projects USING btree (downstream_project_id, upstream_project_id); +CREATE INDEX index_ci_test_case_failures_on_build_id ON ci_test_case_failures USING btree (build_id); + +CREATE UNIQUE INDEX index_ci_test_cases_on_project_id_and_key_hash ON ci_test_cases USING btree (project_id, key_hash); + CREATE INDEX index_ci_trigger_requests_on_commit_id ON ci_trigger_requests USING btree (commit_id); CREATE INDEX index_ci_trigger_requests_on_trigger_id_and_id ON ci_trigger_requests USING btree (trigger_id, id DESC); @@ -8457,10 +21631,16 @@ CREATE INDEX index_ci_triggers_on_owner_id ON ci_triggers USING btree (owner_id) CREATE INDEX index_ci_triggers_on_project_id ON ci_triggers USING btree (project_id); -CREATE INDEX index_ci_variables_on_project_id ON ci_variables USING btree (project_id) WHERE ((key)::text = 'AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE'::text); +CREATE INDEX index_ci_variables_on_key ON ci_variables USING btree (key); CREATE UNIQUE INDEX index_ci_variables_on_project_id_and_key_and_environment_scope ON ci_variables USING btree (project_id, key, environment_scope); +CREATE INDEX index_cluster_agent_tokens_on_agent_id ON cluster_agent_tokens USING btree (agent_id); + +CREATE UNIQUE INDEX index_cluster_agent_tokens_on_token_encrypted ON cluster_agent_tokens USING btree (token_encrypted); + +CREATE UNIQUE INDEX index_cluster_agents_on_project_id_and_name ON cluster_agents USING btree (project_id, name); + CREATE UNIQUE INDEX index_cluster_groups_on_cluster_id_and_group_id ON cluster_groups USING btree (cluster_id, group_id); CREATE INDEX index_cluster_groups_on_group_id ON cluster_groups USING btree (group_id); @@ -8475,22 +21655,26 @@ CREATE UNIQUE INDEX index_cluster_providers_aws_on_cluster_id ON cluster_provide CREATE INDEX index_cluster_providers_aws_on_cluster_id_and_status ON cluster_providers_aws USING btree (cluster_id, status); -CREATE INDEX index_cluster_providers_aws_on_created_by_user_id ON cluster_providers_aws USING btree (created_by_user_id); - CREATE INDEX index_cluster_providers_gcp_on_cloud_run ON cluster_providers_gcp USING btree (cloud_run); CREATE UNIQUE INDEX index_cluster_providers_gcp_on_cluster_id ON cluster_providers_gcp USING btree (cluster_id); CREATE UNIQUE INDEX index_clusters_applications_cert_managers_on_cluster_id ON clusters_applications_cert_managers USING btree (cluster_id); +CREATE UNIQUE INDEX index_clusters_applications_cilium_on_cluster_id ON clusters_applications_cilium USING btree (cluster_id); + CREATE UNIQUE INDEX index_clusters_applications_crossplane_on_cluster_id ON clusters_applications_crossplane USING btree (cluster_id); CREATE UNIQUE INDEX index_clusters_applications_elastic_stacks_on_cluster_id ON clusters_applications_elastic_stacks USING btree (cluster_id); +CREATE UNIQUE INDEX index_clusters_applications_fluentd_on_cluster_id ON clusters_applications_fluentd USING btree (cluster_id); + CREATE UNIQUE INDEX index_clusters_applications_helm_on_cluster_id ON clusters_applications_helm USING btree (cluster_id); CREATE UNIQUE INDEX index_clusters_applications_ingress_on_cluster_id ON clusters_applications_ingress USING btree (cluster_id); +CREATE INDEX index_clusters_applications_ingress_on_modsecurity ON clusters_applications_ingress USING btree (modsecurity_enabled, modsecurity_mode, cluster_id); + CREATE UNIQUE INDEX index_clusters_applications_jupyter_on_cluster_id ON clusters_applications_jupyter USING btree (cluster_id); CREATE INDEX index_clusters_applications_jupyter_on_oauth_application_id ON clusters_applications_jupyter USING btree (oauth_application_id); @@ -8511,7 +21695,9 @@ CREATE INDEX index_clusters_kubernetes_namespaces_on_environment_id ON clusters_ CREATE INDEX index_clusters_kubernetes_namespaces_on_project_id ON clusters_kubernetes_namespaces USING btree (project_id); -CREATE INDEX index_clusters_on_enabled ON clusters USING btree (enabled); +CREATE INDEX index_clusters_on_enabled_and_provider_type_and_id ON clusters USING btree (enabled, provider_type, id); + +CREATE INDEX index_clusters_on_enabled_cluster_type_id_and_created_at ON clusters USING btree (enabled, cluster_type, id, created_at); CREATE INDEX index_clusters_on_management_project_id ON clusters USING btree (management_project_id) WHERE (management_project_id IS NOT NULL); @@ -8523,12 +21709,46 @@ CREATE INDEX index_container_expiration_policies_on_next_run_at_and_enabled ON c CREATE INDEX index_container_repositories_on_project_id ON container_repositories USING btree (project_id); +CREATE INDEX index_container_repositories_on_project_id_and_id ON container_repositories USING btree (project_id, id); + CREATE UNIQUE INDEX index_container_repositories_on_project_id_and_name ON container_repositories USING btree (project_id, name); +CREATE INDEX index_container_repository_on_name_trigram ON container_repositories USING gin (name gin_trgm_ops); + +CREATE INDEX index_created_at_on_codeowner_approval_merge_request_rules ON approval_merge_request_rules USING btree (created_at) WHERE ((rule_type = 2) AND (section <> 'codeowners'::text)); + +CREATE INDEX index_csv_issue_imports_on_project_id ON csv_issue_imports USING btree (project_id); + +CREATE INDEX index_csv_issue_imports_on_user_id ON csv_issue_imports USING btree (user_id); + +CREATE UNIQUE INDEX index_custom_emoji_on_namespace_id_and_name ON custom_emoji USING btree (namespace_id, name); + +CREATE UNIQUE INDEX index_daily_build_group_report_results_unique_columns ON ci_daily_build_group_report_results USING btree (project_id, ref_path, date, group_name); + +CREATE UNIQUE INDEX index_dast_scanner_profiles_on_project_id_and_name ON dast_scanner_profiles USING btree (project_id, name); + +CREATE INDEX index_dast_site_profiles_on_dast_site_id ON dast_site_profiles USING btree (dast_site_id); + +CREATE UNIQUE INDEX index_dast_site_profiles_on_project_id_and_name ON dast_site_profiles USING btree (project_id, name); + +CREATE INDEX index_dast_site_tokens_on_project_id ON dast_site_tokens USING btree (project_id); + +CREATE INDEX index_dast_site_validations_on_dast_site_token_id ON dast_site_validations USING btree (dast_site_token_id); + +CREATE INDEX index_dast_site_validations_on_url_base_and_state ON dast_site_validations USING btree (url_base, state); + +CREATE INDEX index_dast_sites_on_dast_site_validation_id ON dast_sites USING btree (dast_site_validation_id); + +CREATE UNIQUE INDEX index_dast_sites_on_project_id_and_url ON dast_sites USING btree (project_id, url); + CREATE INDEX index_dependency_proxy_blobs_on_group_id_and_file_name ON dependency_proxy_blobs USING btree (group_id, file_name); CREATE INDEX index_dependency_proxy_group_settings_on_group_id ON dependency_proxy_group_settings USING btree (group_id); +CREATE UNIQUE INDEX index_dependency_proxy_manifests_on_group_id_and_file_name ON dependency_proxy_manifests USING btree (group_id, file_name); + +CREATE INDEX index_deploy_key_id_on_protected_branch_push_access_levels ON protected_branch_push_access_levels USING btree (deploy_key_id); + CREATE INDEX index_deploy_keys_projects_on_deploy_key_id ON deploy_keys_projects USING btree (deploy_key_id); CREATE INDEX index_deploy_keys_projects_on_project_id ON deploy_keys_projects USING btree (project_id); @@ -8539,6 +21759,8 @@ CREATE INDEX index_deploy_tokens_on_token_and_expires_at_and_id ON deploy_tokens CREATE UNIQUE INDEX index_deploy_tokens_on_token_encrypted ON deploy_tokens USING btree (token_encrypted); +CREATE UNIQUE INDEX index_deployment_clusters_on_cluster_id_and_deployment_id ON deployment_clusters USING btree (cluster_id, deployment_id); + CREATE INDEX index_deployment_merge_requests_on_merge_request_id ON deployment_merge_requests USING btree (merge_request_id); CREATE INDEX index_deployments_on_cluster_id_and_status ON deployments USING btree (cluster_id, status); @@ -8551,7 +21773,13 @@ CREATE INDEX index_deployments_on_environment_id_and_id ON deployments USING btr CREATE INDEX index_deployments_on_environment_id_and_iid_and_project_id ON deployments USING btree (environment_id, iid, project_id); -CREATE INDEX index_deployments_on_environment_id_and_status ON deployments USING btree (environment_id, status); +CREATE INDEX index_deployments_on_environment_status_sha ON deployments USING btree (environment_id, status, sha); + +CREATE INDEX index_deployments_on_id_and_status_and_created_at ON deployments USING btree (id, status, created_at); + +CREATE INDEX index_deployments_on_id_where_cluster_id_present ON deployments USING btree (id) WHERE (cluster_id IS NOT NULL); + +CREATE INDEX index_deployments_on_project_and_finished ON deployments USING btree (project_id, finished_at) WHERE (status = 2); CREATE INDEX index_deployments_on_project_id_and_id ON deployments USING btree (project_id, id DESC); @@ -8565,12 +21793,20 @@ CREATE INDEX index_deployments_on_project_id_and_status_and_created_at ON deploy CREATE INDEX index_deployments_on_project_id_and_updated_at_and_id ON deployments USING btree (project_id, updated_at DESC, id DESC); +CREATE INDEX index_deployments_on_project_id_sha ON deployments USING btree (project_id, sha); + +CREATE INDEX index_deployments_on_user_id_and_status_and_created_at ON deployments USING btree (user_id, status, created_at); + CREATE INDEX index_description_versions_on_epic_id ON description_versions USING btree (epic_id) WHERE (epic_id IS NOT NULL); CREATE INDEX index_description_versions_on_issue_id ON description_versions USING btree (issue_id) WHERE (issue_id IS NOT NULL); CREATE INDEX index_description_versions_on_merge_request_id ON description_versions USING btree (merge_request_id) WHERE (merge_request_id IS NOT NULL); +CREATE INDEX index_design_management_designs_issue_id_relative_position_id ON design_management_designs USING btree (issue_id, relative_position, id); + +CREATE UNIQUE INDEX index_design_management_designs_on_iid_and_project_id ON design_management_designs USING btree (project_id, iid); + CREATE UNIQUE INDEX index_design_management_designs_on_issue_id_and_filename ON design_management_designs USING btree (issue_id, filename); CREATE INDEX index_design_management_designs_on_project_id ON design_management_designs USING btree (project_id); @@ -8589,17 +21825,19 @@ CREATE UNIQUE INDEX index_design_management_versions_on_sha_and_issue_id ON desi CREATE UNIQUE INDEX index_design_user_mentions_on_note_id ON design_user_mentions USING btree (note_id); +CREATE UNIQUE INDEX index_diff_note_positions_on_note_id_and_diff_type ON diff_note_positions USING btree (note_id, diff_type); + CREATE INDEX index_draft_notes_on_author_id ON draft_notes USING btree (author_id); CREATE INDEX index_draft_notes_on_discussion_id ON draft_notes USING btree (discussion_id); CREATE INDEX index_draft_notes_on_merge_request_id ON draft_notes USING btree (merge_request_id); -CREATE INDEX index_elasticsearch_indexed_namespaces_on_created_at ON elasticsearch_indexed_namespaces USING btree (created_at); +CREATE UNIQUE INDEX index_elastic_reindexing_tasks_on_in_progress ON elastic_reindexing_tasks USING btree (in_progress) WHERE in_progress; -CREATE UNIQUE INDEX index_elasticsearch_indexed_namespaces_on_namespace_id ON elasticsearch_indexed_namespaces USING btree (namespace_id); +CREATE INDEX index_elastic_reindexing_tasks_on_state ON elastic_reindexing_tasks USING btree (state); -CREATE UNIQUE INDEX index_elasticsearch_indexed_projects_on_project_id ON elasticsearch_indexed_projects USING btree (project_id); +CREATE INDEX index_elasticsearch_indexed_namespaces_on_created_at ON elasticsearch_indexed_namespaces USING btree (created_at); CREATE UNIQUE INDEX index_emails_on_confirmation_token ON emails USING btree (confirmation_token); @@ -8607,6 +21845,8 @@ CREATE UNIQUE INDEX index_emails_on_email ON emails USING btree (email); CREATE INDEX index_emails_on_user_id ON emails USING btree (user_id); +CREATE INDEX index_enabled_clusters_on_id ON clusters USING btree (id) WHERE (enabled = true); + CREATE INDEX index_environments_on_name_varchar_pattern_ops ON environments USING btree (name varchar_pattern_ops); CREATE UNIQUE INDEX index_environments_on_project_id_and_name ON environments USING btree (project_id, name); @@ -8615,6 +21855,8 @@ CREATE UNIQUE INDEX index_environments_on_project_id_and_slug ON environments US CREATE INDEX index_environments_on_project_id_state_environment_type ON environments USING btree (project_id, state, environment_type); +CREATE INDEX index_environments_on_state_and_auto_stop_at ON environments USING btree (state, auto_stop_at) WHERE ((auto_stop_at IS NOT NULL) AND ((state)::text = 'available'::text)); + CREATE INDEX index_epic_issues_on_epic_id ON epic_issues USING btree (epic_id); CREATE UNIQUE INDEX index_epic_issues_on_issue_id ON epic_issues USING btree (issue_id); @@ -8629,6 +21871,8 @@ CREATE INDEX index_epics_on_author_id ON epics USING btree (author_id); CREATE INDEX index_epics_on_closed_by_id ON epics USING btree (closed_by_id); +CREATE INDEX index_epics_on_confidential ON epics USING btree (confidential); + CREATE INDEX index_epics_on_due_date_sourcing_epic_id ON epics USING btree (due_date_sourcing_epic_id) WHERE (due_date_sourcing_epic_id IS NOT NULL); CREATE INDEX index_epics_on_due_date_sourcing_milestone_id ON epics USING btree (due_date_sourcing_milestone_id); @@ -8637,8 +21881,18 @@ CREATE INDEX index_epics_on_end_date ON epics USING btree (end_date); CREATE INDEX index_epics_on_group_id ON epics USING btree (group_id); +CREATE UNIQUE INDEX index_epics_on_group_id_and_external_key ON epics USING btree (group_id, external_key) WHERE (external_key IS NOT NULL); + +CREATE UNIQUE INDEX index_epics_on_group_id_and_iid ON epics USING btree (group_id, iid); + +CREATE INDEX index_epics_on_group_id_and_iid_varchar_pattern ON epics USING btree (group_id, ((iid)::character varying) varchar_pattern_ops); + CREATE INDEX index_epics_on_iid ON epics USING btree (iid); +CREATE INDEX index_epics_on_last_edited_by_id ON epics USING btree (last_edited_by_id); + +CREATE INDEX index_epics_on_lock_version ON epics USING btree (lock_version) WHERE (lock_version IS NULL); + CREATE INDEX index_epics_on_parent_id ON epics USING btree (parent_id); CREATE INDEX index_epics_on_start_date ON epics USING btree (start_date); @@ -8649,6 +21903,10 @@ CREATE INDEX index_epics_on_start_date_sourcing_milestone_id ON epics USING btre CREATE INDEX index_events_on_action ON events USING btree (action); +CREATE INDEX index_events_on_author_id_and_created_at ON events USING btree (author_id, created_at); + +CREATE INDEX index_events_on_author_id_and_created_at_merge_requests ON events USING btree (author_id, created_at) WHERE ((target_type)::text = 'MergeRequest'::text); + CREATE INDEX index_events_on_author_id_and_project_id ON events USING btree (author_id, project_id); CREATE INDEX index_events_on_group_id_partial ON events USING btree (group_id) WHERE (group_id IS NOT NULL); @@ -8657,10 +21915,30 @@ CREATE INDEX index_events_on_project_id_and_created_at ON events USING btree (pr CREATE INDEX index_events_on_project_id_and_id ON events USING btree (project_id, id); +CREATE INDEX index_events_on_project_id_and_id_desc_on_merged_action ON events USING btree (project_id, id DESC) WHERE (action = 7); + CREATE INDEX index_events_on_target_type_and_target_id ON events USING btree (target_type, target_id); +CREATE UNIQUE INDEX index_events_on_target_type_and_target_id_and_fingerprint ON events USING btree (target_type, target_id, fingerprint); + CREATE INDEX index_evidences_on_release_id ON evidences USING btree (release_id); +CREATE INDEX index_experiment_subjects_on_experiment_id ON experiment_subjects USING btree (experiment_id); + +CREATE INDEX index_experiment_subjects_on_group_id ON experiment_subjects USING btree (group_id); + +CREATE INDEX index_experiment_subjects_on_project_id ON experiment_subjects USING btree (project_id); + +CREATE INDEX index_experiment_subjects_on_user_id ON experiment_subjects USING btree (user_id); + +CREATE INDEX index_experiment_users_on_experiment_id ON experiment_users USING btree (experiment_id); + +CREATE INDEX index_experiment_users_on_user_id ON experiment_users USING btree (user_id); + +CREATE UNIQUE INDEX index_experiments_on_name ON experiments USING btree (name); + +CREATE INDEX index_expired_and_not_notified_personal_access_tokens ON personal_access_tokens USING btree (id, expires_at) WHERE ((impersonation = false) AND (revoked = false) AND (expire_notification_delivered = false)); + CREATE UNIQUE INDEX index_external_pull_requests_on_project_and_branches ON external_pull_requests USING btree (project_id, source_branch, target_branch); CREATE UNIQUE INDEX index_feature_flag_scopes_on_flag_id_and_environment_scope ON operations_feature_flag_scopes USING btree (feature_flag_id, environment_scope); @@ -8671,10 +21949,6 @@ CREATE UNIQUE INDEX index_feature_gates_on_feature_key_and_key_and_value ON feat CREATE UNIQUE INDEX index_features_on_key ON features USING btree (key); -CREATE UNIQUE INDEX index_file_commits_on_committed_date_file_id_and_project_id ON analytics_repository_file_commits USING btree (project_id, committed_date, analytics_repository_file_id); - -CREATE UNIQUE INDEX index_file_edits_on_committed_date_file_id_and_project_id ON analytics_repository_file_edits USING btree (analytics_repository_file_id, committed_date, project_id); - CREATE INDEX index_for_resource_group ON ci_builds USING btree (resource_group_id, id) WHERE (resource_group_id IS NOT NULL); CREATE INDEX index_for_status_per_branch_per_project ON merge_trains USING btree (target_project_id, target_branch, status); @@ -8687,12 +21961,12 @@ CREATE UNIQUE INDEX index_fork_network_members_on_project_id ON fork_network_mem CREATE UNIQUE INDEX index_fork_networks_on_root_project_id ON fork_networks USING btree (root_project_id); -CREATE UNIQUE INDEX index_forked_project_links_on_forked_to_project_id ON forked_project_links USING btree (forked_to_project_id); - CREATE INDEX index_geo_event_log_on_cache_invalidation_event_id ON geo_event_log USING btree (cache_invalidation_event_id) WHERE (cache_invalidation_event_id IS NOT NULL); CREATE INDEX index_geo_event_log_on_container_repository_updated_event_id ON geo_event_log USING btree (container_repository_updated_event_id); +CREATE INDEX index_geo_event_log_on_geo_event_id ON geo_event_log USING btree (geo_event_id) WHERE (geo_event_id IS NOT NULL); + CREATE INDEX index_geo_event_log_on_hashed_storage_attachments_event_id ON geo_event_log USING btree (hashed_storage_attachments_event_id) WHERE (hashed_storage_attachments_event_id IS NOT NULL); CREATE INDEX index_geo_event_log_on_hashed_storage_migrated_event_id ON geo_event_log USING btree (hashed_storage_migrated_event_id) WHERE (hashed_storage_migrated_event_id IS NOT NULL); @@ -8755,6 +22029,8 @@ CREATE INDEX index_geo_upload_deleted_events_on_upload_id ON geo_upload_deleted_ CREATE INDEX index_gitlab_subscription_histories_on_gitlab_subscription_id ON gitlab_subscription_histories USING btree (gitlab_subscription_id); +CREATE INDEX index_gitlab_subscriptions_on_end_date_and_namespace_id ON gitlab_subscriptions USING btree (end_date, namespace_id); + CREATE INDEX index_gitlab_subscriptions_on_hosted_plan_id ON gitlab_subscriptions USING btree (hosted_plan_id); CREATE UNIQUE INDEX index_gitlab_subscriptions_on_namespace_id ON gitlab_subscriptions USING btree (namespace_id); @@ -8793,14 +22069,42 @@ CREATE INDEX index_group_deletion_schedules_on_marked_for_deletion_on ON group_d CREATE INDEX index_group_deletion_schedules_on_user_id ON group_deletion_schedules USING btree (user_id); +CREATE UNIQUE INDEX index_group_deploy_keys_group_on_group_deploy_key_and_group_ids ON group_deploy_keys_groups USING btree (group_id, group_deploy_key_id); + +CREATE INDEX index_group_deploy_keys_groups_on_group_deploy_key_id ON group_deploy_keys_groups USING btree (group_deploy_key_id); + +CREATE UNIQUE INDEX index_group_deploy_keys_on_fingerprint ON group_deploy_keys USING btree (fingerprint); + +CREATE INDEX index_group_deploy_keys_on_fingerprint_sha256 ON group_deploy_keys USING btree (fingerprint_sha256); + +CREATE INDEX index_group_deploy_keys_on_user_id ON group_deploy_keys USING btree (user_id); + +CREATE INDEX index_group_deploy_tokens_on_deploy_token_id ON group_deploy_tokens USING btree (deploy_token_id); + +CREATE UNIQUE INDEX index_group_deploy_tokens_on_group_and_deploy_token_ids ON group_deploy_tokens USING btree (group_id, deploy_token_id); + CREATE UNIQUE INDEX index_group_group_links_on_shared_group_and_shared_with_group ON group_group_links USING btree (shared_group_id, shared_with_group_id); CREATE INDEX index_group_group_links_on_shared_with_group_id ON group_group_links USING btree (shared_with_group_id); +CREATE INDEX index_group_import_states_on_group_id ON group_import_states USING btree (group_id); + +CREATE INDEX index_group_import_states_on_user_id ON group_import_states USING btree (user_id) WHERE (user_id IS NOT NULL); + +CREATE UNIQUE INDEX index_group_stages_on_group_id_group_value_stream_id_and_name ON analytics_cycle_analytics_group_stages USING btree (group_id, group_value_stream_id, name); + +CREATE UNIQUE INDEX index_group_wiki_repositories_on_disk_path ON group_wiki_repositories USING btree (disk_path); + +CREATE INDEX index_group_wiki_repositories_on_shard_id ON group_wiki_repositories USING btree (shard_id); + +CREATE UNIQUE INDEX index_http_integrations_on_active_and_project_and_endpoint ON alert_management_http_integrations USING btree (active, project_id, endpoint_identifier) WHERE active; + CREATE INDEX index_identities_on_saml_provider_id ON identities USING btree (saml_provider_id) WHERE (saml_provider_id IS NOT NULL); CREATE INDEX index_identities_on_user_id ON identities USING btree (user_id); +CREATE UNIQUE INDEX index_im_oncall_schedules_on_project_id_and_iid ON incident_management_oncall_schedules USING btree (project_id, iid); + CREATE UNIQUE INDEX index_import_export_uploads_on_group_id ON import_export_uploads USING btree (group_id) WHERE (group_id IS NOT NULL); CREATE INDEX index_import_export_uploads_on_project_id ON import_export_uploads USING btree (project_id); @@ -8809,7 +22113,29 @@ CREATE INDEX index_import_export_uploads_on_updated_at ON import_export_uploads CREATE INDEX index_import_failures_on_correlation_id_value ON import_failures USING btree (correlation_id_value); -CREATE INDEX index_import_failures_on_project_id ON import_failures USING btree (project_id); +CREATE INDEX index_import_failures_on_group_id_not_null ON import_failures USING btree (group_id) WHERE (group_id IS NOT NULL); + +CREATE INDEX index_import_failures_on_project_id_and_correlation_id_value ON import_failures USING btree (project_id, correlation_id_value) WHERE (retry_count = 0); + +CREATE INDEX index_import_failures_on_project_id_not_null ON import_failures USING btree (project_id) WHERE (project_id IS NOT NULL); + +CREATE INDEX index_imported_projects_on_import_type_creator_id_created_at ON projects USING btree (import_type, creator_id, created_at) WHERE (import_type IS NOT NULL); + +CREATE INDEX index_inc_mgmnt_oncall_participants_on_oncall_rotation_id ON incident_management_oncall_participants USING btree (oncall_rotation_id); + +CREATE INDEX index_inc_mgmnt_oncall_participants_on_oncall_user_id ON incident_management_oncall_participants USING btree (user_id); + +CREATE UNIQUE INDEX index_inc_mgmnt_oncall_participants_on_user_id_and_rotation_id ON incident_management_oncall_participants USING btree (user_id, oncall_rotation_id); + +CREATE UNIQUE INDEX index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_id ON incident_management_oncall_rotations USING btree (oncall_schedule_id, id); + +CREATE UNIQUE INDEX index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_name ON incident_management_oncall_rotations USING btree (oncall_schedule_id, name); + +CREATE INDEX index_incident_management_oncall_schedules_on_project_id ON incident_management_oncall_schedules USING btree (project_id); + +CREATE INDEX index_incident_management_oncall_shifts_on_participant_id ON incident_management_oncall_shifts USING btree (participant_id); + +CREATE INDEX index_incident_management_oncall_shifts_on_rotation_id ON incident_management_oncall_shifts USING btree (rotation_id); CREATE UNIQUE INDEX index_index_statuses_on_project_id ON index_statuses USING btree (project_id); @@ -8827,10 +22153,16 @@ CREATE UNIQUE INDEX index_internal_ids_on_usage_and_project_id ON internal_ids U CREATE INDEX index_ip_restrictions_on_group_id ON ip_restrictions USING btree (group_id); -CREATE UNIQUE INDEX index_issue_assignees_on_issue_id_and_user_id ON issue_assignees USING btree (issue_id, user_id); +CREATE INDEX index_issuable_metric_images_on_issue_id ON issuable_metric_images USING btree (issue_id); + +CREATE UNIQUE INDEX index_issuable_severities_on_issue_id ON issuable_severities USING btree (issue_id); + +CREATE UNIQUE INDEX index_issuable_slas_on_issue_id ON issuable_slas USING btree (issue_id); CREATE INDEX index_issue_assignees_on_user_id ON issue_assignees USING btree (user_id); +CREATE UNIQUE INDEX index_issue_email_participants_on_issue_id_and_lower_email ON issue_email_participants USING btree (issue_id, lower(email)); + CREATE INDEX index_issue_links_on_source_id ON issue_links USING btree (source_id); CREATE UNIQUE INDEX index_issue_links_on_source_id_and_target_id ON issue_links USING btree (source_id, target_id); @@ -8841,11 +22173,7 @@ CREATE INDEX index_issue_metrics ON issue_metrics USING btree (issue_id); CREATE INDEX index_issue_metrics_on_issue_id_and_timestamps ON issue_metrics USING btree (issue_id, first_mentioned_in_commit_at, first_associated_with_milestone_at, first_added_to_board_at); -CREATE UNIQUE INDEX index_issue_milestones_on_issue_id ON issue_milestones USING btree (issue_id); - -CREATE UNIQUE INDEX index_issue_milestones_on_issue_id_and_milestone_id ON issue_milestones USING btree (issue_id, milestone_id); - -CREATE INDEX index_issue_milestones_on_milestone_id ON issue_milestones USING btree (milestone_id); +CREATE INDEX index_issue_on_project_id_state_id_and_blocking_issues_count ON issues USING btree (project_id, state_id, blocking_issues_count); CREATE INDEX index_issue_tracker_data_on_service_id ON issue_tracker_data USING btree (service_id); @@ -8853,6 +22181,8 @@ CREATE UNIQUE INDEX index_issue_user_mentions_on_note_id ON issue_user_mentions CREATE INDEX index_issues_on_author_id ON issues USING btree (author_id); +CREATE INDEX index_issues_on_author_id_and_id_and_created_at ON issues USING btree (author_id, id, created_at); + CREATE INDEX index_issues_on_closed_by_id ON issues USING btree (closed_by_id); CREATE INDEX index_issues_on_confidential ON issues USING btree (confidential); @@ -8861,23 +22191,27 @@ CREATE INDEX index_issues_on_description_trigram ON issues USING gin (descriptio CREATE INDEX index_issues_on_duplicated_to_id ON issues USING btree (duplicated_to_id) WHERE (duplicated_to_id IS NOT NULL); +CREATE INDEX index_issues_on_incident_issue_type ON issues USING btree (issue_type) WHERE (issue_type = 1); + +CREATE INDEX index_issues_on_last_edited_by_id ON issues USING btree (last_edited_by_id); + +CREATE INDEX index_issues_on_lock_version ON issues USING btree (lock_version) WHERE (lock_version IS NULL); + CREATE INDEX index_issues_on_milestone_id ON issues USING btree (milestone_id); CREATE INDEX index_issues_on_moved_to_id ON issues USING btree (moved_to_id) WHERE (moved_to_id IS NOT NULL); -CREATE INDEX index_issues_on_project_id_and_created_at_and_id_and_state ON issues USING btree (project_id, created_at, id, state); +CREATE INDEX index_issues_on_project_id_and_closed_at ON issues USING btree (project_id, closed_at); -CREATE UNIQUE INDEX index_issues_on_project_id_and_iid ON issues USING btree (project_id, iid); +CREATE INDEX index_issues_on_project_id_and_created_at_issue_type_incident ON issues USING btree (project_id, created_at) WHERE (issue_type = 1); -CREATE INDEX index_issues_on_project_id_and_rel_position_and_state_and_id ON issues USING btree (project_id, relative_position, state, id DESC); +CREATE UNIQUE INDEX index_issues_on_project_id_and_external_key ON issues USING btree (project_id, external_key) WHERE (external_key IS NOT NULL); -CREATE INDEX index_issues_on_project_id_and_updated_at_and_id_and_state ON issues USING btree (project_id, updated_at, id, state); +CREATE UNIQUE INDEX index_issues_on_project_id_and_iid ON issues USING btree (project_id, iid); CREATE INDEX index_issues_on_promoted_to_epic_id ON issues USING btree (promoted_to_epic_id) WHERE (promoted_to_epic_id IS NOT NULL); -CREATE INDEX index_issues_on_relative_position ON issues USING btree (relative_position); - -CREATE INDEX index_issues_on_state ON issues USING btree (state); +CREATE INDEX index_issues_on_sprint_id ON issues USING btree (sprint_id); CREATE INDEX index_issues_on_title_trigram ON issues USING gin (title gin_trgm_ops); @@ -8889,19 +22223,27 @@ CREATE UNIQUE INDEX index_jira_connect_installations_on_client_key ON jira_conne CREATE INDEX index_jira_connect_subscriptions_on_namespace_id ON jira_connect_subscriptions USING btree (namespace_id); +CREATE INDEX index_jira_imports_on_label_id ON jira_imports USING btree (label_id); + +CREATE INDEX index_jira_imports_on_project_id_and_jira_project_key ON jira_imports USING btree (project_id, jira_project_key); + +CREATE INDEX index_jira_imports_on_user_id ON jira_imports USING btree (user_id); + CREATE INDEX index_jira_tracker_data_on_service_id ON jira_tracker_data USING btree (service_id); CREATE UNIQUE INDEX index_keys_on_fingerprint ON keys USING btree (fingerprint); CREATE INDEX index_keys_on_fingerprint_sha256 ON keys USING btree (fingerprint_sha256); +CREATE INDEX index_keys_on_id_and_ldap_key_type ON keys USING btree (id) WHERE ((type)::text = 'LDAPKey'::text); + CREATE INDEX index_keys_on_last_used_at ON keys USING btree (last_used_at DESC NULLS LAST); CREATE INDEX index_keys_on_user_id ON keys USING btree (user_id); CREATE UNIQUE INDEX index_kubernetes_namespaces_on_cluster_project_environment_id ON clusters_kubernetes_namespaces USING btree (cluster_id, project_id, environment_id); -CREATE INDEX index_label_links_on_label_id ON label_links USING btree (label_id); +CREATE INDEX index_label_links_on_label_id_and_target_type ON label_links USING btree (label_id, target_type); CREATE INDEX index_label_links_on_target_id_and_target_type ON label_links USING btree (target_id, target_type); @@ -8913,11 +22255,13 @@ CREATE UNIQUE INDEX index_label_priorities_on_project_id_and_label_id ON label_p CREATE UNIQUE INDEX index_labels_on_group_id_and_project_id_and_title ON labels USING btree (group_id, project_id, title); -CREATE INDEX index_labels_on_group_id_and_title ON labels USING btree (group_id, title) WHERE (project_id = NULL::integer); +CREATE UNIQUE INDEX index_labels_on_group_id_and_title_unique ON labels USING btree (group_id, title) WHERE (project_id IS NULL); + +CREATE INDEX index_labels_on_group_id_and_title_with_null_project_id ON labels USING btree (group_id, title) WHERE (project_id IS NULL); CREATE INDEX index_labels_on_project_id ON labels USING btree (project_id); -CREATE INDEX index_labels_on_project_id_and_title ON labels USING btree (project_id, title) WHERE (group_id = NULL::integer); +CREATE UNIQUE INDEX index_labels_on_project_id_and_title_unique ON labels USING btree (project_id, title) WHERE (group_id IS NULL); CREATE INDEX index_labels_on_template ON labels USING btree (template) WHERE template; @@ -8935,7 +22279,7 @@ CREATE UNIQUE INDEX index_lfs_objects_on_oid ON lfs_objects USING btree (oid); CREATE INDEX index_lfs_objects_projects_on_lfs_object_id ON lfs_objects_projects USING btree (lfs_object_id); -CREATE INDEX index_lfs_objects_projects_on_project_id ON lfs_objects_projects USING btree (project_id); +CREATE INDEX index_lfs_objects_projects_on_project_id_and_lfs_object_id ON lfs_objects_projects USING btree (project_id, lfs_object_id); CREATE INDEX index_list_user_preferences_on_list_id ON list_user_preferences USING btree (list_id); @@ -8945,6 +22289,8 @@ CREATE UNIQUE INDEX index_list_user_preferences_on_user_id_and_list_id ON list_u CREATE UNIQUE INDEX index_lists_on_board_id_and_label_id ON lists USING btree (board_id, label_id); +CREATE INDEX index_lists_on_iteration_id ON lists USING btree (iteration_id); + CREATE INDEX index_lists_on_label_id ON lists USING btree (label_id); CREATE INDEX index_lists_on_list_type ON lists USING btree (list_type); @@ -8967,6 +22313,8 @@ CREATE INDEX index_members_on_source_id_and_source_type ON members USING btree ( CREATE INDEX index_members_on_user_id ON members USING btree (user_id); +CREATE INDEX index_members_on_user_id_created_at ON members USING btree (user_id, created_at) WHERE ((ldap = true) AND ((type)::text = 'GroupMember'::text) AND ((source_type)::text = 'Namespace'::text)); + CREATE INDEX index_merge_request_assignees_on_merge_request_id ON merge_request_assignees USING btree (merge_request_id); CREATE UNIQUE INDEX index_merge_request_assignees_on_merge_request_id_and_user_id ON merge_request_assignees USING btree (merge_request_id, user_id); @@ -8975,19 +22323,19 @@ CREATE INDEX index_merge_request_assignees_on_user_id ON merge_request_assignees CREATE INDEX index_merge_request_blocks_on_blocked_merge_request_id ON merge_request_blocks USING btree (blocked_merge_request_id); -CREATE INDEX index_merge_request_context_commits_on_merge_request_id ON merge_request_context_commits USING btree (merge_request_id); +CREATE UNIQUE INDEX index_merge_request_cleanup_schedules_on_merge_request_id ON merge_request_cleanup_schedules USING btree (merge_request_id); -CREATE UNIQUE INDEX index_merge_request_diff_commits_on_mr_diff_id_and_order ON merge_request_diff_commits USING btree (merge_request_diff_id, relative_order); +CREATE INDEX index_merge_request_context_commits_on_merge_request_id ON merge_request_context_commits USING btree (merge_request_id); CREATE INDEX index_merge_request_diff_commits_on_sha ON merge_request_diff_commits USING btree (sha); -CREATE UNIQUE INDEX index_merge_request_diff_files_on_mr_diff_id_and_order ON merge_request_diff_files USING btree (merge_request_diff_id, relative_order); +CREATE INDEX index_merge_request_diff_details_on_merge_request_diff_id ON merge_request_diff_details USING btree (merge_request_diff_id); -CREATE INDEX index_merge_request_diffs_on_merge_request_id_and_id ON merge_request_diffs USING btree (merge_request_id, id); +CREATE INDEX index_merge_request_diffs_by_id_partial ON merge_request_diffs USING btree (id) WHERE ((files_count > 0) AND ((NOT stored_externally) OR (stored_externally IS NULL))); -CREATE INDEX index_merge_request_diffs_on_merge_request_id_and_id_partial ON merge_request_diffs USING btree (merge_request_id, id) WHERE ((NOT stored_externally) OR (stored_externally IS NULL)); +CREATE INDEX index_merge_request_diffs_on_external_diff_store ON merge_request_diffs USING btree (external_diff_store); -CREATE INDEX index_merge_request_metrics ON merge_request_metrics USING btree (merge_request_id); +CREATE INDEX index_merge_request_diffs_on_merge_request_id_and_id ON merge_request_diffs USING btree (merge_request_id, id); CREATE INDEX index_merge_request_metrics_on_first_deployed_to_production_at ON merge_request_metrics USING btree (first_deployed_to_production_at); @@ -9003,9 +22351,11 @@ CREATE INDEX index_merge_request_metrics_on_merged_by_id ON merge_request_metric CREATE INDEX index_merge_request_metrics_on_pipeline_id ON merge_request_metrics USING btree (pipeline_id); -CREATE UNIQUE INDEX index_merge_request_milestones_on_merge_request_id ON merge_request_milestones USING btree (merge_request_id); +CREATE INDEX index_merge_request_metrics_on_target_project_id ON merge_request_metrics USING btree (target_project_id); -CREATE INDEX index_merge_request_milestones_on_milestone_id ON merge_request_milestones USING btree (milestone_id); +CREATE UNIQUE INDEX index_merge_request_reviewers_on_merge_request_id_and_user_id ON merge_request_reviewers USING btree (merge_request_id, user_id); + +CREATE INDEX index_merge_request_reviewers_on_user_id ON merge_request_reviewers USING btree (user_id); CREATE UNIQUE INDEX index_merge_request_user_mentions_on_note_id ON merge_request_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); @@ -9023,30 +22373,34 @@ CREATE INDEX index_merge_requests_on_description_trigram ON merge_requests USING CREATE INDEX index_merge_requests_on_head_pipeline_id ON merge_requests USING btree (head_pipeline_id); -CREATE INDEX index_merge_requests_on_id_and_merge_jid ON merge_requests USING btree (id, merge_jid) WHERE ((merge_jid IS NOT NULL) AND ((state)::text = 'locked'::text)); - CREATE INDEX index_merge_requests_on_latest_merge_request_diff_id ON merge_requests USING btree (latest_merge_request_diff_id); +CREATE INDEX index_merge_requests_on_lock_version ON merge_requests USING btree (lock_version) WHERE (lock_version IS NULL); + CREATE INDEX index_merge_requests_on_merge_user_id ON merge_requests USING btree (merge_user_id) WHERE (merge_user_id IS NOT NULL); CREATE INDEX index_merge_requests_on_milestone_id ON merge_requests USING btree (milestone_id); CREATE INDEX index_merge_requests_on_source_branch ON merge_requests USING btree (source_branch); -CREATE INDEX index_merge_requests_on_source_project_and_branch_state_opened ON merge_requests USING btree (source_project_id, source_branch) WHERE ((state)::text = 'opened'::text); - CREATE INDEX index_merge_requests_on_source_project_id_and_source_branch ON merge_requests USING btree (source_project_id, source_branch); -CREATE INDEX index_merge_requests_on_state_and_merge_status ON merge_requests USING btree (state, merge_status) WHERE (((state)::text = 'opened'::text) AND ((merge_status)::text = 'can_be_merged'::text)); +CREATE INDEX index_merge_requests_on_sprint_id ON merge_requests USING btree (sprint_id); CREATE INDEX index_merge_requests_on_target_branch ON merge_requests USING btree (target_branch); +CREATE INDEX index_merge_requests_on_target_project_id_and_created_at_and_id ON merge_requests USING btree (target_project_id, created_at, id); + CREATE UNIQUE INDEX index_merge_requests_on_target_project_id_and_iid ON merge_requests USING btree (target_project_id, iid); -CREATE INDEX index_merge_requests_on_target_project_id_and_iid_opened ON merge_requests USING btree (target_project_id, iid) WHERE ((state)::text = 'opened'::text); +CREATE INDEX index_merge_requests_on_target_project_id_and_iid_and_state_id ON merge_requests USING btree (target_project_id, iid, state_id); + +CREATE INDEX index_merge_requests_on_target_project_id_and_iid_jira_title ON merge_requests USING btree (target_project_id, iid) WHERE ((title)::text ~ '[A-Z][A-Z_0-9]+-\d+'::text); CREATE INDEX index_merge_requests_on_target_project_id_and_target_branch ON merge_requests USING btree (target_project_id, target_branch) WHERE ((state_id = 1) AND (merge_when_pipeline_succeeds = true)); +CREATE INDEX index_merge_requests_on_target_project_id_iid_jira_description ON merge_requests USING btree (target_project_id, iid) WHERE (description ~ '[A-Z][A-Z_0-9]+-\d+'::text); + CREATE INDEX index_merge_requests_on_title ON merge_requests USING btree (title); CREATE INDEX index_merge_requests_on_title_trigram ON merge_requests USING gin (title gin_trgm_ops); @@ -9055,14 +22409,20 @@ CREATE INDEX index_merge_requests_on_tp_id_and_merge_commit_sha_and_id ON merge_ CREATE INDEX index_merge_requests_on_updated_by_id ON merge_requests USING btree (updated_by_id) WHERE (updated_by_id IS NOT NULL); -CREATE INDEX index_merge_requests_target_project_id_created_at ON merge_requests USING btree (target_project_id, created_at); - CREATE UNIQUE INDEX index_merge_trains_on_merge_request_id ON merge_trains USING btree (merge_request_id); CREATE INDEX index_merge_trains_on_pipeline_id ON merge_trains USING btree (pipeline_id); CREATE INDEX index_merge_trains_on_user_id ON merge_trains USING btree (user_id); +CREATE INDEX index_metrics_dashboard_annotations_on_cluster_id_and_3_columns ON metrics_dashboard_annotations USING btree (cluster_id, dashboard_path, starting_at, ending_at) WHERE (cluster_id IS NOT NULL); + +CREATE INDEX index_metrics_dashboard_annotations_on_environment_id_and_3_col ON metrics_dashboard_annotations USING btree (environment_id, dashboard_path, starting_at, ending_at) WHERE (environment_id IS NOT NULL); + +CREATE INDEX index_metrics_dashboard_annotations_on_timespan_end ON metrics_dashboard_annotations USING btree (COALESCE(ending_at, starting_at)); + +CREATE INDEX index_metrics_users_starred_dashboards_on_project_id ON metrics_users_starred_dashboards USING btree (project_id); + CREATE INDEX index_milestone_releases_on_release_id ON milestone_releases USING btree (release_id); CREATE INDEX index_milestones_on_description_trigram ON milestones USING gin (description gin_trgm_ops); @@ -9077,18 +22437,22 @@ CREATE INDEX index_milestones_on_title ON milestones USING btree (title); CREATE INDEX index_milestones_on_title_trigram ON milestones USING gin (title gin_trgm_ops); -CREATE UNIQUE INDEX index_miletone_releases_on_milestone_and_release ON milestone_releases USING btree (milestone_id, release_id); - CREATE INDEX index_mirror_data_on_next_execution_and_retry_count ON project_mirror_data USING btree (next_execution_timestamp, retry_count); CREATE UNIQUE INDEX index_mr_blocks_on_blocking_and_blocked_mr_ids ON merge_request_blocks USING btree (blocking_merge_request_id, blocked_merge_request_id); +CREATE INDEX index_mr_cleanup_schedules_timestamps ON merge_request_cleanup_schedules USING btree (scheduled_at) WHERE (completed_at IS NULL); + CREATE UNIQUE INDEX index_mr_context_commits_on_merge_request_id_and_sha ON merge_request_context_commits USING btree (merge_request_id, sha); -CREATE UNIQUE INDEX index_mrs_milestones_on_mr_id_and_milestone_id ON merge_request_milestones USING btree (merge_request_id, milestone_id); +CREATE INDEX index_mr_metrics_on_target_project_id_merged_at_nulls_last ON merge_request_metrics USING btree (target_project_id, merged_at DESC NULLS LAST, id DESC); + +CREATE INDEX index_mr_metrics_on_target_project_id_merged_at_time_to_merge ON merge_request_metrics USING btree (target_project_id, merged_at, created_at) WHERE (merged_at > created_at); CREATE UNIQUE INDEX index_namespace_aggregation_schedules_on_namespace_id ON namespace_aggregation_schedules USING btree (namespace_id); +CREATE INDEX index_namespace_onboarding_actions_on_namespace_id ON namespace_onboarding_actions USING btree (namespace_id); + CREATE UNIQUE INDEX index_namespace_root_storage_statistics_on_namespace_id ON namespace_root_storage_statistics USING btree (namespace_id); CREATE UNIQUE INDEX index_namespace_statistics_on_namespace_id ON namespace_statistics USING btree (namespace_id); @@ -9115,7 +22479,7 @@ CREATE INDEX index_namespaces_on_path ON namespaces USING btree (path); CREATE INDEX index_namespaces_on_path_trigram ON namespaces USING gin (path gin_trgm_ops); -CREATE INDEX index_namespaces_on_plan_id ON namespaces USING btree (plan_id); +CREATE UNIQUE INDEX index_namespaces_on_push_rule_id ON namespaces USING btree (push_rule_id); CREATE INDEX index_namespaces_on_require_two_factor_authentication ON namespaces USING btree (require_two_factor_authentication); @@ -9125,13 +22489,13 @@ CREATE UNIQUE INDEX index_namespaces_on_runners_token_encrypted ON namespaces US CREATE INDEX index_namespaces_on_shared_and_extra_runners_minutes_limit ON namespaces USING btree (shared_runners_minutes_limit, extra_shared_runners_minutes_limit); -CREATE INDEX index_namespaces_on_trial_ends_on ON namespaces USING btree (trial_ends_on) WHERE (trial_ends_on IS NOT NULL); +CREATE INDEX index_namespaces_on_type_and_id_partial ON namespaces USING btree (type, id) WHERE (type IS NOT NULL); -CREATE INDEX index_namespaces_on_type_partial ON namespaces USING btree (type) WHERE (type IS NOT NULL); +CREATE INDEX index_non_requested_project_members_on_source_id_and_type ON members USING btree (source_id, source_type) WHERE ((requested_at IS NULL) AND ((type)::text = 'ProjectMember'::text)); CREATE UNIQUE INDEX index_note_diff_files_on_diff_note_id ON note_diff_files USING btree (diff_note_id); -CREATE INDEX index_notes_on_author_id ON notes USING btree (author_id); +CREATE INDEX index_notes_on_author_id_and_created_at_and_id ON notes USING btree (author_id, created_at, id); CREATE INDEX index_notes_on_commit_id ON notes USING btree (commit_id); @@ -9143,7 +22507,7 @@ CREATE INDEX index_notes_on_line_code ON notes USING btree (line_code); CREATE INDEX index_notes_on_note_trigram ON notes USING gin (note gin_trgm_ops); -CREATE INDEX index_notes_on_noteable_id_and_noteable_type ON notes USING btree (noteable_id, noteable_type); +CREATE INDEX index_notes_on_noteable_id_and_noteable_type_and_system ON notes USING btree (noteable_id, noteable_type, system); CREATE INDEX index_notes_on_project_id_and_id_and_system_false ON notes USING btree (project_id, id) WHERE (NOT system); @@ -9157,6 +22521,8 @@ CREATE INDEX index_notification_settings_on_user_id ON notification_settings USI CREATE UNIQUE INDEX index_notifications_on_user_id_and_source_id_and_source_type ON notification_settings USING btree (user_id, source_id, source_type); +CREATE INDEX index_oauth_access_grants_on_resource_owner_id ON oauth_access_grants USING btree (resource_owner_id, application_id, created_at); + CREATE UNIQUE INDEX index_oauth_access_grants_on_token ON oauth_access_grants USING btree (token); CREATE INDEX index_oauth_access_tokens_on_application_id ON oauth_access_tokens USING btree (application_id); @@ -9175,43 +22541,137 @@ CREATE INDEX index_oauth_openid_requests_on_access_grant_id ON oauth_openid_requ CREATE UNIQUE INDEX index_on_deploy_keys_id_and_type_and_public ON keys USING btree (id, type) WHERE (public = true); +CREATE INDEX index_on_id_partial_with_legacy_storage ON projects USING btree (id) WHERE ((storage_version < 2) OR (storage_version IS NULL)); + CREATE INDEX index_on_identities_lower_extern_uid_and_provider ON identities USING btree (lower((extern_uid)::text), provider); +CREATE UNIQUE INDEX index_on_instance_statistics_recorded_at_and_identifier ON analytics_instance_statistics_measurements USING btree (identifier, recorded_at); + +CREATE INDEX index_on_label_links_all_columns ON label_links USING btree (target_id, label_id, target_type); + +CREATE INDEX index_on_namespaces_lower_name ON namespaces USING btree (lower((name)::text)); + +CREATE INDEX index_on_namespaces_lower_path ON namespaces USING btree (lower((path)::text)); + +CREATE INDEX index_on_projects_lower_path ON projects USING btree (lower((path)::text)); + +CREATE INDEX index_on_routes_lower_path ON routes USING btree (lower((path)::text)); + +CREATE UNIQUE INDEX index_on_segment_selections_group_id_segment_id ON analytics_devops_adoption_segment_selections USING btree (group_id, segment_id); + +CREATE UNIQUE INDEX index_on_segment_selections_project_id_segment_id ON analytics_devops_adoption_segment_selections USING btree (project_id, segment_id); + +CREATE INDEX index_on_segment_selections_segment_id ON analytics_devops_adoption_segment_selections USING btree (segment_id); + +CREATE INDEX index_on_snapshots_segment_id_recorded_at ON analytics_devops_adoption_snapshots USING btree (segment_id, recorded_at); + +CREATE INDEX index_on_users_lower_email ON users USING btree (lower((email)::text)); + +CREATE INDEX index_on_users_lower_username ON users USING btree (lower((username)::text)); + CREATE INDEX index_on_users_name_lower ON users USING btree (lower((name)::text)); +CREATE INDEX index_open_project_tracker_data_on_service_id ON open_project_tracker_data USING btree (service_id); + +CREATE INDEX index_operations_feature_flags_issues_on_issue_id ON operations_feature_flags_issues USING btree (issue_id); + +CREATE UNIQUE INDEX index_operations_feature_flags_on_project_id_and_iid ON operations_feature_flags USING btree (project_id, iid); + CREATE UNIQUE INDEX index_operations_feature_flags_on_project_id_and_name ON operations_feature_flags USING btree (project_id, name); -CREATE UNIQUE INDEX index_packages_build_infos_on_package_id ON packages_build_infos USING btree (package_id); +CREATE UNIQUE INDEX index_operations_scopes_on_strategy_id_and_environment_scope ON operations_scopes USING btree (strategy_id, environment_scope); + +CREATE INDEX index_operations_strategies_on_feature_flag_id ON operations_strategies USING btree (feature_flag_id); + +CREATE INDEX index_operations_strategies_user_lists_on_user_list_id ON operations_strategies_user_lists USING btree (user_list_id); + +CREATE UNIQUE INDEX index_operations_user_lists_on_project_id_and_iid ON operations_user_lists USING btree (project_id, iid); + +CREATE UNIQUE INDEX index_operations_user_lists_on_project_id_and_name ON operations_user_lists USING btree (project_id, name); + +CREATE UNIQUE INDEX index_ops_feature_flags_issues_on_feature_flag_id_and_issue_id ON operations_feature_flags_issues USING btree (feature_flag_id, issue_id); + +CREATE UNIQUE INDEX index_ops_strategies_user_lists_on_strategy_id_and_user_list_id ON operations_strategies_user_lists USING btree (strategy_id, user_list_id); CREATE INDEX index_packages_build_infos_on_pipeline_id ON packages_build_infos USING btree (pipeline_id); +CREATE UNIQUE INDEX index_packages_composer_metadata_on_package_id_and_target_sha ON packages_composer_metadata USING btree (package_id, target_sha); + CREATE UNIQUE INDEX index_packages_conan_file_metadata_on_package_file_id ON packages_conan_file_metadata USING btree (package_file_id); -CREATE UNIQUE INDEX index_packages_conan_metadata_on_package_id ON packages_conan_metadata USING btree (package_id); +CREATE UNIQUE INDEX index_packages_conan_metadata_on_package_id_username_channel ON packages_conan_metadata USING btree (package_id, package_username, package_channel); + +CREATE INDEX index_packages_debian_group_component_files_on_component_id ON packages_debian_group_component_files USING btree (component_id); + +CREATE INDEX index_packages_debian_group_distributions_on_creator_id ON packages_debian_group_distributions USING btree (creator_id); + +CREATE INDEX index_packages_debian_group_distributions_on_group_id ON packages_debian_group_distributions USING btree (group_id); + +CREATE INDEX index_packages_debian_project_component_files_on_component_id ON packages_debian_project_component_files USING btree (component_id); + +CREATE INDEX index_packages_debian_project_distributions_on_creator_id ON packages_debian_project_distributions USING btree (creator_id); + +CREATE INDEX index_packages_debian_project_distributions_on_project_id ON packages_debian_project_distributions USING btree (project_id); + +CREATE INDEX index_packages_debian_publications_on_distribution_id ON packages_debian_publications USING btree (distribution_id); + +CREATE UNIQUE INDEX index_packages_debian_publications_on_package_id ON packages_debian_publications USING btree (package_id); CREATE UNIQUE INDEX index_packages_dependencies_on_name_and_version_pattern ON packages_dependencies USING btree (name, version_pattern); CREATE INDEX index_packages_dependency_links_on_dependency_id ON packages_dependency_links USING btree (dependency_id); +CREATE INDEX index_packages_events_on_package_id ON packages_events USING btree (package_id); + CREATE INDEX index_packages_maven_metadata_on_package_id_and_path ON packages_maven_metadata USING btree (package_id, path); +CREATE INDEX index_packages_nuget_dl_metadata_on_dependency_link_id ON packages_nuget_dependency_link_metadata USING btree (dependency_link_id); + +CREATE UNIQUE INDEX index_packages_on_project_id_name_version_unique_when_generic ON packages_packages USING btree (project_id, name, version) WHERE (package_type = 7); + +CREATE INDEX index_packages_package_file_build_infos_on_package_file_id ON packages_package_file_build_infos USING btree (package_file_id); + +CREATE INDEX index_packages_package_file_build_infos_on_pipeline_id ON packages_package_file_build_infos USING btree (pipeline_id); + +CREATE INDEX index_packages_package_files_on_file_store ON packages_package_files USING btree (file_store); + CREATE INDEX index_packages_package_files_on_package_id_and_file_name ON packages_package_files USING btree (package_id, file_name); +CREATE INDEX index_packages_package_files_on_verification_state ON packages_package_files USING btree (verification_state); + +CREATE INDEX index_packages_packages_on_creator_id ON packages_packages USING btree (creator_id); + +CREATE INDEX index_packages_packages_on_id_and_created_at ON packages_packages USING btree (id, created_at); + CREATE INDEX index_packages_packages_on_name_trigram ON packages_packages USING gin (name gin_trgm_ops); -CREATE INDEX index_packages_packages_on_project_id ON packages_packages USING btree (project_id); +CREATE INDEX index_packages_packages_on_project_id_and_created_at ON packages_packages USING btree (project_id, created_at); + +CREATE INDEX index_packages_packages_on_project_id_and_package_type ON packages_packages USING btree (project_id, package_type); + +CREATE INDEX index_packages_packages_on_project_id_and_version ON packages_packages USING btree (project_id, version); + +CREATE INDEX index_packages_project_id_name_partial_for_nuget ON packages_packages USING btree (project_id, name) WHERE (((name)::text <> 'NuGet.Temporary.Package'::text) AND (version IS NOT NULL) AND (package_type = 4)); CREATE INDEX index_packages_tags_on_package_id ON packages_tags USING btree (package_id); +CREATE INDEX index_packages_tags_on_package_id_and_updated_at ON packages_tags USING btree (package_id, updated_at DESC); + +CREATE INDEX index_pages_deployments_on_ci_build_id ON pages_deployments USING btree (ci_build_id); + +CREATE INDEX index_pages_deployments_on_project_id ON pages_deployments USING btree (project_id); + CREATE INDEX index_pages_domain_acme_orders_on_challenge_token ON pages_domain_acme_orders USING btree (challenge_token); CREATE INDEX index_pages_domain_acme_orders_on_pages_domain_id ON pages_domain_acme_orders USING btree (pages_domain_id); -CREATE INDEX index_pages_domains_need_auto_ssl_renewal ON pages_domains USING btree (certificate_source, certificate_valid_not_after) WHERE (auto_ssl_enabled = true); +CREATE INDEX index_pages_domains_need_auto_ssl_renewal_user_provided ON pages_domains USING btree (id) WHERE ((auto_ssl_enabled = true) AND (auto_ssl_failed = false) AND (certificate_source = 0)); -CREATE UNIQUE INDEX index_pages_domains_on_domain ON pages_domains USING btree (domain); +CREATE INDEX index_pages_domains_need_auto_ssl_renewal_valid_not_after ON pages_domains USING btree (certificate_valid_not_after) WHERE ((auto_ssl_enabled = true) AND (auto_ssl_failed = false)); -CREATE INDEX index_pages_domains_on_domain_type ON pages_domains USING btree (domain_type); +CREATE UNIQUE INDEX index_pages_domains_on_domain_and_wildcard ON pages_domains USING btree (domain, wildcard); + +CREATE INDEX index_pages_domains_on_domain_lowercase ON pages_domains USING btree (lower((domain)::text)); CREATE INDEX index_pages_domains_on_project_id ON pages_domains USING btree (project_id); @@ -9219,12 +22679,22 @@ CREATE INDEX index_pages_domains_on_project_id_and_enabled_until ON pages_domain CREATE INDEX index_pages_domains_on_remove_at ON pages_domains USING btree (remove_at); +CREATE INDEX index_pages_domains_on_scope ON pages_domains USING btree (scope); + +CREATE INDEX index_pages_domains_on_usage ON pages_domains USING btree (usage); + CREATE INDEX index_pages_domains_on_verified_at ON pages_domains USING btree (verified_at); CREATE INDEX index_pages_domains_on_verified_at_and_enabled_until ON pages_domains USING btree (verified_at, enabled_until); CREATE INDEX index_pages_domains_on_wildcard ON pages_domains USING btree (wildcard); +CREATE UNIQUE INDEX index_partial_am_alerts_on_project_id_and_fingerprint ON alert_management_alerts USING btree (project_id, fingerprint) WHERE (status <> 2); + +CREATE INDEX index_partial_ci_builds_on_user_id_name_parser_features ON ci_builds USING btree (user_id, name) WHERE (((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('secret_detection'::character varying)::text]))); + +CREATE UNIQUE INDEX index_partitioned_foreign_keys_unique_index ON partitioned_foreign_keys USING btree (to_table, from_table, from_column); + CREATE INDEX index_pat_on_user_id_and_expires_at ON personal_access_tokens USING btree (user_id, expires_at); CREATE INDEX index_path_locks_on_path ON path_locks USING btree (path); @@ -9239,7 +22709,7 @@ CREATE INDEX index_personal_access_tokens_on_user_id ON personal_access_tokens U CREATE UNIQUE INDEX index_plan_limits_on_plan_id ON plan_limits USING btree (plan_id); -CREATE INDEX index_plans_on_name ON plans USING btree (name); +CREATE UNIQUE INDEX index_plans_on_name ON plans USING btree (name); CREATE UNIQUE INDEX index_pool_repositories_on_disk_path ON pool_repositories USING btree (disk_path); @@ -9247,20 +22717,26 @@ CREATE INDEX index_pool_repositories_on_shard_id ON pool_repositories USING btre CREATE UNIQUE INDEX index_pool_repositories_on_source_project_id_and_shard_id ON pool_repositories USING btree (source_project_id, shard_id); +CREATE INDEX index_postgres_reindex_actions_on_index_identifier ON postgres_reindex_actions USING btree (index_identifier); + CREATE UNIQUE INDEX index_programming_languages_on_name ON programming_languages USING btree (name); +CREATE INDEX index_project_access_tokens_on_project_id ON project_access_tokens USING btree (project_id); + CREATE UNIQUE INDEX index_project_aliases_on_name ON project_aliases USING btree (name); CREATE INDEX index_project_aliases_on_project_id ON project_aliases USING btree (project_id); CREATE INDEX index_project_authorizations_on_project_id ON project_authorizations USING btree (project_id); -CREATE UNIQUE INDEX index_project_authorizations_on_user_id_project_id_access_level ON project_authorizations USING btree (user_id, project_id, access_level); - CREATE UNIQUE INDEX index_project_auto_devops_on_project_id ON project_auto_devops USING btree (project_id); CREATE UNIQUE INDEX index_project_ci_cd_settings_on_project_id ON project_ci_cd_settings USING btree (project_id); +CREATE INDEX index_project_compliance_framework_settings_on_framework_id ON project_compliance_framework_settings USING btree (framework_id); + +CREATE INDEX index_project_compliance_framework_settings_on_project_id ON project_compliance_framework_settings USING btree (project_id); + CREATE INDEX index_project_custom_attributes_on_key_and_value ON project_custom_attributes USING btree (key, value); CREATE UNIQUE INDEX index_project_custom_attributes_on_project_id_and_key ON project_custom_attributes USING btree (project_id, key); @@ -9271,18 +22747,28 @@ CREATE INDEX index_project_deploy_tokens_on_deploy_token_id ON project_deploy_to CREATE UNIQUE INDEX index_project_deploy_tokens_on_project_id_and_deploy_token_id ON project_deploy_tokens USING btree (project_id, deploy_token_id); +CREATE UNIQUE INDEX index_project_export_jobs_on_jid ON project_export_jobs USING btree (jid); + +CREATE INDEX index_project_export_jobs_on_project_id_and_jid ON project_export_jobs USING btree (project_id, jid); + +CREATE INDEX index_project_export_jobs_on_project_id_and_status ON project_export_jobs USING btree (project_id, status); + +CREATE INDEX index_project_export_jobs_on_status ON project_export_jobs USING btree (status); + CREATE INDEX index_project_feature_usages_on_project_id ON project_feature_usages USING btree (project_id); CREATE UNIQUE INDEX index_project_features_on_project_id ON project_features USING btree (project_id); +CREATE INDEX index_project_features_on_project_id_bal_20 ON project_features USING btree (project_id) WHERE (builds_access_level = 20); + +CREATE INDEX index_project_features_on_project_id_ral_20 ON project_features USING btree (project_id) WHERE (repository_access_level = 20); + CREATE INDEX index_project_group_links_on_group_id ON project_group_links USING btree (group_id); CREATE INDEX index_project_group_links_on_project_id ON project_group_links USING btree (project_id); CREATE INDEX index_project_import_data_on_project_id ON project_import_data USING btree (project_id); -CREATE INDEX index_project_mirror_data_on_jid ON project_mirror_data USING btree (jid); - CREATE INDEX index_project_mirror_data_on_last_successful_update_at ON project_mirror_data USING btree (last_successful_update_at); CREATE INDEX index_project_mirror_data_on_last_update_at_and_retry_count ON project_mirror_data USING btree (last_update_at, retry_count); @@ -9291,7 +22777,9 @@ CREATE UNIQUE INDEX index_project_mirror_data_on_project_id ON project_mirror_da CREATE INDEX index_project_mirror_data_on_status ON project_mirror_data USING btree (status); -CREATE UNIQUE INDEX index_project_pages_metadata_on_project_id ON project_pages_metadata USING btree (project_id); +CREATE INDEX index_project_pages_metadata_on_artifacts_archive_id ON project_pages_metadata USING btree (artifacts_archive_id); + +CREATE INDEX index_project_pages_metadata_on_pages_deployment_id ON project_pages_metadata USING btree (pages_deployment_id); CREATE INDEX index_project_pages_metadata_on_project_id_and_deployed_is_true ON project_pages_metadata USING btree (project_id) WHERE (deployed = true); @@ -9301,23 +22789,75 @@ CREATE UNIQUE INDEX index_project_repositories_on_project_id ON project_reposito CREATE INDEX index_project_repositories_on_shard_id ON project_repositories USING btree (shard_id); +CREATE INDEX index_project_repositories_on_shard_id_and_project_id ON project_repositories USING btree (shard_id, project_id); + CREATE UNIQUE INDEX index_project_repository_states_on_project_id ON project_repository_states USING btree (project_id); +CREATE INDEX index_project_repository_storage_moves_on_project_id ON project_repository_storage_moves USING btree (project_id); + +CREATE INDEX index_project_settings_on_project_id_partially ON project_settings USING btree (project_id) WHERE (has_vulnerabilities IS TRUE); + +CREATE UNIQUE INDEX index_project_settings_on_push_rule_id ON project_settings USING btree (push_rule_id); + CREATE INDEX index_project_statistics_on_namespace_id ON project_statistics USING btree (namespace_id); +CREATE INDEX index_project_statistics_on_packages_size_and_project_id ON project_statistics USING btree (packages_size, project_id); + CREATE UNIQUE INDEX index_project_statistics_on_project_id ON project_statistics USING btree (project_id); +CREATE INDEX index_project_statistics_on_repository_size_and_project_id ON project_statistics USING btree (repository_size, project_id); + +CREATE INDEX index_project_statistics_on_storage_size_and_project_id ON project_statistics USING btree (storage_size, project_id); + +CREATE INDEX index_project_statistics_on_wiki_size_and_project_id ON project_statistics USING btree (wiki_size, project_id); + CREATE UNIQUE INDEX index_project_tracing_settings_on_project_id ON project_tracing_settings USING btree (project_id); +CREATE INDEX index_projects_aimed_for_deletion ON projects USING btree (marked_for_deletion_at) WHERE ((marked_for_deletion_at IS NOT NULL) AND (pending_delete = false)); + +CREATE INDEX index_projects_api_created_at_id_desc ON projects USING btree (created_at, id DESC); + +CREATE INDEX index_projects_api_created_at_id_for_archived ON projects USING btree (created_at, id) WHERE ((archived = true) AND (pending_delete = false)); + +CREATE INDEX index_projects_api_created_at_id_for_archived_vis20 ON projects USING btree (created_at, id) WHERE ((archived = true) AND (visibility_level = 20) AND (pending_delete = false)); + +CREATE INDEX index_projects_api_created_at_id_for_vis10 ON projects USING btree (created_at, id) WHERE ((visibility_level = 10) AND (pending_delete = false)); + +CREATE INDEX index_projects_api_last_activity_at_id_desc ON projects USING btree (last_activity_at, id DESC); + +CREATE INDEX index_projects_api_name_id_desc ON projects USING btree (name, id DESC); + +CREATE INDEX index_projects_api_path_id_desc ON projects USING btree (path, id DESC); + +CREATE INDEX index_projects_api_updated_at_id_desc ON projects USING btree (updated_at, id DESC); + +CREATE INDEX index_projects_api_vis20_created_at ON projects USING btree (created_at, id) WHERE (visibility_level = 20); + +CREATE INDEX index_projects_api_vis20_last_activity_at ON projects USING btree (last_activity_at, id) WHERE (visibility_level = 20); + +CREATE INDEX index_projects_api_vis20_name ON projects USING btree (name, id) WHERE (visibility_level = 20); + +CREATE INDEX index_projects_api_vis20_path ON projects USING btree (path, id) WHERE (visibility_level = 20); + +CREATE INDEX index_projects_api_vis20_updated_at ON projects USING btree (updated_at, id) WHERE (visibility_level = 20); + CREATE INDEX index_projects_on_created_at_and_id ON projects USING btree (created_at, id); -CREATE INDEX index_projects_on_creator_id ON projects USING btree (creator_id); +CREATE INDEX index_projects_on_creator_id_and_created_at_and_id ON projects USING btree (creator_id, created_at, id); + +CREATE INDEX index_projects_on_creator_id_and_id ON projects USING btree (creator_id, id); + +CREATE INDEX index_projects_on_creator_id_import_type_and_created_at_partial ON projects USING btree (creator_id, import_type, created_at) WHERE (import_type IS NOT NULL); CREATE INDEX index_projects_on_description_trigram ON projects USING gin (description gin_trgm_ops); +CREATE INDEX index_projects_on_id_and_archived_and_pending_delete ON projects USING btree (id) WHERE ((archived = false) AND (pending_delete = false)); + CREATE UNIQUE INDEX index_projects_on_id_partial_for_visibility ON projects USING btree (id) WHERE (visibility_level = ANY (ARRAY[10, 20])); -CREATE INDEX index_projects_on_last_activity_at ON projects USING btree (last_activity_at); +CREATE INDEX index_projects_on_id_service_desk_enabled ON projects USING btree (id) WHERE (service_desk_enabled = true); + +CREATE INDEX index_projects_on_last_activity_at_and_id ON projects USING btree (last_activity_at, id); CREATE INDEX index_projects_on_last_repository_check_at ON projects USING btree (last_repository_check_at) WHERE (last_repository_check_at IS NOT NULL); @@ -9327,21 +22867,23 @@ CREATE INDEX index_projects_on_last_repository_updated_at ON projects USING btre CREATE INDEX index_projects_on_lower_name ON projects USING btree (lower((name)::text)); -CREATE INDEX index_projects_on_marked_for_deletion_at ON projects USING btree (marked_for_deletion_at) WHERE (marked_for_deletion_at IS NOT NULL); - CREATE INDEX index_projects_on_marked_for_deletion_by_user_id ON projects USING btree (marked_for_deletion_by_user_id) WHERE (marked_for_deletion_by_user_id IS NOT NULL); -CREATE INDEX index_projects_on_mirror_and_mirror_trigger_builds_both_true ON projects USING btree (id) WHERE ((mirror IS TRUE) AND (mirror_trigger_builds IS TRUE)); +CREATE INDEX index_projects_on_mirror_creator_id_created_at ON projects USING btree (creator_id, created_at) WHERE ((mirror = true) AND (mirror_trigger_builds = true)); + +CREATE INDEX index_projects_on_mirror_id_where_mirror_and_trigger_builds ON projects USING btree (id) WHERE ((mirror = true) AND (mirror_trigger_builds = true)); CREATE INDEX index_projects_on_mirror_last_successful_update_at ON projects USING btree (mirror_last_successful_update_at); CREATE INDEX index_projects_on_mirror_user_id ON projects USING btree (mirror_user_id); +CREATE INDEX index_projects_on_name_and_id ON projects USING btree (name, id); + CREATE INDEX index_projects_on_name_trigram ON projects USING gin (name gin_trgm_ops); -CREATE INDEX index_projects_on_namespace_id ON projects USING btree (namespace_id); +CREATE INDEX index_projects_on_namespace_id_and_id ON projects USING btree (namespace_id, id); -CREATE INDEX index_projects_on_path ON projects USING btree (path); +CREATE INDEX index_projects_on_path_and_id ON projects USING btree (path, id); CREATE INDEX index_projects_on_path_trigram ON projects USING gin (path gin_trgm_ops); @@ -9357,7 +22899,7 @@ CREATE INDEX index_projects_on_runners_token_encrypted ON projects USING btree ( CREATE INDEX index_projects_on_star_count ON projects USING btree (star_count); -CREATE INDEX index_projects_on_visibility_level_and_created_at_and_id ON projects USING btree (visibility_level, created_at, id); +CREATE INDEX index_projects_on_updated_at_and_id ON projects USING btree (updated_at, id); CREATE UNIQUE INDEX index_prometheus_alert_event_scoped_payload_key ON prometheus_alert_events USING btree (prometheus_alert_id, payload_key); @@ -9373,7 +22915,9 @@ CREATE INDEX index_prometheus_metrics_on_common ON prometheus_metrics USING btre CREATE INDEX index_prometheus_metrics_on_group ON prometheus_metrics USING btree ("group"); -CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier ON prometheus_metrics USING btree (identifier); +CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier_and_null_project ON prometheus_metrics USING btree (identifier) WHERE (project_id IS NULL); + +CREATE UNIQUE INDEX index_prometheus_metrics_on_identifier_and_project_id ON prometheus_metrics USING btree (identifier, project_id); CREATE INDEX index_prometheus_metrics_on_project_id ON prometheus_metrics USING btree (project_id); @@ -9417,12 +22961,12 @@ CREATE INDEX index_protected_tags_on_project_id ON protected_tags USING btree (p CREATE UNIQUE INDEX index_protected_tags_on_project_id_and_name ON protected_tags USING btree (project_id, name); -CREATE UNIQUE INDEX index_push_event_payloads_on_event_id ON push_event_payloads USING btree (event_id); - CREATE INDEX index_push_rules_on_is_sample ON push_rules USING btree (is_sample) WHERE is_sample; CREATE INDEX index_push_rules_on_project_id ON push_rules USING btree (project_id); +CREATE UNIQUE INDEX index_raw_usage_data_on_recorded_at ON raw_usage_data USING btree (recorded_at); + CREATE UNIQUE INDEX index_redirect_routes_on_path ON redirect_routes USING btree (path); CREATE UNIQUE INDEX index_redirect_routes_on_path_unique_text_pattern_ops ON redirect_routes USING btree (lower((path)::text) varchar_pattern_ops); @@ -9437,22 +22981,78 @@ CREATE INDEX index_releases_on_author_id ON releases USING btree (author_id); CREATE INDEX index_releases_on_project_id_and_tag ON releases USING btree (project_id, tag); +CREATE INDEX index_releases_on_released_at ON releases USING btree (released_at); + CREATE INDEX index_remote_mirrors_on_last_successful_update_at ON remote_mirrors USING btree (last_successful_update_at); CREATE INDEX index_remote_mirrors_on_project_id ON remote_mirrors USING btree (project_id); -CREATE UNIQUE INDEX index_repository_languages_on_project_and_languages_id ON repository_languages USING btree (project_id, programming_language_id); +CREATE INDEX index_required_code_owners_sections_on_protected_branch_id ON required_code_owners_sections USING btree (protected_branch_id); -CREATE INDEX index_resource_label_events_on_epic_id ON resource_label_events USING btree (epic_id); +CREATE INDEX index_requirements_management_test_reports_on_author_id ON requirements_management_test_reports USING btree (author_id); + +CREATE INDEX index_requirements_management_test_reports_on_build_id ON requirements_management_test_reports USING btree (build_id); + +CREATE INDEX index_requirements_management_test_reports_on_requirement_id ON requirements_management_test_reports USING btree (requirement_id); + +CREATE INDEX index_requirements_on_author_id ON requirements USING btree (author_id); + +CREATE INDEX index_requirements_on_created_at ON requirements USING btree (created_at); -CREATE INDEX index_resource_label_events_on_issue_id ON resource_label_events USING btree (issue_id); +CREATE INDEX index_requirements_on_project_id ON requirements USING btree (project_id); + +CREATE UNIQUE INDEX index_requirements_on_project_id_and_iid ON requirements USING btree (project_id, iid) WHERE (project_id IS NOT NULL); + +CREATE INDEX index_requirements_on_state ON requirements USING btree (state); + +CREATE INDEX index_requirements_on_title_trigram ON requirements USING gin (title gin_trgm_ops); + +CREATE INDEX index_requirements_on_updated_at ON requirements USING btree (updated_at); + +CREATE INDEX index_resource_iteration_events_on_issue_id ON resource_iteration_events USING btree (issue_id); + +CREATE INDEX index_resource_iteration_events_on_iteration_id ON resource_iteration_events USING btree (iteration_id); + +CREATE INDEX index_resource_iteration_events_on_iteration_id_and_add_action ON resource_iteration_events USING btree (iteration_id) WHERE (action = 1); + +CREATE INDEX index_resource_iteration_events_on_merge_request_id ON resource_iteration_events USING btree (merge_request_id); + +CREATE INDEX index_resource_iteration_events_on_user_id ON resource_iteration_events USING btree (user_id); + +CREATE INDEX index_resource_label_events_issue_id_label_id_action ON resource_label_events USING btree (issue_id, label_id, action); + +CREATE INDEX index_resource_label_events_on_epic_id ON resource_label_events USING btree (epic_id); CREATE INDEX index_resource_label_events_on_label_id_and_action ON resource_label_events USING btree (label_id, action); -CREATE INDEX index_resource_label_events_on_merge_request_id ON resource_label_events USING btree (merge_request_id); +CREATE INDEX index_resource_label_events_on_merge_request_id_label_id_action ON resource_label_events USING btree (merge_request_id, label_id, action); CREATE INDEX index_resource_label_events_on_user_id ON resource_label_events USING btree (user_id); +CREATE INDEX index_resource_milestone_events_created_at ON resource_milestone_events USING btree (created_at); + +CREATE INDEX index_resource_milestone_events_on_issue_id ON resource_milestone_events USING btree (issue_id); + +CREATE INDEX index_resource_milestone_events_on_merge_request_id ON resource_milestone_events USING btree (merge_request_id); + +CREATE INDEX index_resource_milestone_events_on_milestone_id ON resource_milestone_events USING btree (milestone_id); + +CREATE INDEX index_resource_milestone_events_on_milestone_id_and_add_action ON resource_milestone_events USING btree (milestone_id) WHERE (action = 1); + +CREATE INDEX index_resource_milestone_events_on_user_id ON resource_milestone_events USING btree (user_id); + +CREATE INDEX index_resource_state_events_on_epic_id ON resource_state_events USING btree (epic_id); + +CREATE INDEX index_resource_state_events_on_issue_id_and_created_at ON resource_state_events USING btree (issue_id, created_at); + +CREATE INDEX index_resource_state_events_on_merge_request_id ON resource_state_events USING btree (merge_request_id); + +CREATE INDEX index_resource_state_events_on_source_merge_request_id ON resource_state_events USING btree (source_merge_request_id); + +CREATE INDEX index_resource_state_events_on_user_id ON resource_state_events USING btree (user_id); + +CREATE INDEX index_resource_weight_events_on_issue_id_and_created_at ON resource_weight_events USING btree (issue_id, created_at); + CREATE INDEX index_resource_weight_events_on_issue_id_and_weight ON resource_weight_events USING btree (issue_id, weight); CREATE INDEX index_resource_weight_events_on_user_id ON resource_weight_events USING btree (user_id); @@ -9463,32 +23063,80 @@ CREATE INDEX index_reviews_on_merge_request_id ON reviews USING btree (merge_req CREATE INDEX index_reviews_on_project_id ON reviews USING btree (project_id); +CREATE INDEX index_route_on_name_trigram ON routes USING gin (name gin_trgm_ops); + CREATE UNIQUE INDEX index_routes_on_path ON routes USING btree (path); CREATE INDEX index_routes_on_path_text_pattern_ops ON routes USING btree (path varchar_pattern_ops); +CREATE INDEX index_routes_on_path_trigram ON routes USING gin (path gin_trgm_ops); + CREATE UNIQUE INDEX index_routes_on_source_type_and_source_id ON routes USING btree (source_type, source_id); +CREATE UNIQUE INDEX index_saml_group_links_on_group_id_and_saml_group_name ON saml_group_links USING btree (group_id, saml_group_name); + CREATE INDEX index_saml_providers_on_group_id ON saml_providers USING btree (group_id); +CREATE INDEX index_scim_identities_on_group_id ON scim_identities USING btree (group_id); + +CREATE UNIQUE INDEX index_scim_identities_on_lower_extern_uid_and_group_id ON scim_identities USING btree (lower((extern_uid)::text), group_id); + +CREATE UNIQUE INDEX index_scim_identities_on_user_id_and_group_id ON scim_identities USING btree (user_id, group_id); + CREATE UNIQUE INDEX index_scim_oauth_access_tokens_on_group_id_and_token_encrypted ON scim_oauth_access_tokens USING btree (group_id, token_encrypted); +CREATE INDEX index_secure_ci_builds_on_user_id_name_created_at ON ci_builds USING btree (user_id, name, created_at) WHERE (((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('apifuzzer_fuzz'::character varying)::text, ('apifuzzer_fuzz_dnd'::character varying)::text, ('secret_detection'::character varying)::text]))); + +CREATE INDEX index_security_ci_builds_on_name_and_id_parser_features ON ci_builds USING btree (name, id) WHERE (((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('license_scanning'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text)); + +CREATE INDEX index_security_findings_on_confidence ON security_findings USING btree (confidence); + +CREATE INDEX index_security_findings_on_project_fingerprint ON security_findings USING btree (project_fingerprint); + +CREATE INDEX index_security_findings_on_scan_id_and_deduplicated ON security_findings USING btree (scan_id, deduplicated); + +CREATE UNIQUE INDEX index_security_findings_on_scan_id_and_position ON security_findings USING btree (scan_id, "position"); + +CREATE INDEX index_security_findings_on_scanner_id ON security_findings USING btree (scanner_id); + +CREATE INDEX index_security_findings_on_severity ON security_findings USING btree (severity); + +CREATE UNIQUE INDEX index_security_findings_on_uuid ON security_findings USING btree (uuid); + +CREATE INDEX index_security_scans_on_date_created_at_and_id ON security_scans USING btree (date(timezone('UTC'::text, created_at)), id); + CREATE INDEX index_self_managed_prometheus_alert_events_on_environment_id ON self_managed_prometheus_alert_events USING btree (environment_id); +CREATE INDEX index_sent_notifications_on_noteable_type_noteable_id ON sent_notifications USING btree (noteable_id) WHERE ((noteable_type)::text = 'Issue'::text); + CREATE UNIQUE INDEX index_sent_notifications_on_reply_key ON sent_notifications USING btree (reply_key); CREATE UNIQUE INDEX index_sentry_issues_on_issue_id ON sentry_issues USING btree (issue_id); +CREATE INDEX index_sentry_issues_on_sentry_issue_identifier ON sentry_issues USING btree (sentry_issue_identifier); + CREATE INDEX index_serverless_domain_cluster_on_creator_id ON serverless_domain_cluster USING btree (creator_id); CREATE INDEX index_serverless_domain_cluster_on_pages_domain_id ON serverless_domain_cluster USING btree (pages_domain_id); -CREATE INDEX index_services_on_project_id ON services USING btree (project_id); +CREATE INDEX index_service_desk_enabled_projects_on_id_creator_id_created_at ON projects USING btree (id, creator_id, created_at) WHERE (service_desk_enabled = true); + +CREATE INDEX index_services_on_inherit_from_id ON services USING btree (inherit_from_id); + +CREATE INDEX index_services_on_project_id_and_type ON services USING btree (project_id, type); CREATE INDEX index_services_on_template ON services USING btree (template); CREATE INDEX index_services_on_type ON services USING btree (type); +CREATE UNIQUE INDEX index_services_on_type_and_instance_partial ON services USING btree (type, instance) WHERE (instance = true); + +CREATE UNIQUE INDEX index_services_on_type_and_template_partial ON services USING btree (type, template) WHERE (template = true); + +CREATE INDEX index_services_on_type_id_when_active_and_project_id_not_null ON services USING btree (type, id) WHERE ((active = true) AND (project_id IS NOT NULL)); + +CREATE UNIQUE INDEX index_services_on_unique_group_id_and_type ON services USING btree (group_id, type); + CREATE UNIQUE INDEX index_shards_on_name ON shards USING btree (name); CREATE INDEX index_slack_integrations_on_service_id ON slack_integrations USING btree (service_id); @@ -9499,6 +23147,14 @@ CREATE UNIQUE INDEX index_smartcard_identities_on_subject_and_issuer ON smartcar CREATE INDEX index_smartcard_identities_on_user_id ON smartcard_identities USING btree (user_id); +CREATE INDEX index_snippet_on_id_and_project_id ON snippets USING btree (id, project_id); + +CREATE UNIQUE INDEX index_snippet_repositories_on_disk_path ON snippet_repositories USING btree (disk_path); + +CREATE INDEX index_snippet_repositories_on_shard_id ON snippet_repositories USING btree (shard_id); + +CREATE INDEX index_snippet_repository_storage_moves_on_snippet_id ON snippet_repository_storage_moves USING btree (snippet_id); + CREATE UNIQUE INDEX index_snippet_user_mentions_on_note_id ON snippet_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); CREATE INDEX index_snippets_on_author_id ON snippets USING btree (author_id); @@ -9507,8 +23163,14 @@ CREATE INDEX index_snippets_on_content_trigram ON snippets USING gin (content gi CREATE INDEX index_snippets_on_created_at ON snippets USING btree (created_at); +CREATE INDEX index_snippets_on_description_trigram ON snippets USING gin (description gin_trgm_ops); + CREATE INDEX index_snippets_on_file_name_trigram ON snippets USING gin (file_name gin_trgm_ops); +CREATE INDEX index_snippets_on_id_and_created_at ON snippets USING btree (id, created_at); + +CREATE INDEX index_snippets_on_id_and_type ON snippets USING btree (id, type); + CREATE INDEX index_snippets_on_project_id_and_visibility_level ON snippets USING btree (project_id, visibility_level); CREATE INDEX index_snippets_on_title_trigram ON snippets USING gin (title gin_trgm_ops); @@ -9525,10 +23187,32 @@ CREATE INDEX index_software_licenses_on_spdx_identifier ON software_licenses USI CREATE UNIQUE INDEX index_software_licenses_on_unique_name ON software_licenses USING btree (name); +CREATE INDEX index_sprints_on_description_trigram ON sprints USING gin (description gin_trgm_ops); + +CREATE INDEX index_sprints_on_due_date ON sprints USING btree (due_date); + +CREATE INDEX index_sprints_on_group_id ON sprints USING btree (group_id); + +CREATE UNIQUE INDEX index_sprints_on_group_id_and_title ON sprints USING btree (group_id, title) WHERE (group_id IS NOT NULL); + +CREATE UNIQUE INDEX index_sprints_on_project_id_and_iid ON sprints USING btree (project_id, iid); + +CREATE UNIQUE INDEX index_sprints_on_project_id_and_title ON sprints USING btree (project_id, title) WHERE (project_id IS NOT NULL); + +CREATE INDEX index_sprints_on_title ON sprints USING btree (title); + +CREATE INDEX index_sprints_on_title_trigram ON sprints USING gin (title gin_trgm_ops); + +CREATE UNIQUE INDEX index_status_page_published_incidents_on_issue_id ON status_page_published_incidents USING btree (issue_id); + +CREATE INDEX index_status_page_settings_on_project_id ON status_page_settings USING btree (project_id); + CREATE INDEX index_subscriptions_on_project_id ON subscriptions USING btree (project_id); CREATE UNIQUE INDEX index_subscriptions_on_subscribable_and_user_id_and_project_id ON subscriptions USING btree (subscribable_id, subscribable_type, user_id, project_id); +CREATE INDEX index_successful_deployments_on_cluster_id_and_environment_id ON deployments USING btree (cluster_id, environment_id) WHERE (status = 2); + CREATE INDEX index_suggestions_on_note_id ON suggestions USING btree (note_id); CREATE UNIQUE INDEX index_suggestions_on_note_id_and_relative_order ON suggestions USING btree (note_id, relative_order); @@ -9551,16 +23235,36 @@ CREATE INDEX index_term_agreements_on_term_id ON term_agreements USING btree (te CREATE INDEX index_term_agreements_on_user_id ON term_agreements USING btree (user_id); +CREATE INDEX index_terraform_state_versions_on_ci_build_id ON terraform_state_versions USING btree (ci_build_id); + +CREATE INDEX index_terraform_state_versions_on_created_by_user_id ON terraform_state_versions USING btree (created_by_user_id); + +CREATE UNIQUE INDEX index_terraform_state_versions_on_state_id_and_version ON terraform_state_versions USING btree (terraform_state_id, version); + +CREATE INDEX index_terraform_states_on_file_store ON terraform_states USING btree (file_store); + +CREATE INDEX index_terraform_states_on_locked_by_user_id ON terraform_states USING btree (locked_by_user_id); + +CREATE UNIQUE INDEX index_terraform_states_on_project_id_and_name ON terraform_states USING btree (project_id, name); + +CREATE UNIQUE INDEX index_terraform_states_on_uuid ON terraform_states USING btree (uuid); + +CREATE UNIQUE INDEX index_test_case_failures_unique_columns ON ci_test_case_failures USING btree (test_case_id, failed_at DESC, build_id); + CREATE INDEX index_timelogs_on_issue_id ON timelogs USING btree (issue_id); CREATE INDEX index_timelogs_on_merge_request_id ON timelogs USING btree (merge_request_id); +CREATE INDEX index_timelogs_on_note_id ON timelogs USING btree (note_id); + CREATE INDEX index_timelogs_on_spent_at ON timelogs USING btree (spent_at) WHERE (spent_at IS NOT NULL); CREATE INDEX index_timelogs_on_user_id ON timelogs USING btree (user_id); CREATE INDEX index_todos_on_author_id ON todos USING btree (author_id); +CREATE INDEX index_todos_on_author_id_and_created_at ON todos USING btree (author_id, created_at); + CREATE INDEX index_todos_on_commit_id ON todos USING btree (commit_id); CREATE INDEX index_todos_on_group_id ON todos USING btree (group_id); @@ -9577,6 +23281,10 @@ CREATE INDEX index_todos_on_user_id_and_id_done ON todos USING btree (user_id, i CREATE INDEX index_todos_on_user_id_and_id_pending ON todos USING btree (user_id, id) WHERE ((state)::text = 'pending'::text); +CREATE UNIQUE INDEX index_token_with_ivs_on_hashed_plaintext_token ON token_with_ivs USING btree (hashed_plaintext_token); + +CREATE UNIQUE INDEX index_token_with_ivs_on_hashed_token ON token_with_ivs USING btree (hashed_token); + CREATE UNIQUE INDEX index_trending_projects_on_project_id ON trending_projects USING btree (project_id); CREATE INDEX index_u2f_registrations_on_key_handle ON u2f_registrations USING btree (key_handle); @@ -9597,14 +23305,28 @@ CREATE INDEX index_user_callouts_on_user_id ON user_callouts USING btree (user_i CREATE UNIQUE INDEX index_user_callouts_on_user_id_and_feature_name ON user_callouts USING btree (user_id, feature_name); +CREATE INDEX index_user_canonical_emails_on_canonical_email ON user_canonical_emails USING btree (canonical_email); + +CREATE UNIQUE INDEX index_user_canonical_emails_on_user_id ON user_canonical_emails USING btree (user_id); + +CREATE UNIQUE INDEX index_user_canonical_emails_on_user_id_and_canonical_email ON user_canonical_emails USING btree (user_id, canonical_email); + CREATE INDEX index_user_custom_attributes_on_key_and_value ON user_custom_attributes USING btree (key, value); CREATE UNIQUE INDEX index_user_custom_attributes_on_user_id_and_key ON user_custom_attributes USING btree (user_id, key); -CREATE UNIQUE INDEX index_user_interacted_projects_on_project_id_and_user_id ON user_interacted_projects USING btree (project_id, user_id); +CREATE INDEX index_user_details_on_provisioned_by_group_id ON user_details USING btree (provisioned_by_group_id); + +CREATE UNIQUE INDEX index_user_details_on_user_id ON user_details USING btree (user_id); + +CREATE INDEX index_user_highest_roles_on_user_id_and_highest_access_level ON user_highest_roles USING btree (user_id, highest_access_level); CREATE INDEX index_user_interacted_projects_on_user_id ON user_interacted_projects USING btree (user_id); +CREATE INDEX index_user_permission_export_uploads_on_user_id_and_status ON user_permission_export_uploads USING btree (user_id, status); + +CREATE INDEX index_user_preferences_on_gitpod_enabled ON user_preferences USING btree (gitpod_enabled); + CREATE UNIQUE INDEX index_user_preferences_on_user_id ON user_preferences USING btree (user_id); CREATE INDEX index_user_statuses_on_user_id ON user_statuses USING btree (user_id); @@ -9615,8 +23337,6 @@ CREATE INDEX index_users_on_accepted_term_id ON users USING btree (accepted_term CREATE INDEX index_users_on_admin ON users USING btree (admin); -CREATE INDEX index_users_on_bot_type ON users USING btree (bot_type); - CREATE UNIQUE INDEX index_users_on_confirmation_token ON users USING btree (confirmation_token); CREATE INDEX index_users_on_created_at ON users USING btree (created_at); @@ -9627,8 +23347,6 @@ CREATE INDEX index_users_on_email_trigram ON users USING gin (email gin_trgm_ops CREATE INDEX index_users_on_feed_token ON users USING btree (feed_token); -CREATE INDEX index_users_on_ghost ON users USING btree (ghost); - CREATE INDEX index_users_on_group_view ON users USING btree (group_view); CREATE INDEX index_users_on_incoming_email_token ON users USING btree (incoming_email_token); @@ -9641,18 +23359,22 @@ CREATE INDEX index_users_on_name_trigram ON users USING gin (name gin_trgm_ops); CREATE INDEX index_users_on_public_email ON users USING btree (public_email) WHERE ((public_email)::text <> ''::text); +CREATE INDEX index_users_on_require_two_factor_authentication_from_group ON users USING btree (require_two_factor_authentication_from_group) WHERE (require_two_factor_authentication_from_group = true); + CREATE UNIQUE INDEX index_users_on_reset_password_token ON users USING btree (reset_password_token); CREATE INDEX index_users_on_state ON users USING btree (state); -CREATE INDEX index_users_on_state_and_internal ON users USING btree (state) WHERE (ghost IS NOT TRUE); - -CREATE INDEX index_users_on_state_and_internal_ee ON users USING btree (state) WHERE ((ghost IS NOT TRUE) AND (bot_type IS NULL)); +CREATE INDEX index_users_on_state_and_user_type ON users USING btree (state, user_type); CREATE UNIQUE INDEX index_users_on_static_object_token ON users USING btree (static_object_token); CREATE INDEX index_users_on_unconfirmed_email ON users USING btree (unconfirmed_email) WHERE (unconfirmed_email IS NOT NULL); +CREATE UNIQUE INDEX index_users_on_unlock_token ON users USING btree (unlock_token); + +CREATE INDEX index_users_on_user_type ON users USING btree (user_type); + CREATE INDEX index_users_on_username ON users USING btree (username); CREATE INDEX index_users_on_username_trigram ON users USING gin (username gin_trgm_ops); @@ -9667,9 +23389,13 @@ CREATE INDEX index_users_star_projects_on_project_id ON users_star_projects USIN CREATE UNIQUE INDEX index_users_star_projects_on_user_id_and_project_id ON users_star_projects USING btree (user_id, project_id); +CREATE UNIQUE INDEX index_vuln_historical_statistics_on_project_id_and_date ON vulnerability_historical_statistics USING btree (project_id, date); + CREATE INDEX index_vulnerabilities_on_author_id ON vulnerabilities USING btree (author_id); -CREATE INDEX index_vulnerabilities_on_closed_by_id ON vulnerabilities USING btree (closed_by_id); +CREATE INDEX index_vulnerabilities_on_confirmed_by_id ON vulnerabilities USING btree (confirmed_by_id); + +CREATE INDEX index_vulnerabilities_on_dismissed_by_id ON vulnerabilities USING btree (dismissed_by_id); CREATE INDEX index_vulnerabilities_on_due_date_sourcing_milestone_id ON vulnerabilities USING btree (due_date_sourcing_milestone_id); @@ -9679,24 +23405,50 @@ CREATE INDEX index_vulnerabilities_on_last_edited_by_id ON vulnerabilities USING CREATE INDEX index_vulnerabilities_on_milestone_id ON vulnerabilities USING btree (milestone_id); -CREATE INDEX index_vulnerabilities_on_project_id ON vulnerabilities USING btree (project_id); +CREATE INDEX index_vulnerabilities_on_project_id_and_state_and_severity ON vulnerabilities USING btree (project_id, state, severity); CREATE INDEX index_vulnerabilities_on_resolved_by_id ON vulnerabilities USING btree (resolved_by_id); CREATE INDEX index_vulnerabilities_on_start_date_sourcing_milestone_id ON vulnerabilities USING btree (start_date_sourcing_milestone_id); +CREATE INDEX index_vulnerabilities_on_state_case_id ON vulnerabilities USING btree (array_position(ARRAY[(1)::smallint, (4)::smallint, (3)::smallint, (2)::smallint], state), id DESC); + +CREATE INDEX index_vulnerabilities_on_state_case_id_desc ON vulnerabilities USING btree (array_position(ARRAY[(1)::smallint, (4)::smallint, (3)::smallint, (2)::smallint], state) DESC, id DESC); + CREATE INDEX index_vulnerabilities_on_updated_by_id ON vulnerabilities USING btree (updated_by_id); +CREATE INDEX index_vulnerability_exports_on_author_id ON vulnerability_exports USING btree (author_id); + +CREATE INDEX index_vulnerability_exports_on_file_store ON vulnerability_exports USING btree (file_store); + +CREATE INDEX index_vulnerability_exports_on_group_id_not_null ON vulnerability_exports USING btree (group_id) WHERE (group_id IS NOT NULL); + +CREATE INDEX index_vulnerability_exports_on_project_id_not_null ON vulnerability_exports USING btree (project_id) WHERE (project_id IS NOT NULL); + +CREATE INDEX index_vulnerability_external_issue_links_on_author_id ON vulnerability_external_issue_links USING btree (author_id); + +CREATE INDEX index_vulnerability_external_issue_links_on_vulnerability_id ON vulnerability_external_issue_links USING btree (vulnerability_id); + CREATE INDEX index_vulnerability_feedback_on_author_id ON vulnerability_feedback USING btree (author_id); CREATE INDEX index_vulnerability_feedback_on_comment_author_id ON vulnerability_feedback USING btree (comment_author_id); CREATE INDEX index_vulnerability_feedback_on_issue_id ON vulnerability_feedback USING btree (issue_id); +CREATE INDEX index_vulnerability_feedback_on_issue_id_not_null ON vulnerability_feedback USING btree (id) WHERE (issue_id IS NOT NULL); + CREATE INDEX index_vulnerability_feedback_on_merge_request_id ON vulnerability_feedback USING btree (merge_request_id); CREATE INDEX index_vulnerability_feedback_on_pipeline_id ON vulnerability_feedback USING btree (pipeline_id); +CREATE INDEX index_vulnerability_finding_fingerprints_on_finding_id ON vulnerability_finding_fingerprints USING btree (finding_id); + +CREATE INDEX index_vulnerability_findings_remediations_on_remediation_id ON vulnerability_findings_remediations USING btree (vulnerability_remediation_id); + +CREATE UNIQUE INDEX index_vulnerability_findings_remediations_on_unique_keys ON vulnerability_findings_remediations USING btree (vulnerability_occurrence_id, vulnerability_remediation_id); + +CREATE INDEX index_vulnerability_historical_statistics_on_date_and_id ON vulnerability_historical_statistics USING btree (date, id); + CREATE UNIQUE INDEX index_vulnerability_identifiers_on_project_id_and_fingerprint ON vulnerability_identifiers USING btree (project_id, fingerprint); CREATE INDEX index_vulnerability_issue_links_on_issue_id ON vulnerability_issue_links USING btree (issue_id); @@ -9707,8 +23459,12 @@ CREATE UNIQUE INDEX index_vulnerability_occurrence_identifiers_on_unique_keys ON CREATE INDEX index_vulnerability_occurrence_pipelines_on_pipeline_id ON vulnerability_occurrence_pipelines USING btree (pipeline_id); +CREATE INDEX index_vulnerability_occurrences_for_issue_links_migration ON vulnerability_occurrences USING btree (project_id, report_type, encode(project_fingerprint, 'hex'::text)); + CREATE INDEX index_vulnerability_occurrences_on_primary_identifier_id ON vulnerability_occurrences USING btree (primary_identifier_id); +CREATE INDEX index_vulnerability_occurrences_on_project_fingerprint ON vulnerability_occurrences USING btree (project_fingerprint); + CREATE INDEX index_vulnerability_occurrences_on_scanner_id ON vulnerability_occurrences USING btree (scanner_id); CREATE UNIQUE INDEX index_vulnerability_occurrences_on_unique_keys ON vulnerability_occurrences USING btree (project_id, primary_identifier_id, location_fingerprint, scanner_id); @@ -9717,20 +23473,44 @@ CREATE UNIQUE INDEX index_vulnerability_occurrences_on_uuid ON vulnerability_occ CREATE INDEX index_vulnerability_occurrences_on_vulnerability_id ON vulnerability_occurrences USING btree (vulnerability_id); +CREATE UNIQUE INDEX index_vulnerability_remediations_on_project_id_and_checksum ON vulnerability_remediations USING btree (project_id, checksum); + CREATE UNIQUE INDEX index_vulnerability_scanners_on_project_id_and_external_id ON vulnerability_scanners USING btree (project_id, external_id); +CREATE INDEX index_vulnerability_statistics_on_letter_grade ON vulnerability_statistics USING btree (letter_grade); + +CREATE UNIQUE INDEX index_vulnerability_statistics_on_unique_project_id ON vulnerability_statistics USING btree (project_id); + +CREATE UNIQUE INDEX index_vulnerability_user_mentions_on_note_id ON vulnerability_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); + +CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id ON vulnerability_user_mentions USING btree (vulnerability_id) WHERE (note_id IS NULL); + +CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id_and_note_id ON vulnerability_user_mentions USING btree (vulnerability_id, note_id); + CREATE INDEX index_web_hook_logs_on_created_at_and_web_hook_id ON web_hook_logs USING btree (created_at, web_hook_id); CREATE INDEX index_web_hook_logs_on_web_hook_id ON web_hook_logs USING btree (web_hook_id); +CREATE INDEX index_web_hooks_on_group_id ON web_hooks USING btree (group_id) WHERE ((type)::text = 'GroupHook'::text); + CREATE INDEX index_web_hooks_on_project_id ON web_hooks USING btree (project_id); +CREATE INDEX index_web_hooks_on_service_id ON web_hooks USING btree (service_id); + CREATE INDEX index_web_hooks_on_type ON web_hooks USING btree (type); CREATE UNIQUE INDEX index_webauthn_registrations_on_credential_xid ON webauthn_registrations USING btree (credential_xid); +CREATE INDEX index_webauthn_registrations_on_u2f_registration_id ON webauthn_registrations USING btree (u2f_registration_id) WHERE (u2f_registration_id IS NOT NULL); + CREATE INDEX index_webauthn_registrations_on_user_id ON webauthn_registrations USING btree (user_id); +CREATE INDEX index_wiki_page_meta_on_project_id ON wiki_page_meta USING btree (project_id); + +CREATE UNIQUE INDEX index_wiki_page_slugs_on_slug_and_wiki_page_meta_id ON wiki_page_slugs USING btree (slug, wiki_page_meta_id); + +CREATE INDEX index_wiki_page_slugs_on_wiki_page_meta_id ON wiki_page_slugs USING btree (wiki_page_meta_id); + CREATE INDEX index_x509_certificates_on_subject_key_identifier ON x509_certificates USING btree (subject_key_identifier); CREATE INDEX index_x509_certificates_on_x509_issuer_id ON x509_certificates USING btree (x509_issuer_id); @@ -9755,20 +23535,32 @@ CREATE INDEX issue_id_issues_prometheus_alert_events_index ON issues_prometheus_ CREATE INDEX issue_id_issues_self_managed_rometheus_alert_events_index ON issues_self_managed_prometheus_alert_events USING btree (self_managed_prometheus_alert_event_id); -CREATE UNIQUE INDEX issue_id_prometheus_alert_event_id_index ON issues_prometheus_alert_events USING btree (issue_id, prometheus_alert_event_id); - -CREATE UNIQUE INDEX issue_id_self_managed_prometheus_alert_event_id_index ON issues_self_managed_prometheus_alert_events USING btree (issue_id, self_managed_prometheus_alert_event_id); - CREATE UNIQUE INDEX issue_user_mentions_on_issue_id_and_note_id_index ON issue_user_mentions USING btree (issue_id, note_id); CREATE UNIQUE INDEX issue_user_mentions_on_issue_id_index ON issue_user_mentions USING btree (issue_id) WHERE (note_id IS NULL); CREATE UNIQUE INDEX kubernetes_namespaces_cluster_and_namespace ON clusters_kubernetes_namespaces USING btree (cluster_id, namespace); +CREATE INDEX merge_request_mentions_temp_index ON merge_requests USING btree (id) WHERE ((description ~~ '%@%'::text) OR ((title)::text ~~ '%@%'::text)); + CREATE UNIQUE INDEX merge_request_user_mentions_on_mr_id_and_note_id_index ON merge_request_user_mentions USING btree (merge_request_id, note_id); CREATE UNIQUE INDEX merge_request_user_mentions_on_mr_id_index ON merge_request_user_mentions USING btree (merge_request_id) WHERE (note_id IS NULL); +CREATE INDEX merge_requests_state_id_temp_index ON merge_requests USING btree (id) WHERE (state_id = ANY (ARRAY[2, 3])); + +CREATE INDEX note_mentions_temp_index ON notes USING btree (id, noteable_type) WHERE (note ~~ '%@%'::text); + +CREATE UNIQUE INDEX one_canonical_wiki_page_slug_per_metadata ON wiki_page_slugs USING btree (wiki_page_meta_id) WHERE (canonical = true); + +CREATE INDEX package_name_index ON packages_packages USING btree (name); + +CREATE INDEX packages_packages_failed_verification ON packages_package_files USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); + +CREATE INDEX packages_packages_needs_verification ON packages_package_files USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); + +CREATE INDEX packages_packages_pending_verification ON packages_package_files USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); + CREATE INDEX partial_index_ci_builds_on_scheduled_at_with_scheduled_jobs ON ci_builds USING btree (scheduled_at) WHERE ((scheduled_at IS NOT NULL) AND ((type)::text = 'Ci::Build'::text) AND ((status)::text = 'scheduled'::text)); CREATE INDEX partial_index_deployments_for_legacy_successful_deployments ON deployments USING btree (id) WHERE ((finished_at IS NULL) AND (status = 2)); @@ -9781,16 +23573,309 @@ CREATE UNIQUE INDEX snippet_user_mentions_on_snippet_id_index ON snippet_user_me CREATE UNIQUE INDEX taggings_idx ON taggings USING btree (tag_id, taggable_id, taggable_type, context, tagger_id, tagger_type); +CREATE INDEX temporary_index_vulnerabilities_on_id ON vulnerabilities USING btree (id) WHERE ((state = 2) AND ((dismissed_at IS NULL) OR (dismissed_by_id IS NULL))); + CREATE UNIQUE INDEX term_agreements_unique_index ON term_agreements USING btree (user_id, term_id); CREATE INDEX tmp_build_stage_position_index ON ci_builds USING btree (stage_id, stage_idx) WHERE (stage_idx IS NOT NULL); -CREATE UNIQUE INDEX users_security_dashboard_projects_unique_index ON users_security_dashboard_projects USING btree (project_id, user_id); +CREATE INDEX tmp_idx_deduplicate_vulnerability_occurrences ON vulnerability_occurrences USING btree (project_id, report_type, location_fingerprint, primary_identifier_id, id); + +CREATE INDEX tmp_index_ci_builds_lock_version ON ci_builds USING btree (id) WHERE (lock_version IS NULL); + +CREATE INDEX tmp_index_ci_pipelines_lock_version ON ci_pipelines USING btree (id) WHERE (lock_version IS NULL); + +CREATE INDEX tmp_index_ci_stages_lock_version ON ci_stages USING btree (id) WHERE (lock_version IS NULL); + +CREATE INDEX tmp_index_for_email_unconfirmation_migration ON emails USING btree (id) WHERE (confirmed_at IS NOT NULL); + +CREATE INDEX tmp_index_on_vulnerabilities_non_dismissed ON vulnerabilities USING btree (id) WHERE (state <> 2); + +CREATE UNIQUE INDEX uniq_pkgs_deb_grp_architectures_on_distribution_id_and_name ON packages_debian_group_architectures USING btree (distribution_id, name); + +CREATE UNIQUE INDEX uniq_pkgs_deb_grp_components_on_distribution_id_and_name ON packages_debian_group_components USING btree (distribution_id, name); + +CREATE UNIQUE INDEX uniq_pkgs_deb_proj_architectures_on_distribution_id_and_name ON packages_debian_project_architectures USING btree (distribution_id, name); + +CREATE UNIQUE INDEX uniq_pkgs_deb_proj_components_on_distribution_id_and_name ON packages_debian_project_components USING btree (distribution_id, name); + +CREATE UNIQUE INDEX uniq_pkgs_debian_group_distributions_group_id_and_codename ON packages_debian_group_distributions USING btree (group_id, codename); + +CREATE UNIQUE INDEX uniq_pkgs_debian_group_distributions_group_id_and_suite ON packages_debian_group_distributions USING btree (group_id, suite); + +CREATE UNIQUE INDEX uniq_pkgs_debian_project_distributions_project_id_and_codename ON packages_debian_project_distributions USING btree (project_id, codename); + +CREATE UNIQUE INDEX uniq_pkgs_debian_project_distributions_project_id_and_suite ON packages_debian_project_distributions USING btree (project_id, suite); + +CREATE UNIQUE INDEX unique_merge_request_metrics_by_merge_request_id ON merge_request_metrics USING btree (merge_request_id); + +CREATE INDEX user_follow_users_followee_id_idx ON user_follow_users USING btree (followee_id); CREATE UNIQUE INDEX vulnerability_feedback_unique_idx ON vulnerability_feedback USING btree (project_id, category, feedback_type, project_fingerprint); CREATE UNIQUE INDEX vulnerability_occurrence_pipelines_on_unique_keys ON vulnerability_occurrence_pipelines USING btree (occurrence_id, pipeline_id); +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx10; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx11; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx12; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx13; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx14; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx15; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx16; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx17; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx18; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx19; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx20; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx21; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx22; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx23; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx24; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx25; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx26; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx27; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx28; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx29; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx30; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx31; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx32; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx33; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx34; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx35; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx36; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx37; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx38; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx39; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx40; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx41; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx42; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx43; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx44; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx45; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx46; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx47; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx48; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx49; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx50; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx51; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx52; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx53; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx54; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx55; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx56; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx57; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx58; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx59; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx60; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx61; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx62; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx63; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx1; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx2; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx3; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx4; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx5; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx6; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx7; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx8; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_exper_project_id_collector_tstamp_idx9; + +ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experi_project_id_collector_tstamp_idx; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_00_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_01_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_02_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_03_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_04_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_05_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_06_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_07_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_08_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_09_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_10_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_11_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_12_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_13_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_14_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_15_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_16_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_17_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_18_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_19_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_20_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_21_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_22_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_23_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_24_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_25_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_26_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_27_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_28_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_29_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_30_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_31_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_32_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_33_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_34_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_35_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_36_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_37_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_38_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_39_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_40_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_41_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_42_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_43_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_44_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_45_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_46_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_47_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_48_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_49_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_50_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_51_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_52_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_53_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_54_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_55_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_56_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_57_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_58_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_59_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_60_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_61_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_62_pkey; + +ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63_pkey; + +CREATE TRIGGER table_sync_trigger_ee39a25f9d AFTER INSERT OR DELETE OR UPDATE ON audit_events FOR EACH ROW EXECUTE FUNCTION table_sync_function_2be879775d(); + +ALTER TABLE ONLY chat_names + ADD CONSTRAINT fk_00797a2bf9 FOREIGN KEY (service_id) REFERENCES services(id) ON DELETE CASCADE; + ALTER TABLE ONLY epics ADD CONSTRAINT fk_013c9f36ca FOREIGN KEY (due_date_sourcing_epic_id) REFERENCES epics(id) ON DELETE SET NULL; @@ -9800,6 +23885,12 @@ ALTER TABLE ONLY clusters_applications_runners ALTER TABLE ONLY design_management_designs_versions ADD CONSTRAINT fk_03c671965c FOREIGN KEY (design_id) REFERENCES design_management_designs(id) ON DELETE CASCADE; +ALTER TABLE ONLY terraform_state_versions + ADD CONSTRAINT fk_04b91e4a9f FOREIGN KEY (ci_build_id) REFERENCES ci_builds(id) ON DELETE SET NULL; + +ALTER TABLE ONLY ci_test_cases + ADD CONSTRAINT fk_0526c30ded FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY issues ADD CONSTRAINT fk_05f1e72feb FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL; @@ -9809,6 +23900,9 @@ ALTER TABLE ONLY merge_requests ALTER TABLE ONLY projects ADD CONSTRAINT fk_0a31cca0b8 FOREIGN KEY (marked_for_deletion_by_user_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY dast_sites + ADD CONSTRAINT fk_0a57f2271b FOREIGN KEY (dast_site_validation_id) REFERENCES dast_site_validations(id) ON DELETE SET NULL; + ALTER TABLE ONLY web_hooks ADD CONSTRAINT fk_0c8ca6d9d1 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -9818,6 +23912,9 @@ ALTER TABLE ONLY notification_settings ALTER TABLE ONLY lists ADD CONSTRAINT fk_0d3f677137 FOREIGN KEY (board_id) REFERENCES boards(id) ON DELETE CASCADE; +ALTER TABLE ONLY project_pages_metadata + ADD CONSTRAINT fk_0fd5b22688 FOREIGN KEY (pages_deployment_id) REFERENCES pages_deployments(id) ON DELETE SET NULL; + ALTER TABLE ONLY group_deletion_schedules ADD CONSTRAINT fk_11e3ebfcdd FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -9827,6 +23924,12 @@ ALTER TABLE ONLY vulnerabilities ALTER TABLE ONLY vulnerabilities ADD CONSTRAINT fk_131d289c65 FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE SET NULL; +ALTER TABLE ONLY webauthn_registrations + ADD CONSTRAINT fk_13e04d719a FOREIGN KEY (u2f_registration_id) REFERENCES u2f_registrations(id) ON DELETE CASCADE; + +ALTER TABLE ONLY protected_branch_push_access_levels + ADD CONSTRAINT fk_15d2a7a4ae FOREIGN KEY (deploy_key_id) REFERENCES keys(id) ON DELETE CASCADE; + ALTER TABLE ONLY internal_ids ADD CONSTRAINT fk_162941d509 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -9839,6 +23942,9 @@ ALTER TABLE ONLY project_features ALTER TABLE ONLY ci_pipelines ADD CONSTRAINT fk_190998ef09 FOREIGN KEY (external_pull_request_id) REFERENCES external_pull_requests(id) ON DELETE SET NULL; +ALTER TABLE ONLY user_details + ADD CONSTRAINT fk_190e4fcc88 FOREIGN KEY (provisioned_by_group_id) REFERENCES namespaces(id) ON DELETE SET NULL; + ALTER TABLE ONLY vulnerabilities ADD CONSTRAINT fk_1d37cddf91 FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE SET NULL; @@ -9846,7 +23952,7 @@ ALTER TABLE ONLY ci_sources_pipelines ADD CONSTRAINT fk_1e53c97c0a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY epics - ADD CONSTRAINT fk_1fbed67632 FOREIGN KEY (start_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL NOT VALID; + ADD CONSTRAINT fk_1fbed67632 FOREIGN KEY (start_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL; ALTER TABLE ONLY geo_container_repository_updated_events ADD CONSTRAINT fk_212c89c706 FOREIGN KEY (container_repository_id) REFERENCES container_repositories(id) ON DELETE CASCADE; @@ -9854,9 +23960,15 @@ ALTER TABLE ONLY geo_container_repository_updated_events ALTER TABLE ONLY users_star_projects ADD CONSTRAINT fk_22cd27ddfc FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY alert_management_alerts + ADD CONSTRAINT fk_2358b75436 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE SET NULL; + ALTER TABLE ONLY ci_stages ADD CONSTRAINT fk_2360681d1d FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY import_failures + ADD CONSTRAINT fk_24b824da43 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY project_ci_cd_settings ADD CONSTRAINT fk_24c15d2f2e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -9881,6 +23993,9 @@ ALTER TABLE ONLY notes ALTER TABLE ONLY members ADD CONSTRAINT fk_2e88fb7ce9 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY lists + ADD CONSTRAINT fk_30f2a831f4 FOREIGN KEY (iteration_id) REFERENCES sprints(id) ON DELETE CASCADE; + ALTER TABLE ONLY approvals ADD CONSTRAINT fk_310d714958 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; @@ -9893,6 +24008,9 @@ ALTER TABLE ONLY merge_requests ALTER TABLE ONLY ci_group_variables ADD CONSTRAINT fk_33ae4d58d8 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY namespaces + ADD CONSTRAINT fk_3448c97865 FOREIGN KEY (push_rule_id) REFERENCES push_rules(id) ON DELETE SET NULL; + ALTER TABLE ONLY epics ADD CONSTRAINT fk_3654b61b03 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE CASCADE; @@ -9902,8 +24020,11 @@ ALTER TABLE ONLY push_event_payloads ALTER TABLE ONLY ci_builds ADD CONSTRAINT fk_3a9eaa254d FOREIGN KEY (stage_id) REFERENCES ci_stages(id) ON DELETE CASCADE; +ALTER TABLE ONLY issues + ADD CONSTRAINT fk_3b8c72ea56 FOREIGN KEY (sprint_id) REFERENCES sprints(id) ON DELETE CASCADE; + ALTER TABLE ONLY epics - ADD CONSTRAINT fk_3c1fd1cccc FOREIGN KEY (due_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL NOT VALID; + ADD CONSTRAINT fk_3c1fd1cccc FOREIGN KEY (due_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL; ALTER TABLE ONLY ci_pipelines ADD CONSTRAINT fk_3d34ab2e06 FOREIGN KEY (pipeline_schedule_id) REFERENCES ci_pipeline_schedules(id) ON DELETE SET NULL; @@ -9914,9 +24035,6 @@ ALTER TABLE ONLY ci_pipeline_schedule_variables ALTER TABLE ONLY geo_event_log ADD CONSTRAINT fk_42c3b54bed FOREIGN KEY (cache_invalidation_event_id) REFERENCES geo_cache_invalidation_events(id) ON DELETE CASCADE; -ALTER TABLE ONLY forked_project_links - ADD CONSTRAINT fk_434510edb0 FOREIGN KEY (forked_to_project_id) REFERENCES projects(id) ON DELETE CASCADE; - ALTER TABLE ONLY ci_runner_projects ADD CONSTRAINT fk_4478a6f1e4 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -9932,9 +24050,15 @@ ALTER TABLE ONLY geo_event_log ALTER TABLE ONLY ci_build_trace_sections ADD CONSTRAINT fk_4ebe41f502 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY alert_management_alerts + ADD CONSTRAINT fk_51ab4b6089 FOREIGN KEY (prometheus_alert_id) REFERENCES prometheus_alerts(id) ON DELETE CASCADE; + ALTER TABLE ONLY path_locks ADD CONSTRAINT fk_5265c98f24 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY merge_request_metrics + ADD CONSTRAINT fk_56067dcb44 FOREIGN KEY (target_project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerability_feedback ADD CONSTRAINT fk_563ff1912e FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE SET NULL; @@ -9944,6 +24068,12 @@ ALTER TABLE ONLY deploy_keys_projects ALTER TABLE ONLY issue_assignees ADD CONSTRAINT fk_5e0c8d9154 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY csv_issue_imports + ADD CONSTRAINT fk_5e1572387c FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + +ALTER TABLE ONLY project_access_tokens + ADD CONSTRAINT fk_5f7e8450e1 FOREIGN KEY (personal_access_token_id) REFERENCES personal_access_tokens(id) ON DELETE CASCADE; + ALTER TABLE ONLY merge_requests ADD CONSTRAINT fk_6149611a04 FOREIGN KEY (assignee_id) REFERENCES users(id) ON DELETE SET NULL; @@ -9959,6 +24089,12 @@ ALTER TABLE ONLY merge_requests ALTER TABLE ONLY ci_builds ADD CONSTRAINT fk_6661f4f0e8 FOREIGN KEY (resource_group_id) REFERENCES ci_resource_groups(id) ON DELETE SET NULL; +ALTER TABLE ONLY project_pages_metadata + ADD CONSTRAINT fk_69366a119e FOREIGN KEY (artifacts_archive_id) REFERENCES ci_job_artifacts(id) ON DELETE SET NULL; + +ALTER TABLE ONLY application_settings + ADD CONSTRAINT fk_693b8795e4 FOREIGN KEY (push_rule_id) REFERENCES push_rules(id) ON DELETE SET NULL; + ALTER TABLE ONLY merge_requests ADD CONSTRAINT fk_6a5165a692 FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE SET NULL; @@ -9968,12 +24104,18 @@ ALTER TABLE ONLY geo_event_log ALTER TABLE ONLY projects ADD CONSTRAINT fk_6e5c14658a FOREIGN KEY (pool_repository_id) REFERENCES pool_repositories(id) ON DELETE SET NULL; +ALTER TABLE ONLY terraform_state_versions + ADD CONSTRAINT fk_6e81384d7f FOREIGN KEY (created_by_user_id) REFERENCES users(id) ON DELETE SET NULL; + ALTER TABLE ONLY protected_branch_push_access_levels ADD CONSTRAINT fk_7111b68cdb FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; ALTER TABLE ONLY services ADD CONSTRAINT fk_71cce407f9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY vulnerabilities + ADD CONSTRAINT fk_725465b774 FOREIGN KEY (dismissed_by_id) REFERENCES users(id) ON DELETE SET NULL; + ALTER TABLE ONLY index_statuses ADD CONSTRAINT fk_74b2492545 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10007,9 +24149,21 @@ ALTER TABLE ONLY vulnerabilities ALTER TABLE ONLY labels ADD CONSTRAINT fk_7de4989a69 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY backup_labels + ADD CONSTRAINT fk_7de4989a69 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY merge_requests + ADD CONSTRAINT fk_7e85395a64 FOREIGN KEY (sprint_id) REFERENCES sprints(id) ON DELETE CASCADE; + ALTER TABLE ONLY merge_request_metrics ADD CONSTRAINT fk_7f28d925f3 FOREIGN KEY (merged_by_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY group_import_states + ADD CONSTRAINT fk_8053b3ebd6 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + +ALTER TABLE ONLY sprints + ADD CONSTRAINT fk_80aa8a1f95 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY import_export_uploads ADD CONSTRAINT fk_83319d9721 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -10031,15 +24185,24 @@ ALTER TABLE ONLY packages_package_files ALTER TABLE ONLY ci_builds ADD CONSTRAINT fk_87f4cefcda FOREIGN KEY (upstream_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; +ALTER TABLE ONLY experiment_subjects + ADD CONSTRAINT fk_88489af1b1 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerabilities ADD CONSTRAINT fk_88b4d546ef FOREIGN KEY (start_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL; +ALTER TABLE ONLY bulk_import_entities + ADD CONSTRAINT fk_88c725229f FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY issues ADD CONSTRAINT fk_899c8f3231 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY protected_branch_merge_access_levels ADD CONSTRAINT fk_8a3072ccb3 FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE; +ALTER TABLE ONLY timelogs + ADD CONSTRAINT fk_8d058cd571 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE; + ALTER TABLE ONLY releases ADD CONSTRAINT fk_8e4456f90f FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL; @@ -10058,6 +24221,9 @@ ALTER TABLE ONLY vulnerability_feedback ALTER TABLE ONLY milestones ADD CONSTRAINT fk_95650a40d4 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY vulnerabilities + ADD CONSTRAINT fk_959d40ad0a FOREIGN KEY (confirmed_by_id) REFERENCES users(id) ON DELETE SET NULL; + ALTER TABLE ONLY application_settings ADD CONSTRAINT fk_964370041d FOREIGN KEY (usage_stats_set_by_user_id) REFERENCES users(id) ON DELETE SET NULL; @@ -10085,12 +24251,18 @@ ALTER TABLE ONLY issues ALTER TABLE ONLY epics ADD CONSTRAINT fk_9d480c64b2 FOREIGN KEY (start_date_sourcing_epic_id) REFERENCES epics(id) ON DELETE SET NULL; +ALTER TABLE ONLY alert_management_alerts + ADD CONSTRAINT fk_9e49e5c2b7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY ci_pipeline_schedules ADD CONSTRAINT fk_9ea99f58d2 FOREIGN KEY (owner_id) REFERENCES users(id) ON DELETE SET NULL; ALTER TABLE ONLY protected_branch_push_access_levels ADD CONSTRAINT fk_9ffc86a3d9 FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE; +ALTER TABLE ONLY deployment_merge_requests + ADD CONSTRAINT fk_a064ff4453 FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE CASCADE; + ALTER TABLE ONLY issues ADD CONSTRAINT fk_a194299be1 FOREIGN KEY (moved_to_id) REFERENCES issues(id) ON DELETE SET NULL; @@ -10106,6 +24278,9 @@ ALTER TABLE ONLY todos ALTER TABLE ONLY jira_connect_subscriptions ADD CONSTRAINT fk_a3c10bcf7d FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY bulk_import_entities + ADD CONSTRAINT fk_a44ff95be5 FOREIGN KEY (parent_id) REFERENCES bulk_import_entities(id) ON DELETE CASCADE; + ALTER TABLE ONLY users ADD CONSTRAINT fk_a4b8fefe3e FOREIGN KEY (managing_group_id) REFERENCES namespaces(id) ON DELETE SET NULL; @@ -10115,6 +24290,9 @@ ALTER TABLE ONLY merge_requests ALTER TABLE ONLY epics ADD CONSTRAINT fk_aa5798e761 FOREIGN KEY (closed_by_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY alert_management_alerts + ADD CONSTRAINT fk_aad61aedca FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE SET NULL; + ALTER TABLE ONLY identities ADD CONSTRAINT fk_aade90f0fc FOREIGN KEY (saml_provider_id) REFERENCES saml_providers(id) ON DELETE CASCADE; @@ -10130,15 +24308,27 @@ ALTER TABLE ONLY ci_variables ALTER TABLE ONLY merge_request_metrics ADD CONSTRAINT fk_ae440388cc FOREIGN KEY (latest_closed_by_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY analytics_cycle_analytics_group_stages + ADD CONSTRAINT fk_analytics_cycle_analytics_group_stages_group_value_stream_id FOREIGN KEY (group_value_stream_id) REFERENCES analytics_cycle_analytics_group_value_streams(id) ON DELETE CASCADE; + ALTER TABLE ONLY fork_network_members ADD CONSTRAINT fk_b01280dae4 FOREIGN KEY (forked_from_project_id) REFERENCES projects(id) ON DELETE SET NULL; ALTER TABLE ONLY vulnerabilities ADD CONSTRAINT fk_b1de915a15 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY project_access_tokens + ADD CONSTRAINT fk_b27801bfbf FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY protected_tag_create_access_levels ADD CONSTRAINT fk_b4eb82fe3c FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY bulk_import_entities + ADD CONSTRAINT fk_b69fa2b2df FOREIGN KEY (bulk_import_id) REFERENCES bulk_imports(id) ON DELETE CASCADE; + +ALTER TABLE ONLY compliance_management_frameworks + ADD CONSTRAINT fk_b74c45b71f FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY issue_assignees ADD CONSTRAINT fk_b7d881734a FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; @@ -10151,6 +24341,12 @@ ALTER TABLE ONLY deployments ALTER TABLE ONLY gitlab_subscriptions ADD CONSTRAINT fk_bd0c4019c3 FOREIGN KEY (hosted_plan_id) REFERENCES plans(id) ON DELETE CASCADE; +ALTER TABLE ONLY metrics_users_starred_dashboards + ADD CONSTRAINT fk_bd6ae32fac FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + +ALTER TABLE ONLY project_compliance_framework_settings + ADD CONSTRAINT fk_be413374a9 FOREIGN KEY (framework_id) REFERENCES compliance_management_frameworks(id) ON DELETE CASCADE; + ALTER TABLE ONLY snippets ADD CONSTRAINT fk_be41fd4bb7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10166,9 +24362,15 @@ ALTER TABLE ONLY ci_builds ALTER TABLE ONLY design_management_versions ADD CONSTRAINT fk_c1440b4896 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY packages_packages + ADD CONSTRAINT fk_c188f0dba4 FOREIGN KEY (creator_id) REFERENCES users(id) ON DELETE SET NULL; + ALTER TABLE ONLY geo_event_log ADD CONSTRAINT fk_c1f241c70d FOREIGN KEY (upload_deleted_event_id) REFERENCES geo_upload_deleted_events(id) ON DELETE CASCADE; +ALTER TABLE ONLY vulnerability_exports + ADD CONSTRAINT fk_c3d3cb5d0f FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY geo_event_log ADD CONSTRAINT fk_c4b1c1f66e FOREIGN KEY (repository_deleted_event_id) REFERENCES geo_repository_deleted_events(id) ON DELETE CASCADE; @@ -10178,30 +24380,45 @@ ALTER TABLE ONLY issues ALTER TABLE ONLY issue_links ADD CONSTRAINT fk_c900194ff2 FOREIGN KEY (source_id) REFERENCES issues(id) ON DELETE CASCADE; +ALTER TABLE ONLY experiment_subjects + ADD CONSTRAINT fk_ccc28f8ceb FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY todos ADD CONSTRAINT fk_ccf0373936 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE CASCADE; -ALTER TABLE ONLY vulnerabilities - ADD CONSTRAINT fk_cf5c60acbf FOREIGN KEY (closed_by_id) REFERENCES users(id) ON DELETE SET NULL; - ALTER TABLE ONLY geo_event_log ADD CONSTRAINT fk_cff7185ad2 FOREIGN KEY (reset_checksum_event_id) REFERENCES geo_reset_checksum_events(id) ON DELETE CASCADE; +ALTER TABLE ONLY bulk_import_entities + ADD CONSTRAINT fk_d06d023c30 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY environments ADD CONSTRAINT fk_d1c8c1da6a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY ci_builds ADD CONSTRAINT fk_d3130c9a7f FOREIGN KEY (commit_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; +ALTER TABLE ONLY web_hooks + ADD CONSTRAINT fk_d47999a98a FOREIGN KEY (service_id) REFERENCES services(id) ON DELETE CASCADE NOT VALID; + ALTER TABLE ONLY ci_sources_pipelines ADD CONSTRAINT fk_d4e29af7d7 FOREIGN KEY (source_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; ALTER TABLE ONLY geo_event_log ADD CONSTRAINT fk_d5af95fcd9 FOREIGN KEY (lfs_object_deleted_event_id) REFERENCES geo_lfs_object_deleted_events(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_test_case_failures + ADD CONSTRAINT fk_d69404d827 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; + ALTER TABLE ONLY lists ADD CONSTRAINT fk_d6cf4279f7 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY metrics_users_starred_dashboards + ADD CONSTRAINT fk_d76a2b9a8c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY ci_pipelines + ADD CONSTRAINT fk_d80e161c54 FOREIGN KEY (ci_ref_id) REFERENCES ci_refs(id) ON DELETE SET NULL; + ALTER TABLE ONLY system_note_metadata ADD CONSTRAINT fk_d83a918cb1 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE; @@ -10217,9 +24434,15 @@ ALTER TABLE ONLY dependency_proxy_blobs ALTER TABLE ONLY epics ADD CONSTRAINT fk_dccd3f98fc FOREIGN KEY (assignee_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY analytics_devops_adoption_segment_selections + ADD CONSTRAINT fk_ded7fe0344 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY issues ADD CONSTRAINT fk_df75a7c8b8 FOREIGN KEY (promoted_to_epic_id) REFERENCES epics(id) ON DELETE SET NULL; +ALTER TABLE ONLY experiment_subjects + ADD CONSTRAINT fk_dfc3e211d4 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY ci_resources ADD CONSTRAINT fk_e169a8e3d5 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE SET NULL; @@ -10238,15 +24461,27 @@ ALTER TABLE ONLY merge_requests ALTER TABLE ONLY issue_links ADD CONSTRAINT fk_e71bb44f1f FOREIGN KEY (target_id) REFERENCES issues(id) ON DELETE CASCADE; +ALTER TABLE ONLY csv_issue_imports + ADD CONSTRAINT fk_e71c0ae362 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY namespaces ADD CONSTRAINT fk_e7a0b20a6b FOREIGN KEY (custom_project_templates_group_id) REFERENCES namespaces(id) ON DELETE SET NULL; ALTER TABLE ONLY fork_networks ADD CONSTRAINT fk_e7b436b2b5 FOREIGN KEY (root_project_id) REFERENCES projects(id) ON DELETE SET NULL; +ALTER TABLE ONLY sprints + ADD CONSTRAINT fk_e8206c9686 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY application_settings + ADD CONSTRAINT fk_e8a145f3a7 FOREIGN KEY (instance_administrators_group_id) REFERENCES namespaces(id) ON DELETE SET NULL; + ALTER TABLE ONLY ci_triggers ADD CONSTRAINT fk_e8e10d1964 FOREIGN KEY (owner_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY services + ADD CONSTRAINT fk_e8fe908a34 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY pages_domains ADD CONSTRAINT fk_ea2f6dfc6f FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10259,12 +24494,21 @@ ALTER TABLE ONLY events ALTER TABLE ONLY vulnerabilities ADD CONSTRAINT fk_efb96ab1e2 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY emails + ADD CONSTRAINT fk_emails_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY clusters ADD CONSTRAINT fk_f05c5e5a42 FOREIGN KEY (management_project_id) REFERENCES projects(id) ON DELETE SET NULL; +ALTER TABLE ONLY vulnerability_external_issue_links + ADD CONSTRAINT fk_f07bb8233d FOREIGN KEY (vulnerability_id) REFERENCES vulnerabilities(id) ON DELETE CASCADE; + ALTER TABLE ONLY epics ADD CONSTRAINT fk_f081aa4489 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY analytics_devops_adoption_segment_selections + ADD CONSTRAINT fk_f1472b95f3 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY boards ADD CONSTRAINT fk_f15266b5f9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10286,21 +24530,42 @@ ALTER TABLE ONLY ci_stages ALTER TABLE ONLY system_note_metadata ADD CONSTRAINT fk_fbd87415c9 FOREIGN KEY (description_version_id) REFERENCES description_versions(id) ON DELETE SET NULL; +ALTER TABLE ONLY vulnerability_remediations + ADD CONSTRAINT fk_fc61a535a0 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY merge_requests ADD CONSTRAINT fk_fd82eae0b9 FOREIGN KEY (head_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL; -ALTER TABLE ONLY namespaces - ADD CONSTRAINT fk_fdd12e5b80 FOREIGN KEY (plan_id) REFERENCES plans(id) ON DELETE SET NULL; - ALTER TABLE ONLY project_import_data ADD CONSTRAINT fk_ffb9ee3a10 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY issues ADD CONSTRAINT fk_ffed080f01 FOREIGN KEY (updated_by_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY geo_event_log + ADD CONSTRAINT fk_geo_event_log_on_geo_event_id FOREIGN KEY (geo_event_id) REFERENCES geo_events(id) ON DELETE CASCADE; + +ALTER TABLE ONLY path_locks + ADD CONSTRAINT fk_path_locks_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY personal_access_tokens ADD CONSTRAINT fk_personal_access_tokens_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY project_settings + ADD CONSTRAINT fk_project_settings_push_rule_id FOREIGN KEY (push_rule_id) REFERENCES push_rules(id) ON DELETE SET NULL; + +ALTER TABLE ONLY projects + ADD CONSTRAINT fk_projects_namespace_id FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE RESTRICT; + +ALTER TABLE ONLY protected_branch_merge_access_levels + ADD CONSTRAINT fk_protected_branch_merge_access_levels_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + +ALTER TABLE ONLY protected_branch_push_access_levels + ADD CONSTRAINT fk_protected_branch_push_access_levels_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + +ALTER TABLE ONLY protected_tag_create_access_levels + ADD CONSTRAINT fk_protected_tag_create_access_levels_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY approval_merge_request_rules ADD CONSTRAINT fk_rails_004ce82224 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; @@ -10310,12 +24575,27 @@ ALTER TABLE ONLY namespace_statistics ALTER TABLE ONLY clusters_applications_elastic_stacks ADD CONSTRAINT fk_rails_026f219f46 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; +ALTER TABLE ONLY incident_management_oncall_participants + ADD CONSTRAINT fk_rails_032b12996a FOREIGN KEY (oncall_rotation_id) REFERENCES incident_management_oncall_rotations(id) ON DELETE CASCADE; + ALTER TABLE ONLY events ADD CONSTRAINT fk_rails_0434b48643 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY ip_restrictions ADD CONSTRAINT fk_rails_04a93778d5 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY terraform_state_versions + ADD CONSTRAINT fk_rails_04f176e239 FOREIGN KEY (terraform_state_id) REFERENCES terraform_states(id) ON DELETE CASCADE; + +ALTER TABLE ONLY analytics_devops_adoption_segment_selections + ADD CONSTRAINT fk_rails_053f00a9da FOREIGN KEY (segment_id) REFERENCES analytics_devops_adoption_segments(id) ON DELETE CASCADE; + +ALTER TABLE ONLY ci_build_report_results + ADD CONSTRAINT fk_rails_056d298d48 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY ci_daily_build_group_report_results + ADD CONSTRAINT fk_rails_0667f7608c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY ci_subscriptions_projects ADD CONSTRAINT fk_rails_0818751483 FOREIGN KEY (downstream_project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10328,12 +24608,18 @@ ALTER TABLE ONLY trending_projects ALTER TABLE ONLY project_deploy_tokens ADD CONSTRAINT fk_rails_0aca134388 FOREIGN KEY (deploy_token_id) REFERENCES deploy_tokens(id) ON DELETE CASCADE; -ALTER TABLE ONLY analytics_repository_file_commits - ADD CONSTRAINT fk_rails_0aefa9ee3e FOREIGN KEY (analytics_repository_file_id) REFERENCES analytics_repository_files(id) ON DELETE CASCADE; +ALTER TABLE ONLY packages_debian_group_distributions + ADD CONSTRAINT fk_rails_0adf75c347 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE RESTRICT; ALTER TABLE ONLY packages_conan_file_metadata ADD CONSTRAINT fk_rails_0afabd9328 FOREIGN KEY (package_file_id) REFERENCES packages_package_files(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_build_pending_states + ADD CONSTRAINT fk_rails_0bbbfeaf9d FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; + +ALTER TABLE ONLY operations_user_lists + ADD CONSTRAINT fk_rails_0c716e079b FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY geo_node_statuses ADD CONSTRAINT fk_rails_0ecc699c2a FOREIGN KEY (geo_node_id) REFERENCES geo_nodes(id) ON DELETE CASCADE; @@ -10346,15 +24632,24 @@ ALTER TABLE ONLY user_synced_attributes_metadata ALTER TABLE ONLY project_authorizations ADD CONSTRAINT fk_rails_0f84bb11f3 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY issue_email_participants + ADD CONSTRAINT fk_rails_0fdfd8b811 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; + ALTER TABLE ONLY merge_request_context_commits ADD CONSTRAINT fk_rails_0fe0039f60 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; ALTER TABLE ONLY ci_build_trace_chunks ADD CONSTRAINT fk_rails_1013b761f2 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY vulnerability_exports + ADD CONSTRAINT fk_rails_1019162882 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY prometheus_alert_events ADD CONSTRAINT fk_rails_106f901176 FOREIGN KEY (prometheus_alert_id) REFERENCES prometheus_alerts(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_sources_projects + ADD CONSTRAINT fk_rails_10a1eb379a FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; + ALTER TABLE ONLY zoom_meetings ADD CONSTRAINT fk_rails_1190f0e0fa FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10370,9 +24665,21 @@ ALTER TABLE ONLY description_versions ALTER TABLE ONLY project_statistics ADD CONSTRAINT fk_rails_12c471002f FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY user_details + ADD CONSTRAINT fk_rails_12e0b3043d FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + +ALTER TABLE ONLY bulk_imports + ADD CONSTRAINT fk_rails_130a09357d FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + +ALTER TABLE ONLY diff_note_positions + ADD CONSTRAINT fk_rails_13c7212859 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE; + ALTER TABLE ONLY users_security_dashboard_projects ADD CONSTRAINT fk_rails_150cd5682c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_build_report_results + ADD CONSTRAINT fk_rails_16cb1ff064 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; + ALTER TABLE ONLY project_deploy_tokens ADD CONSTRAINT fk_rails_170e03cbaf FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10391,9 +24698,30 @@ ALTER TABLE ONLY cluster_providers_aws ALTER TABLE ONLY grafana_integrations ADD CONSTRAINT fk_rails_18d0e2b564 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY bulk_import_failures + ADD CONSTRAINT fk_rails_1964240b8c FOREIGN KEY (bulk_import_entity_id) REFERENCES bulk_import_entities(id) ON DELETE CASCADE; + +ALTER TABLE ONLY group_wiki_repositories + ADD CONSTRAINT fk_rails_19755e374b FOREIGN KEY (shard_id) REFERENCES shards(id) ON DELETE RESTRICT; + +ALTER TABLE ONLY open_project_tracker_data + ADD CONSTRAINT fk_rails_1987546e48 FOREIGN KEY (service_id) REFERENCES services(id) ON DELETE CASCADE; + ALTER TABLE ONLY gpg_signatures ADD CONSTRAINT fk_rails_19d4f1c6f9 FOREIGN KEY (gpg_key_subkey_id) REFERENCES gpg_key_subkeys(id) ON DELETE SET NULL; +ALTER TABLE ONLY incident_management_oncall_schedules + ADD CONSTRAINT fk_rails_19e83fdd65 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY vulnerability_user_mentions + ADD CONSTRAINT fk_rails_1a41c485cd FOREIGN KEY (vulnerability_id) REFERENCES vulnerabilities(id) ON DELETE CASCADE; + +ALTER TABLE ONLY packages_debian_file_metadata + ADD CONSTRAINT fk_rails_1ae85be112 FOREIGN KEY (package_file_id) REFERENCES packages_package_files(id) ON DELETE CASCADE; + +ALTER TABLE ONLY issuable_slas + ADD CONSTRAINT fk_rails_1b8768cd63 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; + ALTER TABLE ONLY board_assignees ADD CONSTRAINT fk_rails_1c0ff59e82 FOREIGN KEY (assignee_id) REFERENCES users(id) ON DELETE CASCADE; @@ -10403,12 +24731,12 @@ ALTER TABLE ONLY epic_user_mentions ALTER TABLE ONLY approver_groups ADD CONSTRAINT fk_rails_1cdcbd7723 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; -ALTER TABLE ONLY ci_refs - ADD CONSTRAINT fk_rails_1da48d19ce FOREIGN KEY (last_updated_by_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL; - ALTER TABLE ONLY boards ADD CONSTRAINT fk_rails_1e9a074a35 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY boards_epic_board_positions + ADD CONSTRAINT fk_rails_1ecfd9f2de FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE; + ALTER TABLE ONLY geo_repository_created_events ADD CONSTRAINT fk_rails_1f49e46a61 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10418,9 +24746,6 @@ ALTER TABLE ONLY approval_merge_request_rules_groups ALTER TABLE ONLY vulnerability_feedback ADD CONSTRAINT fk_rails_20976e6fd9 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL; -ALTER TABLE ONLY merge_request_milestones - ADD CONSTRAINT fk_rails_212ba37b52 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; - ALTER TABLE ONLY user_statuses ADD CONSTRAINT fk_rails_2178592333 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -10433,18 +24758,42 @@ ALTER TABLE ONLY clusters_applications_runners ALTER TABLE ONLY service_desk_settings ADD CONSTRAINT fk_rails_223a296a85 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; -ALTER TABLE ONLY protected_tag_create_access_levels - ADD CONSTRAINT fk_rails_2349b78b91 FOREIGN KEY (user_id) REFERENCES users(id); +ALTER TABLE ONLY saml_group_links + ADD CONSTRAINT fk_rails_22e312c530 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; ALTER TABLE ONLY group_custom_attributes ADD CONSTRAINT fk_rails_246e0db83a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY incident_management_oncall_rotations + ADD CONSTRAINT fk_rails_256e0bc604 FOREIGN KEY (oncall_schedule_id) REFERENCES incident_management_oncall_schedules(id) ON DELETE CASCADE; + +ALTER TABLE ONLY analytics_devops_adoption_snapshots + ADD CONSTRAINT fk_rails_25da9a92c0 FOREIGN KEY (segment_id) REFERENCES analytics_devops_adoption_segments(id) ON DELETE CASCADE; + +ALTER TABLE ONLY cluster_agents + ADD CONSTRAINT fk_rails_25e9fc2d5d FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY boards_epic_user_preferences + ADD CONSTRAINT fk_rails_268c57d62d FOREIGN KEY (board_id) REFERENCES boards(id) ON DELETE CASCADE; + +ALTER TABLE ONLY group_wiki_repositories + ADD CONSTRAINT fk_rails_26f867598c FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY lfs_file_locks ADD CONSTRAINT fk_rails_27a1d98fa8 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; ALTER TABLE ONLY project_alerting_settings ADD CONSTRAINT fk_rails_27a84b407d FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY dast_site_validations + ADD CONSTRAINT fk_rails_285c617324 FOREIGN KEY (dast_site_token_id) REFERENCES dast_site_tokens(id) ON DELETE CASCADE; + +ALTER TABLE ONLY vulnerability_findings_remediations + ADD CONSTRAINT fk_rails_28a8d0cf93 FOREIGN KEY (vulnerability_occurrence_id) REFERENCES vulnerability_occurrences(id) ON DELETE CASCADE; + +ALTER TABLE ONLY resource_state_events + ADD CONSTRAINT fk_rails_29af06892a FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; + ALTER TABLE ONLY reviews ADD CONSTRAINT fk_rails_29e6f859c4 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL; @@ -10460,15 +24809,33 @@ ALTER TABLE ONLY group_group_links ALTER TABLE ONLY geo_repository_updated_events ADD CONSTRAINT fk_rails_2b70854c08 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY packages_debian_group_component_files + ADD CONSTRAINT fk_rails_2b8992dd83 FOREIGN KEY (architecture_id) REFERENCES packages_debian_group_architectures(id) ON DELETE RESTRICT; + +ALTER TABLE ONLY boards_epic_board_labels + ADD CONSTRAINT fk_rails_2bedeb8799 FOREIGN KEY (label_id) REFERENCES labels(id) ON DELETE CASCADE; + ALTER TABLE ONLY protected_branch_unprotect_access_levels ADD CONSTRAINT fk_rails_2d2aba21ef FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_freeze_periods + ADD CONSTRAINT fk_rails_2e02bbd1a6 FOREIGN KEY (project_id) REFERENCES projects(id); + +ALTER TABLE ONLY issuable_severities + ADD CONSTRAINT fk_rails_2fbb74ad6d FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; + ALTER TABLE ONLY saml_providers ADD CONSTRAINT fk_rails_306d459be7 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY resource_state_events + ADD CONSTRAINT fk_rails_3112bba7dc FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; + ALTER TABLE ONLY merge_request_diff_commits ADD CONSTRAINT fk_rails_316aaceda3 FOREIGN KEY (merge_request_diff_id) REFERENCES merge_request_diffs(id) ON DELETE CASCADE; +ALTER TABLE ONLY group_import_states + ADD CONSTRAINT fk_rails_31c3e0503a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY zoom_meetings ADD CONSTRAINT fk_rails_3263f29616 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; @@ -10484,18 +24851,33 @@ ALTER TABLE ONLY merge_request_metrics ALTER TABLE ONLY suggestions ADD CONSTRAINT fk_rails_33b03a535c FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE; +ALTER TABLE ONLY requirements + ADD CONSTRAINT fk_rails_33fed8aa4e FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL; + +ALTER TABLE ONLY metrics_dashboard_annotations + ADD CONSTRAINT fk_rails_345ab51043 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; + +ALTER TABLE ONLY wiki_page_slugs + ADD CONSTRAINT fk_rails_358b46be14 FOREIGN KEY (wiki_page_meta_id) REFERENCES wiki_page_meta(id) ON DELETE CASCADE; + ALTER TABLE ONLY board_labels ADD CONSTRAINT fk_rails_362b0600a3 FOREIGN KEY (label_id) REFERENCES labels(id) ON DELETE CASCADE; ALTER TABLE ONLY merge_request_blocks ADD CONSTRAINT fk_rails_364d4bea8b FOREIGN KEY (blocked_merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; +ALTER TABLE ONLY merge_request_reviewers + ADD CONSTRAINT fk_rails_3704a66140 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY analytics_cycle_analytics_project_stages ADD CONSTRAINT fk_rails_3829e49b66 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY issue_user_mentions ADD CONSTRAINT fk_rails_3861d9fefa FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE; +ALTER TABLE ONLY namespace_settings + ADD CONSTRAINT fk_rails_3896d4fae5 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY self_managed_prometheus_alert_events ADD CONSTRAINT fk_rails_3936dadc62 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10523,6 +24905,9 @@ ALTER TABLE ONLY snippet_user_mentions ALTER TABLE ONLY clusters_applications_helm ADD CONSTRAINT fk_rails_3e2b1c06bc FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; +ALTER TABLE ONLY packages_package_file_build_infos + ADD CONSTRAINT fk_rails_3e3f630188 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL; + ALTER TABLE ONLY epic_user_mentions ADD CONSTRAINT fk_rails_3eaf4d88cc FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE; @@ -10550,6 +24935,12 @@ ALTER TABLE ONLY ci_refs ALTER TABLE ONLY ci_resources ADD CONSTRAINT fk_rails_430336af2d FOREIGN KEY (resource_group_id) REFERENCES ci_resource_groups(id) ON DELETE CASCADE; +ALTER TABLE ONLY clusters_applications_fluentd + ADD CONSTRAINT fk_rails_4319b1dcd2 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; + +ALTER TABLE ONLY operations_strategies_user_lists + ADD CONSTRAINT fk_rails_43241e8d29 FOREIGN KEY (strategy_id) REFERENCES operations_strategies(id) ON DELETE CASCADE; + ALTER TABLE ONLY remote_mirrors ADD CONSTRAINT fk_rails_43a9aa4ca8 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10562,6 +24953,9 @@ ALTER TABLE ONLY merge_request_assignees ALTER TABLE ONLY packages_dependency_links ADD CONSTRAINT fk_rails_4437bf4070 FOREIGN KEY (dependency_id) REFERENCES packages_dependencies(id) ON DELETE CASCADE; +ALTER TABLE ONLY namespace_onboarding_actions + ADD CONSTRAINT fk_rails_4504f6875a FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY project_auto_devops ADD CONSTRAINT fk_rails_45436b12b2 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10583,9 +24977,15 @@ ALTER TABLE ONLY vulnerability_feedback ALTER TABLE ONLY user_custom_attributes ADD CONSTRAINT fk_rails_47b91868a8 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_pipeline_artifacts + ADD CONSTRAINT fk_rails_4a70390ca6 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY group_deletion_schedules ADD CONSTRAINT fk_rails_4b8c694a6c FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY snippet_repository_storage_moves + ADD CONSTRAINT fk_rails_4b950f5b94 FOREIGN KEY (snippet_id) REFERENCES snippets(id) ON DELETE CASCADE; + ALTER TABLE ONLY design_management_designs ADD CONSTRAINT fk_rails_4bb1073360 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10598,21 +24998,48 @@ ALTER TABLE ONLY project_metrics_settings ALTER TABLE ONLY prometheus_metrics ADD CONSTRAINT fk_rails_4c8957a707 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY scim_identities + ADD CONSTRAINT fk_rails_4d2056ebd9 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY snippet_user_mentions ADD CONSTRAINT fk_rails_4d3f96b2cb FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE; +ALTER TABLE ONLY deployment_clusters + ADD CONSTRAINT fk_rails_4e6243e120 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; + ALTER TABLE ONLY geo_repository_renamed_events ADD CONSTRAINT fk_rails_4e6524febb FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY aws_roles ADD CONSTRAINT fk_rails_4ed56f4720 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY security_scans + ADD CONSTRAINT fk_rails_4ef1e6b4c6 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; + +ALTER TABLE ONLY packages_debian_publications + ADD CONSTRAINT fk_rails_4fc8ebd03e FOREIGN KEY (distribution_id) REFERENCES packages_debian_project_distributions(id) ON DELETE CASCADE; + ALTER TABLE ONLY merge_request_diff_files ADD CONSTRAINT fk_rails_501aa0a391 FOREIGN KEY (merge_request_diff_id) REFERENCES merge_request_diffs(id) ON DELETE CASCADE; +ALTER TABLE ONLY resource_iteration_events + ADD CONSTRAINT fk_rails_501fa15d69 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL; + +ALTER TABLE ONLY status_page_settings + ADD CONSTRAINT fk_rails_506e5ba391 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY project_repository_storage_moves + ADD CONSTRAINT fk_rails_5106dbd44a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY bulk_import_configurations + ADD CONSTRAINT fk_rails_536b96bff1 FOREIGN KEY (bulk_import_id) REFERENCES bulk_imports(id) ON DELETE CASCADE; + ALTER TABLE ONLY x509_commit_signatures ADD CONSTRAINT fk_rails_53fe41188f FOREIGN KEY (x509_certificate_id) REFERENCES x509_certificates(id) ON DELETE CASCADE; +ALTER TABLE ONLY analytics_cycle_analytics_group_value_streams + ADD CONSTRAINT fk_rails_540627381a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY geo_node_namespace_links ADD CONSTRAINT fk_rails_546bf08d3e FOREIGN KEY (geo_node_id) REFERENCES geo_nodes(id) ON DELETE CASCADE; @@ -10622,12 +25049,30 @@ ALTER TABLE ONLY clusters_applications_knative ALTER TABLE ONLY clusters_applications_prometheus ADD CONSTRAINT fk_rails_557e773639 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; +ALTER TABLE ONLY terraform_states + ADD CONSTRAINT fk_rails_558901b030 FOREIGN KEY (locked_by_user_id) REFERENCES users(id); + +ALTER TABLE ONLY issuable_metric_images + ADD CONSTRAINT fk_rails_56417a5a7f FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; + +ALTER TABLE ONLY group_deploy_keys + ADD CONSTRAINT fk_rails_5682fc07f8 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE RESTRICT; + +ALTER TABLE ONLY experiment_users + ADD CONSTRAINT fk_rails_56d4708b4a FOREIGN KEY (experiment_id) REFERENCES experiments(id) ON DELETE CASCADE; + ALTER TABLE ONLY issue_user_mentions ADD CONSTRAINT fk_rails_57581fda73 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; ALTER TABLE ONLY merge_request_assignees ADD CONSTRAINT fk_rails_579d375628 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY packages_debian_project_architectures + ADD CONSTRAINT fk_rails_5808663adf FOREIGN KEY (distribution_id) REFERENCES packages_debian_project_distributions(id) ON DELETE CASCADE; + +ALTER TABLE ONLY clusters_applications_cilium + ADD CONSTRAINT fk_rails_59dc12eea6 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; + ALTER TABLE ONLY analytics_cycle_analytics_group_stages ADD CONSTRAINT fk_rails_5a22f40223 FOREIGN KEY (start_event_label_id) REFERENCES labels(id) ON DELETE CASCADE; @@ -10640,6 +25085,9 @@ ALTER TABLE ONLY resource_label_events ALTER TABLE ONLY approval_merge_request_rules_groups ADD CONSTRAINT fk_rails_5b2ecf6139 FOREIGN KEY (approval_merge_request_rule_id) REFERENCES approval_merge_request_rules(id) ON DELETE CASCADE; +ALTER TABLE ONLY namespace_limits + ADD CONSTRAINT fk_rails_5b3f2bc334 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY protected_environment_deploy_access_levels ADD CONSTRAINT fk_rails_5b9f6970fe FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -10667,21 +25115,42 @@ ALTER TABLE ONLY resource_weight_events ALTER TABLE ONLY approval_project_rules ADD CONSTRAINT fk_rails_5fb4dd100b FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; -ALTER TABLE ONLY protected_branch_merge_access_levels - ADD CONSTRAINT fk_rails_5ffb4f3590 FOREIGN KEY (user_id) REFERENCES users(id); +ALTER TABLE ONLY incident_management_oncall_participants + ADD CONSTRAINT fk_rails_5fe86ea341 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + +ALTER TABLE ONLY user_highest_roles + ADD CONSTRAINT fk_rails_60f6c325a6 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + +ALTER TABLE ONLY group_deploy_tokens + ADD CONSTRAINT fk_rails_61a572b41a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + +ALTER TABLE ONLY status_page_published_incidents + ADD CONSTRAINT fk_rails_61e5493940 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; + +ALTER TABLE ONLY deployment_clusters + ADD CONSTRAINT fk_rails_6359a164df FOREIGN KEY (deployment_id) REFERENCES deployments(id) ON DELETE CASCADE; ALTER TABLE ONLY evidences ADD CONSTRAINT fk_rails_6388b435a6 FOREIGN KEY (release_id) REFERENCES releases(id) ON DELETE CASCADE; +ALTER TABLE ONLY jira_imports + ADD CONSTRAINT fk_rails_63cbe52ada FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerability_occurrence_pipelines ADD CONSTRAINT fk_rails_6421e35d7d FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; +ALTER TABLE ONLY group_deploy_tokens + ADD CONSTRAINT fk_rails_6477b01f6b FOREIGN KEY (deploy_token_id) REFERENCES deploy_tokens(id) ON DELETE CASCADE; + ALTER TABLE ONLY reviews ADD CONSTRAINT fk_rails_64798be025 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY operations_feature_flags ADD CONSTRAINT fk_rails_648e241be7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_sources_projects + ADD CONSTRAINT fk_rails_64b6855cbc FOREIGN KEY (source_project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY board_group_recent_visits ADD CONSTRAINT fk_rails_64bfc19bc5 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -10691,6 +25160,9 @@ ALTER TABLE ONLY approval_merge_request_rule_sources ALTER TABLE ONLY ci_pipeline_chat_data ADD CONSTRAINT fk_rails_64ebfab6b3 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; +ALTER TABLE ONLY approval_project_rules_protected_branches + ADD CONSTRAINT fk_rails_65203aa786 FOREIGN KEY (approval_project_rule_id) REFERENCES approval_project_rules(id) ON DELETE CASCADE; + ALTER TABLE ONLY design_management_versions ADD CONSTRAINT fk_rails_6574200d99 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; @@ -10703,24 +25175,39 @@ ALTER TABLE ONLY operations_feature_flags_clients ALTER TABLE ONLY web_hook_logs ADD CONSTRAINT fk_rails_666826e111 FOREIGN KEY (web_hook_id) REFERENCES web_hooks(id) ON DELETE CASCADE; +ALTER TABLE ONLY jira_imports + ADD CONSTRAINT fk_rails_675d38c03b FOREIGN KEY (label_id) REFERENCES labels(id) ON DELETE SET NULL; + +ALTER TABLE ONLY vulnerability_findings_remediations + ADD CONSTRAINT fk_rails_681c85ae0f FOREIGN KEY (vulnerability_remediation_id) REFERENCES vulnerability_remediations(id) ON DELETE CASCADE; + +ALTER TABLE ONLY resource_iteration_events + ADD CONSTRAINT fk_rails_6830c13ac1 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; + ALTER TABLE ONLY geo_hashed_storage_migrated_events ADD CONSTRAINT fk_rails_687ed7d7c5 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY plan_limits ADD CONSTRAINT fk_rails_69f8b6184f FOREIGN KEY (plan_id) REFERENCES plans(id) ON DELETE CASCADE; +ALTER TABLE ONLY operations_feature_flags_issues + ADD CONSTRAINT fk_rails_6a8856ca4f FOREIGN KEY (feature_flag_id) REFERENCES operations_feature_flags(id) ON DELETE CASCADE; + ALTER TABLE ONLY prometheus_alerts ADD CONSTRAINT fk_rails_6d9b283465 FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE CASCADE; -ALTER TABLE ONLY merge_request_milestones - ADD CONSTRAINT fk_rails_6da5e88b3c FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE CASCADE; - ALTER TABLE ONLY term_agreements ADD CONSTRAINT fk_rails_6ea6520e4a FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY project_compliance_framework_settings + ADD CONSTRAINT fk_rails_6f5294f16c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY users_security_dashboard_projects ADD CONSTRAINT fk_rails_6f6cf8e66e FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY dast_sites + ADD CONSTRAINT fk_rails_6febb6ea9c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY ci_builds_runner_session ADD CONSTRAINT fk_rails_70707857d3 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; @@ -10733,9 +25220,27 @@ ALTER TABLE ONLY project_custom_attributes ALTER TABLE ONLY user_interacted_projects ADD CONSTRAINT fk_rails_722ceba4f7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY security_findings + ADD CONSTRAINT fk_rails_729b763a54 FOREIGN KEY (scanner_id) REFERENCES vulnerability_scanners(id) ON DELETE CASCADE; + +ALTER TABLE ONLY dast_scanner_profiles + ADD CONSTRAINT fk_rails_72a8ba7141 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY vulnerability_historical_statistics + ADD CONSTRAINT fk_rails_72b73ed023 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY slack_integrations ADD CONSTRAINT fk_rails_73db19721a FOREIGN KEY (service_id) REFERENCES services(id) ON DELETE CASCADE; +ALTER TABLE ONLY custom_emoji + ADD CONSTRAINT fk_rails_745925b412 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + +ALTER TABLE ONLY boards_epic_board_labels + ADD CONSTRAINT fk_rails_7471128a8e FOREIGN KEY (epic_board_id) REFERENCES boards_epic_boards(id) ON DELETE CASCADE; + +ALTER TABLE ONLY dast_site_profiles + ADD CONSTRAINT fk_rails_747dc64abc FOREIGN KEY (dast_site_id) REFERENCES dast_sites(id) ON DELETE CASCADE; + ALTER TABLE ONLY merge_request_context_commit_diff_files ADD CONSTRAINT fk_rails_74a00a1787 FOREIGN KEY (merge_request_context_commit_id) REFERENCES merge_request_context_commits(id) ON DELETE CASCADE; @@ -10748,36 +25253,45 @@ ALTER TABLE ONLY release_links ALTER TABLE ONLY milestone_releases ADD CONSTRAINT fk_rails_754f27dbfa FOREIGN KEY (release_id) REFERENCES releases(id) ON DELETE CASCADE; -ALTER TABLE ONLY analytics_repository_files - ADD CONSTRAINT fk_rails_755b835007 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; - ALTER TABLE ONLY geo_repositories_changed_events ADD CONSTRAINT fk_rails_75ec0fefcc FOREIGN KEY (geo_node_id) REFERENCES geo_nodes(id) ON DELETE CASCADE; ALTER TABLE ONLY resource_label_events ADD CONSTRAINT fk_rails_75efb0a653 FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE; -ALTER TABLE ONLY path_locks - ADD CONSTRAINT fk_rails_762cdcf942 FOREIGN KEY (user_id) REFERENCES users(id); - ALTER TABLE ONLY x509_certificates ADD CONSTRAINT fk_rails_76479fb5b4 FOREIGN KEY (x509_issuer_id) REFERENCES x509_issuers(id) ON DELETE CASCADE; ALTER TABLE ONLY pages_domain_acme_orders ADD CONSTRAINT fk_rails_76581b1c16 FOREIGN KEY (pages_domain_id) REFERENCES pages_domains(id) ON DELETE CASCADE; +ALTER TABLE ONLY packages_debian_publications + ADD CONSTRAINT fk_rails_7668c1d606 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; + +ALTER TABLE ONLY boards_epic_user_preferences + ADD CONSTRAINT fk_rails_76c4e9732d FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE; + ALTER TABLE ONLY ci_subscriptions_projects ADD CONSTRAINT fk_rails_7871f9a97b FOREIGN KEY (upstream_project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY terraform_states + ADD CONSTRAINT fk_rails_78f54ca485 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY software_license_policies ADD CONSTRAINT fk_rails_7a7a2a92de FOREIGN KEY (software_license_id) REFERENCES software_licenses(id) ON DELETE CASCADE; ALTER TABLE ONLY project_repositories ADD CONSTRAINT fk_rails_7a810d4121 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY operations_scopes + ADD CONSTRAINT fk_rails_7a9358853b FOREIGN KEY (strategy_id) REFERENCES operations_strategies(id) ON DELETE CASCADE; + ALTER TABLE ONLY milestone_releases ADD CONSTRAINT fk_rails_7ae0756a2d FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE CASCADE; +ALTER TABLE ONLY resource_state_events + ADD CONSTRAINT fk_rails_7ddc5f7457 FOREIGN KEY (source_merge_request_id) REFERENCES merge_requests(id) ON DELETE SET NULL; + ALTER TABLE ONLY application_settings ADD CONSTRAINT fk_rails_7e112a9599 FOREIGN KEY (instance_administration_project_id) REFERENCES projects(id) ON DELETE SET NULL; @@ -10787,15 +25301,33 @@ ALTER TABLE ONLY clusters_kubernetes_namespaces ALTER TABLE ONLY approval_merge_request_rules_users ADD CONSTRAINT fk_rails_80e6801803 FOREIGN KEY (approval_merge_request_rule_id) REFERENCES approval_merge_request_rules(id) ON DELETE CASCADE; +ALTER TABLE ONLY required_code_owners_sections + ADD CONSTRAINT fk_rails_817708cf2d FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE; + +ALTER TABLE ONLY dast_site_profiles + ADD CONSTRAINT fk_rails_83e309d69e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY boards_epic_user_preferences + ADD CONSTRAINT fk_rails_851fe1510a FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY deployment_merge_requests ADD CONSTRAINT fk_rails_86a6d8bf12 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; ALTER TABLE ONLY analytics_language_trend_repository_languages ADD CONSTRAINT fk_rails_86cc9aef5f FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY merge_request_diff_details + ADD CONSTRAINT fk_rails_86f4d24ecd FOREIGN KEY (merge_request_diff_id) REFERENCES merge_request_diffs(id) ON DELETE CASCADE; + ALTER TABLE ONLY clusters_applications_crossplane ADD CONSTRAINT fk_rails_87186702df FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; +ALTER TABLE ONLY packages_package_file_build_infos + ADD CONSTRAINT fk_rails_871ca3ae21 FOREIGN KEY (package_file_id) REFERENCES packages_package_files(id) ON DELETE CASCADE; + +ALTER TABLE ONLY boards_epic_boards + ADD CONSTRAINT fk_rails_874c573878 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY ci_runner_namespaces ADD CONSTRAINT fk_rails_8767676b7a FOREIGN KEY (runner_id) REFERENCES ci_runners(id) ON DELETE CASCADE; @@ -10805,12 +25337,15 @@ ALTER TABLE ONLY software_license_policies ALTER TABLE ONLY protected_environment_deploy_access_levels ADD CONSTRAINT fk_rails_898a13b650 FOREIGN KEY (protected_environment_id) REFERENCES protected_environments(id) ON DELETE CASCADE; -ALTER TABLE ONLY analytics_repository_file_commits - ADD CONSTRAINT fk_rails_89bc941356 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY snippet_repositories + ADD CONSTRAINT fk_rails_8afd7e2f71 FOREIGN KEY (snippet_id) REFERENCES snippets(id) ON DELETE CASCADE; ALTER TABLE ONLY gpg_key_subkeys ADD CONSTRAINT fk_rails_8b2c90b046 FOREIGN KEY (gpg_key_id) REFERENCES gpg_keys(id) ON DELETE CASCADE; +ALTER TABLE ONLY board_user_preferences + ADD CONSTRAINT fk_rails_8b3b23ce82 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY allowed_email_domains ADD CONSTRAINT fk_rails_8b5da859f9 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -10826,18 +25361,21 @@ ALTER TABLE ONLY packages_conan_metadata ALTER TABLE ONLY vulnerability_feedback ADD CONSTRAINT fk_rails_8c77e5891a FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE SET NULL; +ALTER TABLE ONLY ci_pipeline_messages + ADD CONSTRAINT fk_rails_8d3b04e3e1 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; + ALTER TABLE ONLY approval_merge_request_rules_approved_approvers ADD CONSTRAINT fk_rails_8dc94cff4d FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; -ALTER TABLE ONLY protected_branch_push_access_levels - ADD CONSTRAINT fk_rails_8dcb712d65 FOREIGN KEY (user_id) REFERENCES users(id); - ALTER TABLE ONLY design_user_mentions ADD CONSTRAINT fk_rails_8de8c6d632 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE; ALTER TABLE ONLY clusters_kubernetes_namespaces ADD CONSTRAINT fk_rails_8df789f3ab FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE SET NULL; +ALTER TABLE ONLY alert_management_alert_user_mentions + ADD CONSTRAINT fk_rails_8e48eca0fe FOREIGN KEY (alert_management_alert_id) REFERENCES alert_management_alerts(id) ON DELETE CASCADE; + ALTER TABLE ONLY project_daily_statistics ADD CONSTRAINT fk_rails_8e549b272d FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -10859,9 +25397,24 @@ ALTER TABLE ONLY project_error_tracking_settings ALTER TABLE ONLY list_user_preferences ADD CONSTRAINT fk_rails_916d72cafd FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY merge_request_cleanup_schedules + ADD CONSTRAINT fk_rails_92dd0e705c FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; + ALTER TABLE ONLY board_labels ADD CONSTRAINT fk_rails_9374a16edd FOREIGN KEY (board_id) REFERENCES boards(id) ON DELETE CASCADE; +ALTER TABLE ONLY alert_management_alert_assignees + ADD CONSTRAINT fk_rails_93c0f6703b FOREIGN KEY (alert_id) REFERENCES alert_management_alerts(id) ON DELETE CASCADE; + +ALTER TABLE ONLY scim_identities + ADD CONSTRAINT fk_rails_9421a0bffb FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + +ALTER TABLE ONLY packages_debian_project_distributions + ADD CONSTRAINT fk_rails_94b95e1f84 FOREIGN KEY (creator_id) REFERENCES users(id) ON DELETE SET NULL; + +ALTER TABLE ONLY packages_pypi_metadata + ADD CONSTRAINT fk_rails_9698717cdd FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; + ALTER TABLE ONLY packages_dependency_links ADD CONSTRAINT fk_rails_96ef1c00d3 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; @@ -10877,12 +25430,21 @@ ALTER TABLE ONLY board_project_recent_visits ALTER TABLE ONLY clusters_kubernetes_namespaces ADD CONSTRAINT fk_rails_98fe21e486 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE SET NULL; +ALTER TABLE ONLY pages_deployments + ADD CONSTRAINT fk_rails_993b88f59a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY vulnerability_exports + ADD CONSTRAINT fk_rails_9aff2c3b45 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY users_ops_dashboard_projects ADD CONSTRAINT fk_rails_9b4ebf005b FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY project_incident_management_settings ADD CONSTRAINT fk_rails_9c2ea1b7dd FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY packages_debian_project_components + ADD CONSTRAINT fk_rails_9d072b5073 FOREIGN KEY (distribution_id) REFERENCES packages_debian_project_distributions(id) ON DELETE CASCADE; + ALTER TABLE ONLY gpg_keys ADD CONSTRAINT fk_rails_9d1f5d8719 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -10895,12 +25457,18 @@ ALTER TABLE ONLY badges ALTER TABLE ONLY clusters_applications_cert_managers ADD CONSTRAINT fk_rails_9e4f2cb4b2 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; +ALTER TABLE ONLY resource_milestone_events + ADD CONSTRAINT fk_rails_a006df5590 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; + ALTER TABLE ONLY namespace_root_storage_statistics ADD CONSTRAINT fk_rails_a0702c430b FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; ALTER TABLE ONLY project_aliases ADD CONSTRAINT fk_rails_a1804f74a7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY vulnerability_user_mentions + ADD CONSTRAINT fk_rails_a18600f210 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE; + ALTER TABLE ONLY jira_tracker_data ADD CONSTRAINT fk_rails_a299066916 FOREIGN KEY (service_id) REFERENCES services(id) ON DELETE CASCADE; @@ -10928,12 +25496,24 @@ ALTER TABLE ONLY user_preferences ALTER TABLE ONLY sentry_issues ADD CONSTRAINT fk_rails_a6a9612965 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; +ALTER TABLE ONLY user_permission_export_uploads + ADD CONSTRAINT fk_rails_a7130085e3 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY repository_languages ADD CONSTRAINT fk_rails_a750ec87a8 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY dependency_proxy_manifests + ADD CONSTRAINT fk_rails_a758021fb0 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + +ALTER TABLE ONLY resource_milestone_events + ADD CONSTRAINT fk_rails_a788026e85 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; + ALTER TABLE ONLY term_agreements ADD CONSTRAINT fk_rails_a88721bcdf FOREIGN KEY (term_id) REFERENCES application_setting_terms(id); +ALTER TABLE ONLY ci_pipeline_artifacts + ADD CONSTRAINT fk_rails_a9e811a466 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; + ALTER TABLE ONLY merge_request_user_mentions ADD CONSTRAINT fk_rails_aa1b2961b1 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; @@ -10943,21 +25523,42 @@ ALTER TABLE ONLY x509_commit_signatures ALTER TABLE ONLY ci_build_trace_sections ADD CONSTRAINT fk_rails_ab7c104e26 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY resource_iteration_events + ADD CONSTRAINT fk_rails_abf5d4affa FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; + ALTER TABLE ONLY clusters ADD CONSTRAINT fk_rails_ac3a663d79 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY packages_composer_metadata + ADD CONSTRAINT fk_rails_ad48c2e5bb FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; + ALTER TABLE ONLY analytics_cycle_analytics_group_stages ADD CONSTRAINT fk_rails_ae5da3409b FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY metrics_dashboard_annotations + ADD CONSTRAINT fk_rails_aeb11a7643 FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE CASCADE; + +ALTER TABLE ONLY bulk_import_trackers + ADD CONSTRAINT fk_rails_aed566d3f3 FOREIGN KEY (bulk_import_entity_id) REFERENCES bulk_import_entities(id) ON DELETE CASCADE; + ALTER TABLE ONLY pool_repositories ADD CONSTRAINT fk_rails_af3f8c5d62 FOREIGN KEY (shard_id) REFERENCES shards(id) ON DELETE RESTRICT; +ALTER TABLE ONLY vulnerability_statistics + ADD CONSTRAINT fk_rails_af61a7df4c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY resource_label_events ADD CONSTRAINT fk_rails_b126799f57 FOREIGN KEY (label_id) REFERENCES labels(id) ON DELETE SET NULL; +ALTER TABLE ONLY webauthn_registrations + ADD CONSTRAINT fk_rails_b15c016782 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY packages_build_infos ADD CONSTRAINT fk_rails_b18868292d FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; +ALTER TABLE ONLY authentication_events + ADD CONSTRAINT fk_rails_b204656a54 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL; + ALTER TABLE ONLY merge_trains ADD CONSTRAINT fk_rails_b29261ce31 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -10970,15 +25571,18 @@ ALTER TABLE ONLY issues_prometheus_alert_events ALTER TABLE ONLY merge_trains ADD CONSTRAINT fk_rails_b374b5225d FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; -ALTER TABLE ONLY issue_milestones - ADD CONSTRAINT fk_rails_b3daad894f FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE CASCADE; - ALTER TABLE ONLY application_settings ADD CONSTRAINT fk_rails_b53e481273 FOREIGN KEY (custom_project_templates_group_id) REFERENCES namespaces(id) ON DELETE SET NULL; +ALTER TABLE ONLY packages_debian_project_component_files + ADD CONSTRAINT fk_rails_b543a9622b FOREIGN KEY (architecture_id) REFERENCES packages_debian_project_architectures(id) ON DELETE RESTRICT; + ALTER TABLE ONLY namespace_aggregation_schedules ADD CONSTRAINT fk_rails_b565c8d16c FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY approval_project_rules_protected_branches + ADD CONSTRAINT fk_rails_b7567b031b FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE; + ALTER TABLE ONLY alerts_service_data ADD CONSTRAINT fk_rails_b93215a42c FOREIGN KEY (service_id) REFERENCES services(id) ON DELETE CASCADE; @@ -10991,6 +25595,12 @@ ALTER TABLE ONLY approval_project_rules_users ALTER TABLE ONLY lists ADD CONSTRAINT fk_rails_baed5f39b7 FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE CASCADE; +ALTER TABLE ONLY security_findings + ADD CONSTRAINT fk_rails_bb63863cf1 FOREIGN KEY (scan_id) REFERENCES security_scans(id) ON DELETE CASCADE; + +ALTER TABLE ONLY packages_debian_project_component_files + ADD CONSTRAINT fk_rails_bbe9ebfbd9 FOREIGN KEY (component_id) REFERENCES packages_debian_project_components(id) ON DELETE RESTRICT; + ALTER TABLE ONLY approval_merge_request_rules_users ADD CONSTRAINT fk_rails_bc8972fa55 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -11006,6 +25616,9 @@ ALTER TABLE ONLY elasticsearch_indexed_namespaces ALTER TABLE ONLY vulnerability_occurrence_identifiers ADD CONSTRAINT fk_rails_be2e49e1d0 FOREIGN KEY (identifier_id) REFERENCES vulnerability_identifiers(id) ON DELETE CASCADE; +ALTER TABLE ONLY alert_management_http_integrations + ADD CONSTRAINT fk_rails_bec49f52cc FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerability_occurrences ADD CONSTRAINT fk_rails_bf5b788ca7 FOREIGN KEY (scanner_id) REFERENCES vulnerability_scanners(id) ON DELETE CASCADE; @@ -11015,8 +25628,8 @@ ALTER TABLE ONLY resource_weight_events ALTER TABLE ONLY design_management_designs ADD CONSTRAINT fk_rails_bfe283ec3c FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; -ALTER TABLE ONLY u2f_registrations - ADD CONSTRAINT fk_rails_bfe6a84544 FOREIGN KEY (user_id) REFERENCES users(id); +ALTER TABLE ONLY atlassian_identities + ADD CONSTRAINT fk_rails_c02928bc18 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; ALTER TABLE ONLY serverless_domain_cluster ADD CONSTRAINT fk_rails_c09009dee1 FOREIGN KEY (pages_domain_id) REFERENCES pages_domains(id) ON DELETE CASCADE; @@ -11024,44 +25637,86 @@ ALTER TABLE ONLY serverless_domain_cluster ALTER TABLE ONLY labels ADD CONSTRAINT fk_rails_c1ac5161d8 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY backup_labels + ADD CONSTRAINT fk_rails_c1ac5161d8 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY project_feature_usages ADD CONSTRAINT fk_rails_c22a50024b FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY user_canonical_emails + ADD CONSTRAINT fk_rails_c2bd828b51 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY project_repositories ADD CONSTRAINT fk_rails_c3258dc63b FOREIGN KEY (shard_id) REFERENCES shards(id) ON DELETE RESTRICT; +ALTER TABLE ONLY packages_nuget_dependency_link_metadata + ADD CONSTRAINT fk_rails_c3313ee2e4 FOREIGN KEY (dependency_link_id) REFERENCES packages_dependency_links(id) ON DELETE CASCADE; + +ALTER TABLE ONLY group_deploy_keys_groups + ADD CONSTRAINT fk_rails_c3854f19f5 FOREIGN KEY (group_deploy_key_id) REFERENCES group_deploy_keys(id) ON DELETE CASCADE; + +ALTER TABLE ONLY pages_deployments + ADD CONSTRAINT fk_rails_c3a90cf29b FOREIGN KEY (ci_build_id) REFERENCES ci_builds(id) ON DELETE SET NULL; + ALTER TABLE ONLY merge_request_user_mentions ADD CONSTRAINT fk_rails_c440b9ea31 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE; ALTER TABLE ONLY ci_job_artifacts ADD CONSTRAINT fk_rails_c5137cb2c1 FOREIGN KEY (job_id) REFERENCES ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY packages_events + ADD CONSTRAINT fk_rails_c6c20d0094 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE SET NULL; + ALTER TABLE ONLY project_settings ADD CONSTRAINT fk_rails_c6df6e6328 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY container_expiration_policies ADD CONSTRAINT fk_rails_c7360f09ad FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY wiki_page_meta + ADD CONSTRAINT fk_rails_c7a0c59cf1 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY scim_oauth_access_tokens ADD CONSTRAINT fk_rails_c84404fb6c FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; ALTER TABLE ONLY vulnerability_occurrences ADD CONSTRAINT fk_rails_c8661a61eb FOREIGN KEY (primary_identifier_id) REFERENCES vulnerability_identifiers(id) ON DELETE CASCADE; +ALTER TABLE ONLY project_export_jobs + ADD CONSTRAINT fk_rails_c88d8db2e1 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY resource_state_events + ADD CONSTRAINT fk_rails_c913c64977 FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE; + +ALTER TABLE ONLY resource_milestone_events + ADD CONSTRAINT fk_rails_c940fb9fc5 FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE CASCADE; + ALTER TABLE ONLY gpg_signatures ADD CONSTRAINT fk_rails_c97176f5f7 FOREIGN KEY (gpg_key_id) REFERENCES gpg_keys(id) ON DELETE SET NULL; ALTER TABLE ONLY board_group_recent_visits ADD CONSTRAINT fk_rails_ca04c38720 FOREIGN KEY (board_id) REFERENCES boards(id) ON DELETE CASCADE; +ALTER TABLE ONLY boards_epic_board_positions + ADD CONSTRAINT fk_rails_cb4563dd6e FOREIGN KEY (epic_board_id) REFERENCES boards_epic_boards(id) ON DELETE CASCADE; + +ALTER TABLE ONLY vulnerability_finding_links + ADD CONSTRAINT fk_rails_cbdfde27ce FOREIGN KEY (vulnerability_occurrence_id) REFERENCES vulnerability_occurrences(id) ON DELETE CASCADE; + ALTER TABLE ONLY issues_self_managed_prometheus_alert_events ADD CONSTRAINT fk_rails_cc5d88bbb0 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; +ALTER TABLE ONLY operations_strategies_user_lists + ADD CONSTRAINT fk_rails_ccb7e4bc0b FOREIGN KEY (user_list_id) REFERENCES operations_user_lists(id) ON DELETE CASCADE; + ALTER TABLE ONLY issue_tracker_data ADD CONSTRAINT fk_rails_ccc0840427 FOREIGN KEY (service_id) REFERENCES services(id) ON DELETE CASCADE; -ALTER TABLE ONLY analytics_repository_file_edits - ADD CONSTRAINT fk_rails_ce1d13b872 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY resource_milestone_events + ADD CONSTRAINT fk_rails_cedf8cce4d FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL; + +ALTER TABLE ONLY resource_iteration_events + ADD CONSTRAINT fk_rails_cee126f66c FOREIGN KEY (iteration_id) REFERENCES sprints(id) ON DELETE CASCADE; ALTER TABLE ONLY epic_metrics ADD CONSTRAINT fk_rails_d071904753 FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE; @@ -11069,9 +25724,18 @@ ALTER TABLE ONLY epic_metrics ALTER TABLE ONLY subscriptions ADD CONSTRAINT fk_rails_d0c8bda804 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY operations_strategies + ADD CONSTRAINT fk_rails_d183b6e6dd FOREIGN KEY (feature_flag_id) REFERENCES operations_feature_flags(id) ON DELETE CASCADE; + ALTER TABLE ONLY project_mirror_data ADD CONSTRAINT fk_rails_d1aad367d7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY cluster_agent_tokens + ADD CONSTRAINT fk_rails_d1d26abc25 FOREIGN KEY (agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE; + +ALTER TABLE ONLY requirements_management_test_reports + ADD CONSTRAINT fk_rails_d1e8b498bf FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL; + ALTER TABLE ONLY pool_repositories ADD CONSTRAINT fk_rails_d2711daad4 FOREIGN KEY (source_project_id) REFERENCES projects(id) ON DELETE SET NULL; @@ -11081,27 +25745,45 @@ ALTER TABLE ONLY group_group_links ALTER TABLE ONLY vulnerability_issue_links ADD CONSTRAINT fk_rails_d459c19036 FOREIGN KEY (vulnerability_id) REFERENCES vulnerabilities(id) ON DELETE CASCADE; +ALTER TABLE ONLY alert_management_alert_assignees + ADD CONSTRAINT fk_rails_d47570ac62 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY geo_hashed_storage_attachments_events ADD CONSTRAINT fk_rails_d496b088e9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; -ALTER TABLE ONLY analytics_repository_file_edits - ADD CONSTRAINT fk_rails_d74fd62274 FOREIGN KEY (analytics_repository_file_id) REFERENCES analytics_repository_files(id) ON DELETE CASCADE; +ALTER TABLE ONLY merge_request_reviewers + ADD CONSTRAINT fk_rails_d9fec24b9d FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; + +ALTER TABLE ONLY jira_imports + ADD CONSTRAINT fk_rails_da617096ce FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL; ALTER TABLE ONLY issues_prometheus_alert_events ADD CONSTRAINT fk_rails_db5b756534 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; +ALTER TABLE ONLY board_user_preferences + ADD CONSTRAINT fk_rails_dbebdaa8fe FOREIGN KEY (board_id) REFERENCES boards(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerability_occurrence_pipelines ADD CONSTRAINT fk_rails_dc3ae04693 FOREIGN KEY (occurrence_id) REFERENCES vulnerability_occurrences(id) ON DELETE CASCADE; ALTER TABLE ONLY deployment_merge_requests ADD CONSTRAINT fk_rails_dcbce9f4df FOREIGN KEY (deployment_id) REFERENCES deployments(id) ON DELETE CASCADE; +ALTER TABLE ONLY packages_debian_group_component_files + ADD CONSTRAINT fk_rails_dd262386e9 FOREIGN KEY (component_id) REFERENCES packages_debian_group_components(id) ON DELETE RESTRICT; + ALTER TABLE ONLY user_callouts ADD CONSTRAINT fk_rails_ddfdd80f3d FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; ALTER TABLE ONLY vulnerability_feedback ADD CONSTRAINT fk_rails_debd54e456 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY packages_debian_project_distributions + ADD CONSTRAINT fk_rails_df44271a30 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE RESTRICT; + +ALTER TABLE ONLY incident_management_oncall_shifts + ADD CONSTRAINT fk_rails_df4feb286a FOREIGN KEY (rotation_id) REFERENCES incident_management_oncall_rotations(id) ON DELETE CASCADE; + ALTER TABLE ONLY analytics_cycle_analytics_group_stages ADD CONSTRAINT fk_rails_dfb37c880d FOREIGN KEY (end_event_label_id) REFERENCES labels(id) ON DELETE CASCADE; @@ -11123,18 +25805,30 @@ ALTER TABLE ONLY vulnerability_occurrence_identifiers ALTER TABLE ONLY serverless_domain_cluster ADD CONSTRAINT fk_rails_e59e868733 FOREIGN KEY (clusters_applications_knative_id) REFERENCES clusters_applications_knative(id) ON DELETE CASCADE; +ALTER TABLE ONLY vulnerability_external_issue_links + ADD CONSTRAINT fk_rails_e5ba7f7b13 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL; + ALTER TABLE ONLY approval_merge_request_rule_sources ADD CONSTRAINT fk_rails_e605a04f76 FOREIGN KEY (approval_merge_request_rule_id) REFERENCES approval_merge_request_rules(id) ON DELETE CASCADE; ALTER TABLE ONLY prometheus_alerts ADD CONSTRAINT fk_rails_e6351447ec FOREIGN KEY (prometheus_metric_id) REFERENCES prometheus_metrics(id) ON DELETE CASCADE; +ALTER TABLE ONLY requirements_management_test_reports + ADD CONSTRAINT fk_rails_e67d085910 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE SET NULL; + ALTER TABLE ONLY merge_request_metrics ADD CONSTRAINT fk_rails_e6d7c24d1b FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; ALTER TABLE ONLY draft_notes ADD CONSTRAINT fk_rails_e753681674 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; +ALTER TABLE ONLY dast_site_tokens + ADD CONSTRAINT fk_rails_e84f721a8e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY group_deploy_keys_groups + ADD CONSTRAINT fk_rails_e87145115d FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY description_versions ADD CONSTRAINT fk_rails_e8f4caf9c7 FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE; @@ -11147,8 +25841,29 @@ ALTER TABLE ONLY merge_request_blocks ALTER TABLE ONLY protected_branch_unprotect_access_levels ADD CONSTRAINT fk_rails_e9eb8dc025 FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE; -ALTER TABLE ONLY cluster_providers_aws - ADD CONSTRAINT fk_rails_ed1fdfaeb2 FOREIGN KEY (created_by_user_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY ci_test_case_failures + ADD CONSTRAINT fk_rails_eab6349715 FOREIGN KEY (test_case_id) REFERENCES ci_test_cases(id) ON DELETE CASCADE; + +ALTER TABLE ONLY alert_management_alert_user_mentions + ADD CONSTRAINT fk_rails_eb2de0cdef FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE; + +ALTER TABLE ONLY snippet_statistics + ADD CONSTRAINT fk_rails_ebc283ccf1 FOREIGN KEY (snippet_id) REFERENCES snippets(id) ON DELETE CASCADE; + +ALTER TABLE ONLY project_security_settings + ADD CONSTRAINT fk_rails_ed4abe1338 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY packages_debian_group_distributions + ADD CONSTRAINT fk_rails_ede0bb937f FOREIGN KEY (creator_id) REFERENCES users(id) ON DELETE SET NULL; + +ALTER TABLE ONLY experiment_subjects + ADD CONSTRAINT fk_rails_ede5754774 FOREIGN KEY (experiment_id) REFERENCES experiments(id) ON DELETE CASCADE; + +ALTER TABLE ONLY ci_daily_build_group_report_results + ADD CONSTRAINT fk_rails_ee072d13b3 FOREIGN KEY (last_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; + +ALTER TABLE ONLY packages_debian_group_architectures + ADD CONSTRAINT fk_rails_ef667d1b03 FOREIGN KEY (distribution_id) REFERENCES packages_debian_group_distributions(id) ON DELETE CASCADE; ALTER TABLE ONLY label_priorities ADD CONSTRAINT fk_rails_ef916d14fa FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -11162,6 +25877,12 @@ ALTER TABLE ONLY prometheus_alerts ALTER TABLE ONLY import_export_uploads ADD CONSTRAINT fk_rails_f129140f9e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY requirements + ADD CONSTRAINT fk_rails_f212e67e63 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY snippet_repositories + ADD CONSTRAINT fk_rails_f21f899728 FOREIGN KEY (shard_id) REFERENCES shards(id) ON DELETE RESTRICT; + ALTER TABLE ONLY ci_pipeline_chat_data ADD CONSTRAINT fk_rails_f300456b63 FOREIGN KEY (chat_name_id) REFERENCES chat_names(id) ON DELETE CASCADE; @@ -11174,6 +25895,15 @@ ALTER TABLE ONLY insights ALTER TABLE ONLY board_group_recent_visits ADD CONSTRAINT fk_rails_f410736518 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY resource_state_events + ADD CONSTRAINT fk_rails_f5827a7ccd FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL; + +ALTER TABLE ONLY packages_debian_group_components + ADD CONSTRAINT fk_rails_f5f1ef54c6 FOREIGN KEY (distribution_id) REFERENCES packages_debian_group_distributions(id) ON DELETE CASCADE; + +ALTER TABLE ONLY incident_management_oncall_shifts + ADD CONSTRAINT fk_rails_f6eef06841 FOREIGN KEY (participant_id) REFERENCES incident_management_oncall_participants(id) ON DELETE CASCADE; + ALTER TABLE ONLY design_user_mentions ADD CONSTRAINT fk_rails_f7075a53c1 FOREIGN KEY (design_id) REFERENCES design_management_designs(id) ON DELETE CASCADE; @@ -11195,6 +25925,15 @@ ALTER TABLE ONLY merge_trains ALTER TABLE ONLY ci_runner_namespaces ADD CONSTRAINT fk_rails_f9d9ed3308 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY vulnerability_finding_fingerprints + ADD CONSTRAINT fk_rails_fa411253b2 FOREIGN KEY (finding_id) REFERENCES vulnerability_occurrences(id) ON DELETE CASCADE; + +ALTER TABLE ONLY requirements_management_test_reports + ADD CONSTRAINT fk_rails_fb3308ad55 FOREIGN KEY (requirement_id) REFERENCES requirements(id) ON DELETE CASCADE; + +ALTER TABLE ONLY operations_feature_flags_issues + ADD CONSTRAINT fk_rails_fb4d2a7cb1 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; + ALTER TABLE ONLY board_project_recent_visits ADD CONSTRAINT fk_rails_fb6fc419cb FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -11204,6 +25943,12 @@ ALTER TABLE ONLY serverless_domain_cluster ALTER TABLE ONLY ci_job_variables ADD CONSTRAINT fk_rails_fbf3b34792 FOREIGN KEY (job_id) REFERENCES ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY packages_nuget_metadata + ADD CONSTRAINT fk_rails_fc0c19f5b4 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; + +ALTER TABLE ONLY experiment_users + ADD CONSTRAINT fk_rails_fd805f771a FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY cluster_groups ADD CONSTRAINT fk_rails_fdb8648a96 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; @@ -11213,14 +25958,26 @@ ALTER TABLE ONLY project_tracing_settings ALTER TABLE ONLY resource_label_events ADD CONSTRAINT fk_rails_fe91ece594 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL; -ALTER TABLE ONLY issue_milestones - ADD CONSTRAINT fk_rails_ff90aaa198 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; - ALTER TABLE ONLY ci_builds_metadata ADD CONSTRAINT fk_rails_ffcf702a02 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY services + ADD CONSTRAINT fk_services_inherit_from_id FOREIGN KEY (inherit_from_id) REFERENCES services(id) ON DELETE CASCADE; + ALTER TABLE ONLY timelogs ADD CONSTRAINT fk_timelogs_issues_issue_id FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; ALTER TABLE ONLY timelogs ADD CONSTRAINT fk_timelogs_merge_requests_merge_request_id FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; + +ALTER TABLE ONLY u2f_registrations + ADD CONSTRAINT fk_u2f_registrations_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + +ALTER TABLE product_analytics_events_experimental + ADD CONSTRAINT product_analytics_events_experimental_project_id_fkey FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY user_follow_users + ADD CONSTRAINT user_follow_users_followee_id_fkey FOREIGN KEY (followee_id) REFERENCES users(id) ON DELETE CASCADE; + +ALTER TABLE ONLY user_follow_users + ADD CONSTRAINT user_follow_users_follower_id_fkey FOREIGN KEY (follower_id) REFERENCES users(id) ON DELETE CASCADE; diff --git a/db/migrate/20200102140148_add_expanded_environment_name_to_ci_build_metadata.rb b/db/migrate/20200102140148_add_expanded_environment_name_to_ci_build_metadata.rb deleted file mode 100644 index 21520f86bf8..00000000000 --- a/db/migrate/20200102140148_add_expanded_environment_name_to_ci_build_metadata.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddExpandedEnvironmentNameToCiBuildMetadata < ActiveRecord::Migration[5.2] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def up - add_column :ci_builds_metadata, :expanded_environment_name, :string, limit: 255 - end - # rubocop:enable Migration/PreventStrings - - def down - remove_column :ci_builds_metadata, :expanded_environment_name - end -end diff --git a/db/migrate/20200102170221_add_storage_version_index_to_projects.rb b/db/migrate/20200102170221_add_storage_version_index_to_projects.rb deleted file mode 100644 index 8965b5eedb9..00000000000 --- a/db/migrate/20200102170221_add_storage_version_index_to_projects.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddStorageVersionIndexToProjects < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, :id, where: 'storage_version < 2 or storage_version IS NULL', name: 'index_on_id_partial_with_legacy_storage' - end - - def down - remove_concurrent_index :projects, :id, where: 'storage_version < 2 or storage_version IS NULL', name: 'index_on_id_partial_with_legacy_storage' - end -end diff --git a/db/migrate/20200103190741_add_column_for_instance_administrators_group.rb b/db/migrate/20200103190741_add_column_for_instance_administrators_group.rb deleted file mode 100644 index 5afc7dc6a4d..00000000000 --- a/db/migrate/20200103190741_add_column_for_instance_administrators_group.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddColumnForInstanceAdministratorsGroup < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - add_column :application_settings, :instance_administrators_group_id, :integer - end -end diff --git a/db/migrate/20200103192859_add_fk_for_instance_administrators_group.rb b/db/migrate/20200103192859_add_fk_for_instance_administrators_group.rb deleted file mode 100644 index 0ad37d6bd29..00000000000 --- a/db/migrate/20200103192859_add_fk_for_instance_administrators_group.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddFkForInstanceAdministratorsGroup < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key( - :application_settings, - :namespaces, - column: :instance_administrators_group_id, - on_delete: :nullify - ) - end - - def down - remove_foreign_key :application_settings, column: :instance_administrators_group_id - end -end diff --git a/db/migrate/20200103192914_add_index_for_instance_administrators_group.rb b/db/migrate/20200103192914_add_index_for_instance_administrators_group.rb deleted file mode 100644 index 703dcf5d0e3..00000000000 --- a/db/migrate/20200103192914_add_index_for_instance_administrators_group.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForInstanceAdministratorsGroup < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :application_settings, :instance_administrators_group_id - end - - def down - remove_concurrent_index :application_settings, :instance_administrators_group_id - end -end diff --git a/db/migrate/20200103195205_add_autoclose_referenced_issues_to_projects.rb b/db/migrate/20200103195205_add_autoclose_referenced_issues_to_projects.rb deleted file mode 100644 index db473434205..00000000000 --- a/db/migrate/20200103195205_add_autoclose_referenced_issues_to_projects.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddAutocloseReferencedIssuesToProjects < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - add_column :projects, :autoclose_referenced_issues, :boolean # rubocop:disable Migration/AddColumnsToWideTables - end -end diff --git a/db/migrate/20200104113850_add_forking_access_level_to_project_feature.rb b/db/migrate/20200104113850_add_forking_access_level_to_project_feature.rb deleted file mode 100644 index 2c5f764ebf3..00000000000 --- a/db/migrate/20200104113850_add_forking_access_level_to_project_feature.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddForkingAccessLevelToProjectFeature < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - add_column :project_features, :forking_access_level, :integer - end -end diff --git a/db/migrate/20200106085831_add_timestamps_to_packages_tags.rb b/db/migrate/20200106085831_add_timestamps_to_packages_tags.rb deleted file mode 100644 index 2720d9b3297..00000000000 --- a/db/migrate/20200106085831_add_timestamps_to_packages_tags.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddTimestampsToPackagesTags < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - # We disable these cops here because adding this column is safe. The table does not - # have any data in it. - # rubocop: disable Migration/AddIndex - def up - add_timestamps_with_timezone(:packages_tags, null: false) - add_index(:packages_tags, [:package_id, :updated_at], order: { updated_at: :desc }) - end - - # We disable these cops here because adding this column is safe. The table does not - # have any data in it. - # rubocop: disable Migration/RemoveIndex - def down - remove_index(:packages_tags, [:package_id, :updated_at]) - remove_timestamps(:packages_tags) - end -end diff --git a/db/migrate/20200107172020_add_timestamp_softwarelicensespolicy.rb b/db/migrate/20200107172020_add_timestamp_softwarelicensespolicy.rb deleted file mode 100644 index 0d62f3051ce..00000000000 --- a/db/migrate/20200107172020_add_timestamp_softwarelicensespolicy.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddTimestampSoftwarelicensespolicy < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - add_timestamps_with_timezone(:software_license_policies, null: true) - end - - def down - remove_timestamps(:software_license_policies) - end -end diff --git a/db/migrate/20200108100603_update_project_hooks_limit.rb b/db/migrate/20200108100603_update_project_hooks_limit.rb deleted file mode 100644 index 91533b69afa..00000000000 --- a/db/migrate/20200108100603_update_project_hooks_limit.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class UpdateProjectHooksLimit < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - return unless Gitlab.com? - - create_or_update_plan_limit('project_hooks', 'free', 100) - create_or_update_plan_limit('project_hooks', 'bronze', 100) - create_or_update_plan_limit('project_hooks', 'silver', 100) - end - - def down - return unless Gitlab.com? - - create_or_update_plan_limit('project_hooks', 'free', 10) - create_or_update_plan_limit('project_hooks', 'bronze', 20) - create_or_update_plan_limit('project_hooks', 'silver', 30) - end -end diff --git a/db/migrate/20200108155731_create_indexes_for_project_api_created_at_order.rb b/db/migrate/20200108155731_create_indexes_for_project_api_created_at_order.rb deleted file mode 100644 index 2356f08b681..00000000000 --- a/db/migrate/20200108155731_create_indexes_for_project_api_created_at_order.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class CreateIndexesForProjectApiCreatedAtOrder < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, %i(visibility_level created_at id), order: { id: :desc }, name: 'index_projects_on_visibility_level_created_at_id_desc' - add_concurrent_index :projects, %i(visibility_level created_at id), order: { created_at: :desc, id: :desc }, name: 'index_projects_on_visibility_level_created_at_desc_id_desc' - remove_concurrent_index_by_name :projects, 'index_projects_on_visibility_level_and_created_at_and_id' - end - - def down - add_concurrent_index :projects, %i(visibility_level created_at id), name: 'index_projects_on_visibility_level_and_created_at_and_id' - remove_concurrent_index_by_name :projects, 'index_projects_on_visibility_level_created_at_id_desc' - remove_concurrent_index_by_name :projects, 'index_projects_on_visibility_level_created_at_desc_id_desc' - end -end diff --git a/db/migrate/20200108233040_remove_index_project_mirror_data_on_jid.rb b/db/migrate/20200108233040_remove_index_project_mirror_data_on_jid.rb deleted file mode 100644 index 86a69275cb7..00000000000 --- a/db/migrate/20200108233040_remove_index_project_mirror_data_on_jid.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexProjectMirrorDataOnJid < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index :project_mirror_data, :jid - end - - def down - add_concurrent_index :project_mirror_data, :jid - end -end diff --git a/db/migrate/20200109030418_add_sorting_index_to_packages.rb b/db/migrate/20200109030418_add_sorting_index_to_packages.rb deleted file mode 100644 index 989f3de3c04..00000000000 --- a/db/migrate/20200109030418_add_sorting_index_to_packages.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddSortingIndexToPackages < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :packages_packages, [:project_id, :created_at] - add_concurrent_index :packages_packages, [:project_id, :version] - add_concurrent_index :packages_packages, [:project_id, :package_type] - end - - def down - remove_concurrent_index :packages_packages, [:project_id, :created_at] - remove_concurrent_index :packages_packages, [:project_id, :version] - remove_concurrent_index :packages_packages, [:project_id, :package_type] - end -end diff --git a/db/migrate/20200109085206_create_approval_project_rules_protected_branches.rb b/db/migrate/20200109085206_create_approval_project_rules_protected_branches.rb deleted file mode 100644 index 4e75f7d41fd..00000000000 --- a/db/migrate/20200109085206_create_approval_project_rules_protected_branches.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CreateApprovalProjectRulesProtectedBranches < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - create_table :approval_project_rules_protected_branches, id: false do |t| - t.references :approval_project_rule, - null: false, - index: false, - foreign_key: { on_delete: :cascade } - t.references :protected_branch, - null: false, - index: { name: 'index_approval_project_rules_protected_branches_pb_id' }, - foreign_key: { on_delete: :cascade } - t.index [:approval_project_rule_id, :protected_branch_id], name: 'index_approval_project_rules_protected_branches_unique', unique: true, using: :btree - end - end -end diff --git a/db/migrate/20200109233938_remove_project_id_index_from_packages.rb b/db/migrate/20200109233938_remove_project_id_index_from_packages.rb deleted file mode 100644 index e806c5d5a18..00000000000 --- a/db/migrate/20200109233938_remove_project_id_index_from_packages.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveProjectIdIndexFromPackages < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index :packages_packages, [:project_id] - end - - def down - add_concurrent_index :packages_packages, [:project_id] - end -end diff --git a/db/migrate/20200110089001_fix_invalid_epic_sourcing_milestone_ids.rb b/db/migrate/20200110089001_fix_invalid_epic_sourcing_milestone_ids.rb deleted file mode 100644 index 04f65c3a810..00000000000 --- a/db/migrate/20200110089001_fix_invalid_epic_sourcing_milestone_ids.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class FixInvalidEpicSourcingMilestoneIds < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def up - nullify_invalid_data(:start_date_sourcing_milestone_id) - nullify_invalid_data(:due_date_sourcing_milestone_id) - end - - def down - # no-op - end - - private - - def nullify_invalid_data(column_name) - execute(<<-SQL.squish) - UPDATE epics - SET #{column_name} = null - WHERE #{column_name} NOT IN (SELECT id FROM milestones); - SQL - end -end diff --git a/db/migrate/20200110090153_validate_foreign_key_epic_start_date_sourcing_milestone.rb b/db/migrate/20200110090153_validate_foreign_key_epic_start_date_sourcing_milestone.rb deleted file mode 100644 index 26ddf44cfeb..00000000000 --- a/db/migrate/20200110090153_validate_foreign_key_epic_start_date_sourcing_milestone.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class ValidateForeignKeyEpicStartDateSourcingMilestone < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - validate_foreign_key(:epics, :start_date_sourcing_milestone_id) - end - - def down - # no-op - end -end diff --git a/db/migrate/20200110144316_add_indexes_for_projects_api.rb b/db/migrate/20200110144316_add_indexes_for_projects_api.rb deleted file mode 100644 index 6b0ca252456..00000000000 --- a/db/migrate/20200110144316_add_indexes_for_projects_api.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class AddIndexesForProjectsApi < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - COLUMNS = %i(created_at last_activity_at updated_at name path) - - def up - COLUMNS.each do |column| - add_concurrent_index :projects, [column, :id], where: 'visibility_level = 20', order: { id: :desc }, name: "index_projects_api_vis20_#{column}_id_desc" - add_concurrent_index :projects, [column, :id], where: 'visibility_level = 20', name: "index_projects_api_vis20_#{column}" - end - - remove_concurrent_index_by_name :projects, 'index_projects_on_visibility_level_created_at_id_desc' - remove_concurrent_index_by_name :projects, 'index_projects_on_visibility_level_created_at_desc_id_desc' - end - - def down - add_concurrent_index :projects, %i(visibility_level created_at id), order: { id: :desc }, name: 'index_projects_on_visibility_level_created_at_id_desc' - add_concurrent_index :projects, %i(visibility_level created_at id), order: { created_at: :desc, id: :desc }, name: 'index_projects_on_visibility_level_created_at_desc_id_desc' - - COLUMNS.each do |column| - remove_concurrent_index_by_name :projects, "index_projects_api_vis20_#{column}_id_desc" - remove_concurrent_index_by_name :projects, "index_projects_api_vis20_#{column}" - end - end -end diff --git a/db/migrate/20200110203532_validate_foreign_key_epic_due_date_sourcing_milestone.rb b/db/migrate/20200110203532_validate_foreign_key_epic_due_date_sourcing_milestone.rb deleted file mode 100644 index 2ff48715068..00000000000 --- a/db/migrate/20200110203532_validate_foreign_key_epic_due_date_sourcing_milestone.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class ValidateForeignKeyEpicDueDateSourcingMilestone < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - validate_foreign_key(:epics, :due_date_sourcing_milestone_id) - end - - def down - # no-op - end -end diff --git a/db/migrate/20200113133352_add_indexes_for_projects_api_authenticated.rb b/db/migrate/20200113133352_add_indexes_for_projects_api_authenticated.rb deleted file mode 100644 index 53d317b3321..00000000000 --- a/db/migrate/20200113133352_add_indexes_for_projects_api_authenticated.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -class AddIndexesForProjectsApiAuthenticated < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - COLUMNS = %i(updated_at name) - - def up - add_concurrent_index :projects, %i(created_at id), order: { id: :desc }, name: 'index_projects_api_created_at_id_desc' - - add_concurrent_index :projects, %i(last_activity_at id), name: 'index_projects_on_last_activity_at_and_id' - remove_concurrent_index :projects, :last_activity_at - add_concurrent_index :projects, %i(last_activity_at id), order: { id: :desc }, name: 'index_projects_api_last_activity_at_id_desc' - - add_concurrent_index :projects, %i(path id), name: 'index_projects_on_path_and_id' - remove_concurrent_index_by_name :projects, 'index_projects_on_path' - add_concurrent_index :projects, %i(path id), order: { id: :desc }, name: 'index_projects_api_path_id_desc' - - COLUMNS.each do |column| - add_concurrent_index :projects, [column, :id], name: "index_projects_on_#{column}_and_id" - add_concurrent_index :projects, [column, :id], order: { id: :desc }, name: "index_projects_api_#{column}_id_desc" - end - end - - def down - remove_concurrent_index_by_name :projects, 'index_projects_api_created_at_id_desc' - - remove_concurrent_index_by_name :projects, 'index_projects_on_last_activity_at_and_id' - add_concurrent_index :projects, :last_activity_at, name: 'index_projects_on_last_activity_at' - remove_concurrent_index_by_name :projects, 'index_projects_api_last_activity_at_id_desc' - - remove_concurrent_index_by_name :projects, 'index_projects_on_path_and_id' - add_concurrent_index :projects, :path, name: 'index_projects_on_path' - remove_concurrent_index_by_name :projects, 'index_projects_api_path_id_desc' - - COLUMNS.each do |column| - remove_concurrent_index_by_name :projects, "index_projects_on_#{column}_and_id" - remove_concurrent_index_by_name :projects, "index_projects_api_#{column}_id_desc" - end - end -end diff --git a/db/migrate/20200114140305_add_fields_to_application_settings_for_merge_requests_approvals.rb b/db/migrate/20200114140305_add_fields_to_application_settings_for_merge_requests_approvals.rb deleted file mode 100644 index 5e035f91f24..00000000000 --- a/db/migrate/20200114140305_add_fields_to_application_settings_for_merge_requests_approvals.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class AddFieldsToApplicationSettingsForMergeRequestsApprovals < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def up - add_column(:application_settings, - :disable_overriding_approvers_per_merge_request, - :boolean, - default: false, - null: false) - add_column(:application_settings, - :prevent_merge_requests_author_approval, - :boolean, - default: false, - null: false) - add_column(:application_settings, - :prevent_merge_requests_committers_approval, - :boolean, - default: false, - null: false) - end - - def down - remove_column(:application_settings, :disable_overriding_approvers_per_merge_request) - remove_column(:application_settings, :prevent_merge_requests_author_approval) - remove_column(:application_settings, :prevent_merge_requests_committers_approval) - end -end diff --git a/db/migrate/20200114204949_add_index_to_sentry_issues_sentry_issue_identifier.rb b/db/migrate/20200114204949_add_index_to_sentry_issues_sentry_issue_identifier.rb deleted file mode 100644 index 05b9e6d5958..00000000000 --- a/db/migrate/20200114204949_add_index_to_sentry_issues_sentry_issue_identifier.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToSentryIssuesSentryIssueIdentifier < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :sentry_issues, :sentry_issue_identifier - end - - def down - remove_concurrent_index :sentry_issues, :sentry_issue_identifier - end -end diff --git a/db/migrate/20200115135132_add_retry_count_and_group_id_to_import_failures.rb b/db/migrate/20200115135132_add_retry_count_and_group_id_to_import_failures.rb deleted file mode 100644 index 8f62aaba60e..00000000000 --- a/db/migrate/20200115135132_add_retry_count_and_group_id_to_import_failures.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddRetryCountAndGroupIdToImportFailures < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - add_column :import_failures, :retry_count, :integer - add_column :import_failures, :group_id, :integer - change_column_null(:import_failures, :project_id, true) - end -end diff --git a/db/migrate/20200115135234_add_group_index_and_fk_to_import_failures.rb b/db/migrate/20200115135234_add_group_index_and_fk_to_import_failures.rb deleted file mode 100644 index c7f2354440b..00000000000 --- a/db/migrate/20200115135234_add_group_index_and_fk_to_import_failures.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddGroupIndexAndFkToImportFailures < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - GROUP_INDEX = 'index_import_failures_on_group_id_not_null' - - disable_ddl_transaction! - - def up - add_concurrent_index(:import_failures, :group_id, where: 'group_id IS NOT NULL', name: GROUP_INDEX) - - add_concurrent_foreign_key(:import_failures, :namespaces, column: :group_id) - end - - def down - remove_foreign_key(:import_failures, column: :group_id) - - remove_concurrent_index_by_name(:import_failures, GROUP_INDEX) - end -end diff --git a/db/migrate/20200116051619_drop_background_migration_jobs.rb b/db/migrate/20200116051619_drop_background_migration_jobs.rb deleted file mode 100644 index f492ec0af9d..00000000000 --- a/db/migrate/20200116051619_drop_background_migration_jobs.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class DropBackgroundMigrationJobs < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - DROPPED_JOB_CLASS = 'ActivatePrometheusServicesForSharedClusterApplications' - QUEUE = 'background_migration' - - def up - Sidekiq::Queue.new(QUEUE).each do |job| - klass, project_id, *should_be_empty = job.args - next unless klass == DROPPED_JOB_CLASS && project_id.is_a?(Integer) && should_be_empty.empty? - - job.delete - end - end -end diff --git a/db/migrate/20200116175538_update_timestamp_softwarelicensespolicy.rb b/db/migrate/20200116175538_update_timestamp_softwarelicensespolicy.rb deleted file mode 100644 index 5ed797e33a3..00000000000 --- a/db/migrate/20200116175538_update_timestamp_softwarelicensespolicy.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class UpdateTimestampSoftwarelicensespolicy < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - time = Time.zone.now - - update_column_in_batches(:software_license_policies, :created_at, time) do |table, query| - query.where(table[:created_at].eq(nil)) - end - - update_column_in_batches(:software_license_policies, :updated_at, time) do |table, query| - query.where(table[:updated_at].eq(nil)) - end - end - - def down - # no-op - end -end diff --git a/db/migrate/20200117112554_update_project_index_to_import_failures.rb b/db/migrate/20200117112554_update_project_index_to_import_failures.rb deleted file mode 100644 index 888a9bec778..00000000000 --- a/db/migrate/20200117112554_update_project_index_to_import_failures.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class UpdateProjectIndexToImportFailures < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - PROJECT_INDEX_OLD = 'index_import_failures_on_project_id' - PROJECT_INDEX_NEW = 'index_import_failures_on_project_id_not_null' - - disable_ddl_transaction! - - def up - add_concurrent_index(:import_failures, :project_id, where: 'project_id IS NOT NULL', name: PROJECT_INDEX_NEW) - remove_concurrent_index_by_name(:import_failures, PROJECT_INDEX_OLD) - end - - def down - add_concurrent_index(:import_failures, :project_id, name: PROJECT_INDEX_OLD) - remove_concurrent_index_by_name(:import_failures, PROJECT_INDEX_NEW) - end -end diff --git a/db/migrate/20200117194830_add_iid_to_operations_feature_flags.rb b/db/migrate/20200117194830_add_iid_to_operations_feature_flags.rb deleted file mode 100644 index b18d9788b9f..00000000000 --- a/db/migrate/20200117194830_add_iid_to_operations_feature_flags.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddIidToOperationsFeatureFlags < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def up - add_column :operations_feature_flags, :iid, :integer - end - - def down - remove_column :operations_feature_flags, :iid - end -end diff --git a/db/migrate/20200117194840_add_index_on_operations_feature_flags_iid.rb b/db/migrate/20200117194840_add_index_on_operations_feature_flags_iid.rb deleted file mode 100644 index 67dedb56ec1..00000000000 --- a/db/migrate/20200117194840_add_index_on_operations_feature_flags_iid.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnOperationsFeatureFlagsIid < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :operations_feature_flags, [:project_id, :iid], unique: true - end - - def down - remove_concurrent_index :operations_feature_flags, [:project_id, :iid] - end -end diff --git a/db/migrate/20200121132641_update_timestamp_softwarelicensespolicy_not_null.rb b/db/migrate/20200121132641_update_timestamp_softwarelicensespolicy_not_null.rb deleted file mode 100644 index 1da96b470ef..00000000000 --- a/db/migrate/20200121132641_update_timestamp_softwarelicensespolicy_not_null.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class UpdateTimestampSoftwarelicensespolicyNotNull < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def change - change_column_null(:software_license_policies, :created_at, false) - change_column_null(:software_license_policies, :updated_at, false) - end -end diff --git a/db/migrate/20200121192942_create_geo_events.rb b/db/migrate/20200121192942_create_geo_events.rb deleted file mode 100644 index 0c885e8524c..00000000000 --- a/db/migrate/20200121192942_create_geo_events.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class CreateGeoEvents < ActiveRecord::Migration[5.2] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :geo_events do |t| - t.string :replicable_name, limit: 255, null: false - t.string :event_name, limit: 255, null: false - t.jsonb :payload, default: {}, null: false - t.datetime_with_timezone :created_at, null: false - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200121194000_add_geo_event_id_to_geo_event_log.rb b/db/migrate/20200121194000_add_geo_event_id_to_geo_event_log.rb deleted file mode 100644 index 720995164b2..00000000000 --- a/db/migrate/20200121194000_add_geo_event_id_to_geo_event_log.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddGeoEventIdToGeoEventLog < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - add_column :geo_event_log, :geo_event_id, :integer - end -end diff --git a/db/migrate/20200121194048_add_geo_event_id_index_to_geo_event_log.rb b/db/migrate/20200121194048_add_geo_event_id_index_to_geo_event_log.rb deleted file mode 100644 index 9b0ec12c959..00000000000 --- a/db/migrate/20200121194048_add_geo_event_id_index_to_geo_event_log.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddGeoEventIdIndexToGeoEventLog < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :geo_event_log, :geo_event_id, - where: "(geo_event_id IS NOT NULL)", - using: :btree, - name: 'index_geo_event_log_on_geo_event_id' - end - - def down - remove_concurrent_index :geo_event_log, :geo_event_id, name: 'index_geo_event_log_on_geo_event_id' - end -end diff --git a/db/migrate/20200121194154_add_geo_events_foreign_key.rb b/db/migrate/20200121194154_add_geo_events_foreign_key.rb deleted file mode 100644 index b5e16e22989..00000000000 --- a/db/migrate/20200121194154_add_geo_events_foreign_key.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddGeoEventsForeignKey < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :geo_event_log, :geo_events, - column: :geo_event_id, - name: 'fk_geo_event_log_on_geo_event_id', - on_delete: :cascade - end - - def down - remove_foreign_key_without_error :geo_event_log, column: :geo_event_id, name: 'fk_geo_event_log_on_geo_event_id' - end -end diff --git a/db/migrate/20200121200203_create_group_deploy_tokens.rb b/db/migrate/20200121200203_create_group_deploy_tokens.rb deleted file mode 100644 index 55b30745fcf..00000000000 --- a/db/migrate/20200121200203_create_group_deploy_tokens.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class CreateGroupDeployTokens < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - create_table :group_deploy_tokens do |t| - t.timestamps_with_timezone null: false - - t.references :group, index: false, null: false, foreign_key: { to_table: :namespaces, on_delete: :cascade } - t.references :deploy_token, null: false, foreign_key: { on_delete: :cascade } - - t.index [:group_id, :deploy_token_id], unique: true, name: 'index_group_deploy_tokens_on_group_and_deploy_token_ids' - end - end -end diff --git a/db/migrate/20200122161638_add_deploy_token_type_to_deploy_tokens.rb b/db/migrate/20200122161638_add_deploy_token_type_to_deploy_tokens.rb deleted file mode 100644 index 99459199709..00000000000 --- a/db/migrate/20200122161638_add_deploy_token_type_to_deploy_tokens.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddDeployTokenTypeToDeployTokens < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - - def up - add_column_with_default :deploy_tokens, :deploy_token_type, :integer, default: 2, limit: 2, allow_null: false # rubocop:disable Migration/AddColumnWithDefault - end - - def down - remove_column :deploy_tokens, :deploy_token_type - end -end diff --git a/db/migrate/20200123040535_add_multi_column_index_on_lfs_objects_projects.rb b/db/migrate/20200123040535_add_multi_column_index_on_lfs_objects_projects.rb deleted file mode 100644 index 36ccfa4743e..00000000000 --- a/db/migrate/20200123040535_add_multi_column_index_on_lfs_objects_projects.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddMultiColumnIndexOnLfsObjectsProjects < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :lfs_objects_projects, [:project_id, :lfs_object_id] - end - - def down - remove_concurrent_index :lfs_objects_projects, [:project_id, :lfs_object_id] - end -end diff --git a/db/migrate/20200123045415_remove_project_id_index_on_lfs_objects_projects.rb b/db/migrate/20200123045415_remove_project_id_index_on_lfs_objects_projects.rb deleted file mode 100644 index 540383e8808..00000000000 --- a/db/migrate/20200123045415_remove_project_id_index_on_lfs_objects_projects.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveProjectIdIndexOnLfsObjectsProjects < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index :lfs_objects_projects, :project_id - end - - def down - add_concurrent_index :lfs_objects_projects, :project_id - end -end diff --git a/db/migrate/20200123090839_remove_analytics_repository_table_fks_on_projects.rb b/db/migrate/20200123090839_remove_analytics_repository_table_fks_on_projects.rb deleted file mode 100644 index 18fd349df2a..00000000000 --- a/db/migrate/20200123090839_remove_analytics_repository_table_fks_on_projects.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class RemoveAnalyticsRepositoryTableFksOnProjects < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - # Requires ExclusiveLock on all tables. analytics_* tables are empty - with_lock_retries do - remove_foreign_key_if_exists(:analytics_repository_files, :projects) - end - - with_lock_retries do - remove_foreign_key_if_exists(:analytics_repository_file_edits, :projects) if table_exists?(:analytics_repository_file_edits) # this table might be already dropped on development environment - end - - with_lock_retries do - remove_foreign_key_if_exists(:analytics_repository_file_commits, :projects) - end - end - - def down - add_concurrent_foreign_key(:analytics_repository_files, :projects, column: :project_id, on_delete: :cascade) - add_concurrent_foreign_key(:analytics_repository_file_edits, :projects, column: :project_id, on_delete: :cascade) - add_concurrent_foreign_key(:analytics_repository_file_commits, :projects, column: :project_id, on_delete: :cascade) - end -end diff --git a/db/migrate/20200123091422_remove_analytics_repository_files_fk_on_other_analytics_tables.rb b/db/migrate/20200123091422_remove_analytics_repository_files_fk_on_other_analytics_tables.rb deleted file mode 100644 index a436ad8d529..00000000000 --- a/db/migrate/20200123091422_remove_analytics_repository_files_fk_on_other_analytics_tables.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class RemoveAnalyticsRepositoryFilesFkOnOtherAnalyticsTables < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - # Requires ExclusiveLock on all tables. analytics_* tables are empty - with_lock_retries do - remove_foreign_key_if_exists(:analytics_repository_file_edits, :analytics_repository_files) if table_exists?(:analytics_repository_file_edits) # this table might be already dropped on development environment - end - - with_lock_retries do - remove_foreign_key_if_exists(:analytics_repository_file_commits, :analytics_repository_files) - end - end - - def down - add_concurrent_foreign_key(:analytics_repository_file_edits, :analytics_repository_files, column: :analytics_repository_file_id, on_delete: :cascade) - add_concurrent_foreign_key(:analytics_repository_file_commits, :analytics_repository_files, column: :analytics_repository_file_id, on_delete: :cascade) - end -end diff --git a/db/migrate/20200123091622_drop_analytics_repository_files_table.rb b/db/migrate/20200123091622_drop_analytics_repository_files_table.rb deleted file mode 100644 index ed6746165a8..00000000000 --- a/db/migrate/20200123091622_drop_analytics_repository_files_table.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class DropAnalyticsRepositoryFilesTable < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - # Requires ExclusiveLock on the table. Not in use, no records, no FKs. - # rubocop:disable Migration/DropTable - drop_table :analytics_repository_files - # rubocop:enable Migration/DropTable - end - - def down - create_table :analytics_repository_files do |t| - t.bigint :project_id, null: false - t.string :file_path, limit: 4096, null: false - end - - add_index :analytics_repository_files, [:project_id, :file_path], unique: true - end -end diff --git a/db/migrate/20200123091734_drop_analytics_repository_file_commits_table.rb b/db/migrate/20200123091734_drop_analytics_repository_file_commits_table.rb deleted file mode 100644 index 2eb10a9056d..00000000000 --- a/db/migrate/20200123091734_drop_analytics_repository_file_commits_table.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class DropAnalyticsRepositoryFileCommitsTable < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - # Requires ExclusiveLock on the table. Not in use, no records, no FKs. - # rubocop:disable Migration/DropTable - drop_table :analytics_repository_file_commits - # rubocop:enable Migration/DropTable - end - - def down - create_table :analytics_repository_file_commits do |t| - t.bigint :analytics_repository_file_id, null: false - t.index :analytics_repository_file_id, name: 'index_analytics_repository_file_commits_file_id' - t.bigint :project_id, null: false - t.date :committed_date, null: false - t.integer :commit_count, limit: 2, null: false - end - - add_index :analytics_repository_file_commits, - [:project_id, :committed_date, :analytics_repository_file_id], - name: 'index_file_commits_on_committed_date_file_id_and_project_id', - unique: true - end -end diff --git a/db/migrate/20200123091854_drop_analytics_repository_file_edits_table.rb b/db/migrate/20200123091854_drop_analytics_repository_file_edits_table.rb deleted file mode 100644 index e4bdb6f6ec2..00000000000 --- a/db/migrate/20200123091854_drop_analytics_repository_file_edits_table.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class DropAnalyticsRepositoryFileEditsTable < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - # Requires ExclusiveLock on the table. Not in use, no records, no FKs. - # rubocop:disable Migration/DropTable - drop_table :analytics_repository_file_edits if table_exists?(:analytics_repository_file_edits) # this table might be already dropped on development environment - # rubocop:enable Migration/DropTable - end - - def down - create_table :analytics_repository_file_edits do |t| - t.bigint :project_id, null: false - t.index :project_id - t.bigint :analytics_repository_file_id, null: false - t.date :committed_date, null: false - t.integer :num_edits, null: false, default: 0 - end - - add_index :analytics_repository_file_edits, - [:analytics_repository_file_id, :committed_date, :project_id], - name: 'index_file_edits_on_committed_date_file_id_and_project_id', - unique: true - end -end diff --git a/db/migrate/20200124053531_add_source_to_import_failures.rb b/db/migrate/20200124053531_add_source_to_import_failures.rb deleted file mode 100644 index 2ca0bcba09f..00000000000 --- a/db/migrate/20200124053531_add_source_to_import_failures.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddSourceToImportFailures < ActiveRecord::Migration[5.2] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - add_column :import_failures, :source, :string, limit: 128 - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200124143014_add_restrict_deployment_order_to_project_ci_cd_settings.rb b/db/migrate/20200124143014_add_restrict_deployment_order_to_project_ci_cd_settings.rb deleted file mode 100644 index 6a222ce8d51..00000000000 --- a/db/migrate/20200124143014_add_restrict_deployment_order_to_project_ci_cd_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddRestrictDeploymentOrderToProjectCiCdSettings < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - add_column :project_ci_cd_settings, :forward_deployment_enabled, :boolean - end -end diff --git a/db/migrate/20200128105731_add_duration_to_merge_trains.rb b/db/migrate/20200128105731_add_duration_to_merge_trains.rb deleted file mode 100644 index a7aacaba5e1..00000000000 --- a/db/migrate/20200128105731_add_duration_to_merge_trains.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddDurationToMergeTrains < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - add_column :merge_trains, :merged_at, :datetime_with_timezone - add_column :merge_trains, :duration, :integer - end -end diff --git a/db/migrate/20200128141125_add_index_web_hooks_on_group_id.rb b/db/migrate/20200128141125_add_index_web_hooks_on_group_id.rb deleted file mode 100644 index 8c7f6426587..00000000000 --- a/db/migrate/20200128141125_add_index_web_hooks_on_group_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexWebHooksOnGroupId < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :web_hooks, :group_id, where: "type = 'GroupHook'" - end - - def down - remove_concurrent_index :web_hooks, :group_id, where: "type = 'GroupHook'" - end -end diff --git a/db/migrate/20200128184209_add_usage_to_pages_domains.rb b/db/migrate/20200128184209_add_usage_to_pages_domains.rb deleted file mode 100644 index 292490078cd..00000000000 --- a/db/migrate/20200128184209_add_usage_to_pages_domains.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddUsageToPagesDomains < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - PAGES_USAGE = 0 - - disable_ddl_transaction! - - def up - add_column_with_default :pages_domains, :usage, :integer, limit: 2, default: PAGES_USAGE, allow_null: false # rubocop:disable Migration/AddColumnWithDefault - end - - def down - remove_column :pages_domains, :usage - end -end diff --git a/db/migrate/20200129034515_update_indexes_of_pages_domains_add_usage_domain_wildcard_remove_domain.rb b/db/migrate/20200129034515_update_indexes_of_pages_domains_add_usage_domain_wildcard_remove_domain.rb deleted file mode 100644 index 2f13567c540..00000000000 --- a/db/migrate/20200129034515_update_indexes_of_pages_domains_add_usage_domain_wildcard_remove_domain.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class UpdateIndexesOfPagesDomainsAddUsageDomainWildcardRemoveDomain < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :pages_domains, :usage - add_concurrent_index :pages_domains, [:domain, :wildcard], unique: true - remove_concurrent_index :pages_domains, :domain - end - - def down - remove_concurrent_index :pages_domains, :usage - remove_concurrent_index :pages_domains, [:domain, :wildcard] - add_concurrent_index :pages_domains, :domain, unique: true - end -end diff --git a/db/migrate/20200129035446_rename_pages_domains_domain_type_to_scope.rb b/db/migrate/20200129035446_rename_pages_domains_domain_type_to_scope.rb deleted file mode 100644 index 74d9827e370..00000000000 --- a/db/migrate/20200129035446_rename_pages_domains_domain_type_to_scope.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RenamePagesDomainsDomainTypeToScope < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - rename_column_concurrently :pages_domains, :domain_type, :scope - end - - def down - undo_rename_column_concurrently :pages_domains, :domain_type, :scope - end -end diff --git a/db/migrate/20200129133716_add_resource_milestone_events_table.rb b/db/migrate/20200129133716_add_resource_milestone_events_table.rb deleted file mode 100644 index 681190a8744..00000000000 --- a/db/migrate/20200129133716_add_resource_milestone_events_table.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class AddResourceMilestoneEventsTable < ActiveRecord::Migration[5.2] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - def change - create_table :resource_milestone_events, id: :bigserial do |t| - t.references :user, null: false, foreign_key: { on_delete: :nullify }, - index: { name: 'index_resource_milestone_events_on_user_id' } - t.references :issue, null: true, foreign_key: { on_delete: :cascade }, - index: { name: 'index_resource_milestone_events_on_issue_id' } - t.references :merge_request, null: true, foreign_key: { on_delete: :cascade }, - index: { name: 'index_resource_milestone_events_on_merge_request_id' } - t.references :milestone, foreign_key: { on_delete: :cascade }, - index: { name: 'index_resource_milestone_events_on_milestone_id' } - - t.integer :action, limit: 2, null: false - t.integer :state, limit: 2, null: false - t.integer :cached_markdown_version - t.text :reference - t.text :reference_html - t.datetime_with_timezone :created_at, null: false - end - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20200129172428_add_index_on_audit_events_id_desc.rb b/db/migrate/20200129172428_add_index_on_audit_events_id_desc.rb deleted file mode 100644 index b9182c99ebf..00000000000 --- a/db/migrate/20200129172428_add_index_on_audit_events_id_desc.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnAuditEventsIdDesc < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - OLD_INDEX_NAME = 'index_audit_events_on_entity_id_and_entity_type' - NEW_INDEX_NAME = 'index_audit_events_on_entity_id_and_entity_type_and_id_desc' - - disable_ddl_transaction! - - def up - add_concurrent_index :audit_events, [:entity_id, :entity_type, :id], name: NEW_INDEX_NAME, - order: { entity_id: :asc, entity_type: :asc, id: :desc } - - remove_concurrent_index_by_name :audit_events, OLD_INDEX_NAME - end - - def down - add_concurrent_index :audit_events, [:entity_id, :entity_type], name: OLD_INDEX_NAME - - remove_concurrent_index_by_name :audit_events, NEW_INDEX_NAME - end -end diff --git a/db/migrate/20200130134335_add_cert_and_key_to_serverless_domain_cluster.rb b/db/migrate/20200130134335_add_cert_and_key_to_serverless_domain_cluster.rb deleted file mode 100644 index 81764aefe7c..00000000000 --- a/db/migrate/20200130134335_add_cert_and_key_to_serverless_domain_cluster.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddCertAndKeyToServerlessDomainCluster < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - # rubocop:disable Migration/AddLimitToTextColumns - def change - add_column :serverless_domain_cluster, :encrypted_key, :text - add_column :serverless_domain_cluster, :encrypted_key_iv, :string, limit: 255 - add_column :serverless_domain_cluster, :certificate, :text - end - # rubocop:enable Migration/AddLimitToTextColumns - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200130161817_drop_unneeded_indexes_for_projects_api_requests.rb b/db/migrate/20200130161817_drop_unneeded_indexes_for_projects_api_requests.rb deleted file mode 100644 index 50b98ab9dba..00000000000 --- a/db/migrate/20200130161817_drop_unneeded_indexes_for_projects_api_requests.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class DropUnneededIndexesForProjectsApiRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - - def up - indexes = %w( - index_projects_api_vis20_created_at_id_desc - index_projects_api_vis20_last_activity_at_id_desc - index_projects_api_vis20_updated_at_id_desc - index_projects_api_vis20_name_id_desc - index_projects_api_vis20_path_id_desc - ) - - indexes.each do |index| - remove_concurrent_index_by_name :projects, index - end - end - - def down - columns = %i(created_at last_activity_at updated_at name path) - - columns.each do |column| - add_concurrent_index :projects, [column, :id], where: 'visibility_level = 20', order: { id: :desc }, name: "index_projects_api_vis20_#{column}_id_desc" - end - end -end diff --git a/db/migrate/20200131140428_create_index_on_auto_stop_in.rb b/db/migrate/20200131140428_create_index_on_auto_stop_in.rb deleted file mode 100644 index 526e7dcfe30..00000000000 --- a/db/migrate/20200131140428_create_index_on_auto_stop_in.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class CreateIndexOnAutoStopIn < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :environments, %i[state auto_stop_at], where: "auto_stop_at IS NOT NULL AND state = 'available'" - end - - def down - remove_concurrent_index :environments, %i[state auto_stop_at] - end -end diff --git a/db/migrate/20200131181354_add_health_status_to_epics.rb b/db/migrate/20200131181354_add_health_status_to_epics.rb deleted file mode 100644 index 4e5f9ab138d..00000000000 --- a/db/migrate/20200131181354_add_health_status_to_epics.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddHealthStatusToEpics < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :epics, :health_status, :integer, limit: 2 - end -end diff --git a/db/migrate/20200131191754_add_health_status_to_issues.rb b/db/migrate/20200131191754_add_health_status_to_issues.rb deleted file mode 100644 index ca4e797f4b7..00000000000 --- a/db/migrate/20200131191754_add_health_status_to_issues.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddHealthStatusToIssues < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :issues, :health_status, :integer, limit: 2 - end -end diff --git a/db/migrate/20200202100932_add_service_desk_project_key.rb b/db/migrate/20200202100932_add_service_desk_project_key.rb deleted file mode 100644 index 5095e628b42..00000000000 --- a/db/migrate/20200202100932_add_service_desk_project_key.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddServiceDeskProjectKey < ActiveRecord::Migration[5.2] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - add_column :service_desk_settings, :project_key, :string, limit: 255 - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200203015140_add_id_to_design_management_designs_versions.rb b/db/migrate/20200203015140_add_id_to_design_management_designs_versions.rb deleted file mode 100644 index f809bc84fae..00000000000 --- a/db/migrate/20200203015140_add_id_to_design_management_designs_versions.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddIdToDesignManagementDesignsVersions < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :design_management_designs_versions, :id, :primary_key - end -end diff --git a/db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb b/db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb deleted file mode 100644 index 8e48490af77..00000000000 --- a/db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class DefaultLockVersionToZeroForMergeRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :merge_requests, :lock_version, from: nil, to: 0 - end - end - - def down - with_lock_retries do - change_column_default :merge_requests, :lock_version, from: 0, to: nil - end - end -end diff --git a/db/migrate/20200203025602_default_lock_version_to_zero_for_issues.rb b/db/migrate/20200203025602_default_lock_version_to_zero_for_issues.rb deleted file mode 100644 index 1265de70728..00000000000 --- a/db/migrate/20200203025602_default_lock_version_to_zero_for_issues.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class DefaultLockVersionToZeroForIssues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :issues, :lock_version, from: nil, to: 0 - end - end - - def down - with_lock_retries do - change_column_default :issues, :lock_version, from: 0, to: nil - end - end -end diff --git a/db/migrate/20200203025619_default_lock_version_to_zero_for_epics.rb b/db/migrate/20200203025619_default_lock_version_to_zero_for_epics.rb deleted file mode 100644 index b2af8cbe707..00000000000 --- a/db/migrate/20200203025619_default_lock_version_to_zero_for_epics.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class DefaultLockVersionToZeroForEpics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :epics, :lock_version, from: nil, to: 0 - end - end - - def down - with_lock_retries do - change_column_default :epics, :lock_version, from: 0, to: nil - end - end -end diff --git a/db/migrate/20200203025744_default_lock_version_to_zero_for_ci_builds.rb b/db/migrate/20200203025744_default_lock_version_to_zero_for_ci_builds.rb deleted file mode 100644 index f40bf7d6309..00000000000 --- a/db/migrate/20200203025744_default_lock_version_to_zero_for_ci_builds.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class DefaultLockVersionToZeroForCiBuilds < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :ci_builds, :lock_version, from: nil, to: 0 - end - end - - def down - with_lock_retries do - change_column_default :ci_builds, :lock_version, from: 0, to: nil - end - end -end diff --git a/db/migrate/20200203025801_default_lock_version_to_zero_for_ci_stages.rb b/db/migrate/20200203025801_default_lock_version_to_zero_for_ci_stages.rb deleted file mode 100644 index fd3194a742a..00000000000 --- a/db/migrate/20200203025801_default_lock_version_to_zero_for_ci_stages.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class DefaultLockVersionToZeroForCiStages < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :ci_stages, :lock_version, from: nil, to: 0 - end - end - - def down - with_lock_retries do - change_column_default :ci_stages, :lock_version, from: 0, to: nil - end - end -end diff --git a/db/migrate/20200203025821_default_lock_version_to_zero_for_ci_pipelines.rb b/db/migrate/20200203025821_default_lock_version_to_zero_for_ci_pipelines.rb deleted file mode 100644 index 6b4568cc7e8..00000000000 --- a/db/migrate/20200203025821_default_lock_version_to_zero_for_ci_pipelines.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class DefaultLockVersionToZeroForCiPipelines < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :ci_pipelines, :lock_version, from: nil, to: 0 - end - end - - def down - with_lock_retries do - change_column_default :ci_pipelines, :lock_version, from: 0, to: nil - end - end -end diff --git a/db/migrate/20200203173508_add_confirmed_attributes_to_vulnerabilities.rb b/db/migrate/20200203173508_add_confirmed_attributes_to_vulnerabilities.rb deleted file mode 100644 index 43a375c011f..00000000000 --- a/db/migrate/20200203173508_add_confirmed_attributes_to_vulnerabilities.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddConfirmedAttributesToVulnerabilities < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - add_column :vulnerabilities, :confirmed_by_id, :bigint - add_column :vulnerabilities, :confirmed_at, :datetime_with_timezone - end -end diff --git a/db/migrate/20200203183508_add_index_for_vulnerability_confirmed_by.rb b/db/migrate/20200203183508_add_index_for_vulnerability_confirmed_by.rb deleted file mode 100644 index dd50e7be893..00000000000 --- a/db/migrate/20200203183508_add_index_for_vulnerability_confirmed_by.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForVulnerabilityConfirmedBy < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerabilities, :confirmed_by_id - add_concurrent_foreign_key :vulnerabilities, :users, column: :confirmed_by_id, on_delete: :nullify - end - - def down - remove_foreign_key :vulnerabilities, column: :confirmed_by_id - remove_concurrent_index :vulnerabilities, :confirmed_by_id - end -end diff --git a/db/migrate/20200203232433_create_security_scan.rb b/db/migrate/20200203232433_create_security_scan.rb deleted file mode 100644 index a5fe73efbf2..00000000000 --- a/db/migrate/20200203232433_create_security_scan.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class CreateSecurityScan < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - create_table :security_scans, id: :bigserial do |t| - t.timestamps_with_timezone null: false - - t.references :build, - null: false, - index: false, - foreign_key: { to_table: :ci_builds, on_delete: :cascade }, - type: :bigint - - t.integer :scan_type, - null: false, - index: { name: "idx_security_scans_on_scan_type" }, - limit: 2 - - t.index [:build_id, :scan_type], name: "idx_security_scans_on_build_and_scan_type", unique: true - end - end -end diff --git a/db/migrate/20200204070729_add_elasticsearch_indexed_field_length_limit_to_application_settings.rb b/db/migrate/20200204070729_add_elasticsearch_indexed_field_length_limit_to_application_settings.rb deleted file mode 100644 index 7d478706613..00000000000 --- a/db/migrate/20200204070729_add_elasticsearch_indexed_field_length_limit_to_application_settings.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddElasticsearchIndexedFieldLengthLimitToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column :application_settings, :elasticsearch_indexed_field_length_limit, :integer, null: false, default: 0 - - if Gitlab.com? - execute 'UPDATE application_settings SET elasticsearch_indexed_field_length_limit = 20000' - end - end - - def down - remove_column :application_settings, :elasticsearch_indexed_field_length_limit - end -end diff --git a/db/migrate/20200204131054_change_broadcast_message_index.rb b/db/migrate/20200204131054_change_broadcast_message_index.rb deleted file mode 100644 index 9545eacd3a1..00000000000 --- a/db/migrate/20200204131054_change_broadcast_message_index.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class ChangeBroadcastMessageIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :broadcast_messages, %i(ends_at broadcast_type id), name: 'index_broadcast_message_on_ends_at_and_broadcast_type_and_id' - remove_concurrent_index_by_name :broadcast_messages, :index_broadcast_messages_on_starts_at_and_ends_at_and_id - end - - def down - add_concurrent_index :broadcast_messages, %i(starts_at ends_at id), name: 'index_broadcast_messages_on_starts_at_and_ends_at_and_id' - remove_concurrent_index_by_name :broadcast_messages, :index_broadcast_message_on_ends_at_and_broadcast_type_and_id - end -end diff --git a/db/migrate/20200204131831_create_daily_report_results.rb b/db/migrate/20200204131831_create_daily_report_results.rb deleted file mode 100644 index 6992b6317e1..00000000000 --- a/db/migrate/20200204131831_create_daily_report_results.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class CreateDailyReportResults < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :ci_daily_report_results do |t| - t.date :date, null: false - t.bigint :project_id, null: false - t.bigint :last_pipeline_id, null: false - t.float :value, null: false - t.integer :param_type, limit: 8, null: false - t.string :ref_path, null: false - t.string :title, null: false - - t.index :last_pipeline_id - t.index [:project_id, :ref_path, :param_type, :date, :title], name: 'index_daily_report_results_unique_columns', unique: true - t.foreign_key :projects, on_delete: :cascade - t.foreign_key :ci_pipelines, column: :last_pipeline_id, on_delete: :cascade - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200205143231_add_dissmised_at_to_user_callouts.rb b/db/migrate/20200205143231_add_dissmised_at_to_user_callouts.rb deleted file mode 100644 index f9942d442b5..00000000000 --- a/db/migrate/20200205143231_add_dissmised_at_to_user_callouts.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddDissmisedAtToUserCallouts < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - add_column :user_callouts, :dismissed_at, :datetime_with_timezone - end -end diff --git a/db/migrate/20200206112850_create_snippet_repository_table.rb b/db/migrate/20200206112850_create_snippet_repository_table.rb deleted file mode 100644 index b9120264bb7..00000000000 --- a/db/migrate/20200206112850_create_snippet_repository_table.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class CreateSnippetRepositoryTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :snippet_repositories, id: false, primary_key: :snippet_id do |t| - t.references :shard, null: false, index: true, foreign_key: { on_delete: :restrict } - t.references :snippet, primary_key: true, default: nil, index: false, foreign_key: { on_delete: :cascade } - t.string :disk_path, limit: 80, null: false, index: { unique: true } - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200206141511_change_saml_provider_outer_forks_default.rb b/db/migrate/20200206141511_change_saml_provider_outer_forks_default.rb deleted file mode 100644 index 971cc4da921..00000000000 --- a/db/migrate/20200206141511_change_saml_provider_outer_forks_default.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class ChangeSamlProviderOuterForksDefault < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - change_column_null :saml_providers, :prohibited_outer_forks, false - change_column_default :saml_providers, :prohibited_outer_forks, true - end - - def down - change_column_default :saml_providers, :prohibited_outer_forks, false - change_column_null :saml_providers, :prohibited_outer_forks, true - end -end diff --git a/db/migrate/20200207062728_add_default_branch_protection_to_namespaces.rb b/db/migrate/20200207062728_add_default_branch_protection_to_namespaces.rb deleted file mode 100644 index 56a30b02290..00000000000 --- a/db/migrate/20200207062728_add_default_branch_protection_to_namespaces.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultBranchProtectionToNamespaces < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :namespaces, :default_branch_protection, :integer, limit: 2 # rubocop:disable Migration/AddColumnsToWideTables - end - end - - def down - with_lock_retries do - remove_column :namespaces, :default_branch_protection - end - end -end diff --git a/db/migrate/20200207090921_add_nuget_index_to_packages_packages.rb b/db/migrate/20200207090921_add_nuget_index_to_packages_packages.rb deleted file mode 100644 index 1bd9c4dc0d0..00000000000 --- a/db/migrate/20200207090921_add_nuget_index_to_packages_packages.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddNugetIndexToPackagesPackages < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_packages_project_id_name_partial_for_nuget' - - disable_ddl_transaction! - - def up - add_concurrent_index :packages_packages, [:project_id, :name], name: INDEX_NAME, where: "name <> 'NuGet.Temporary.Package' AND version is not null AND package_type = 4" - end - - def down - remove_concurrent_index_by_name :packages_packages, INDEX_NAME - end -end diff --git a/db/migrate/20200207132752_add_es_bulk_config.rb b/db/migrate/20200207132752_add_es_bulk_config.rb deleted file mode 100644 index c460971139c..00000000000 --- a/db/migrate/20200207132752_add_es_bulk_config.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddEsBulkConfig < ActiveRecord::Migration[6.0] - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - def change - add_column :application_settings, :elasticsearch_max_bulk_size_mb, :smallint, null: false, default: 10 - add_column :application_settings, :elasticsearch_max_bulk_concurrency, :smallint, null: false, default: 10 - end -end diff --git a/db/migrate/20200207151640_create_deployment_clusters.rb b/db/migrate/20200207151640_create_deployment_clusters.rb deleted file mode 100644 index dd05d1730d9..00000000000 --- a/db/migrate/20200207151640_create_deployment_clusters.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateDeploymentClusters < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :deployment_clusters, id: false, force: :cascade do |t| - t.references :deployment, foreign_key: { on_delete: :cascade }, primary_key: true, type: :integer, index: false, default: nil - t.references :cluster, foreign_key: { on_delete: :cascade }, type: :integer, index: false, null: false - t.string :kubernetes_namespace, limit: 255 - - t.index [:cluster_id, :kubernetes_namespace], name: 'idx_deployment_clusters_on_cluster_id_and_kubernetes_namespace' - t.index [:cluster_id, :deployment_id], unique: true - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200207182131_replace_conan_metadata_index.rb b/db/migrate/20200207182131_replace_conan_metadata_index.rb deleted file mode 100644 index 4f55a2974d8..00000000000 --- a/db/migrate/20200207182131_replace_conan_metadata_index.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class ReplaceConanMetadataIndex < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - OLD_INDEX = 'index_packages_conan_metadata_on_package_id' - NEW_INDEX = 'index_packages_conan_metadata_on_package_id_username_channel' - - disable_ddl_transaction! - - def up - add_concurrent_index :packages_conan_metadata, - [:package_id, :package_username, :package_channel], - unique: true, name: NEW_INDEX - - remove_concurrent_index_by_name :packages_conan_metadata, OLD_INDEX - end - - def down - add_concurrent_index :packages_conan_metadata, :package_id, name: OLD_INDEX - - remove_concurrent_index_by_name :packages_conan_metadata, NEW_INDEX - end -end diff --git a/db/migrate/20200209131152_add_feature_filter_type_to_user_preferences.rb b/db/migrate/20200209131152_add_feature_filter_type_to_user_preferences.rb deleted file mode 100644 index c05b624c438..00000000000 --- a/db/migrate/20200209131152_add_feature_filter_type_to_user_preferences.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddFeatureFilterTypeToUserPreferences < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :user_preferences, :feature_filter_type, :bigint - end -end diff --git a/db/migrate/20200210135504_remove_packages_deprecated_dependencies.rb b/db/migrate/20200210135504_remove_packages_deprecated_dependencies.rb deleted file mode 100644 index 476b3de659a..00000000000 --- a/db/migrate/20200210135504_remove_packages_deprecated_dependencies.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RemovePackagesDeprecatedDependencies < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute('DELETE FROM packages_dependency_links WHERE dependency_type = 5') - end - - def down - # There is nothing to do to reverse this migration - end -end diff --git a/db/migrate/20200210184410_create_operations_strategies_table.rb b/db/migrate/20200210184410_create_operations_strategies_table.rb deleted file mode 100644 index 4d65267c1a7..00000000000 --- a/db/migrate/20200210184410_create_operations_strategies_table.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class CreateOperationsStrategiesTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :operations_strategies do |t| - t.references :feature_flag, index: true, null: false, foreign_key: { to_table: :operations_feature_flags, on_delete: :cascade } - t.string :name, null: false, limit: 255 - t.jsonb :parameters, null: false, default: {} - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200210184420_create_operations_scopes_table.rb b/db/migrate/20200210184420_create_operations_scopes_table.rb deleted file mode 100644 index 7ce21feb865..00000000000 --- a/db/migrate/20200210184420_create_operations_scopes_table.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class CreateOperationsScopesTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :operations_scopes do |t| - t.references :strategy, null: false, index: false, foreign_key: { to_table: :operations_strategies, on_delete: :cascade } - t.string :environment_scope, null: false, limit: 255 - end - - add_index :operations_scopes, [:strategy_id, :environment_scope], unique: true - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200211174946_add_auto_renew_to_gitlab_subscriptions.rb b/db/migrate/20200211174946_add_auto_renew_to_gitlab_subscriptions.rb deleted file mode 100644 index 6bce74bb8f8..00000000000 --- a/db/migrate/20200211174946_add_auto_renew_to_gitlab_subscriptions.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddAutoRenewToGitlabSubscriptions < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :gitlab_subscription_histories, :auto_renew, :boolean - add_column :gitlab_subscriptions, :auto_renew, :boolean - end -end diff --git a/db/migrate/20200212014653_rename_security_dashboard_feature_flag_to_instance_security_dashboard.rb b/db/migrate/20200212014653_rename_security_dashboard_feature_flag_to_instance_security_dashboard.rb deleted file mode 100644 index 8d37f6c1dd4..00000000000 --- a/db/migrate/20200212014653_rename_security_dashboard_feature_flag_to_instance_security_dashboard.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class RenameSecurityDashboardFeatureFlagToInstanceSecurityDashboard < ActiveRecord::Migration[6.0] - DOWNTIME = false - - class FeatureGate < ApplicationRecord - self.table_name = 'feature_gates' - end - - def up - security_dashboard_feature = FeatureGate.find_by(feature_key: :security_dashboard, key: :boolean) - - if security_dashboard_feature.present? - FeatureGate.safe_find_or_create_by!( - feature_key: :instance_security_dashboard, - key: :boolean, - value: security_dashboard_feature.value - ) - end - end - - def down - FeatureGate.find_by(feature_key: :instance_security_dashboard, key: :boolean)&.delete - end -end diff --git a/db/migrate/20200212133945_add_group_hooks_to_plan_limits.rb b/db/migrate/20200212133945_add_group_hooks_to_plan_limits.rb deleted file mode 100644 index 4e279ff903d..00000000000 --- a/db/migrate/20200212133945_add_group_hooks_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddGroupHooksToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column(:plan_limits, :group_hooks, :integer, default: 0, null: false) - end -end diff --git a/db/migrate/20200212134201_insert_group_hooks_plan_limits.rb b/db/migrate/20200212134201_insert_group_hooks_plan_limits.rb deleted file mode 100644 index a2963cfaf4d..00000000000 --- a/db/migrate/20200212134201_insert_group_hooks_plan_limits.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class InsertGroupHooksPlanLimits < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - return unless Gitlab.com? - - create_or_update_plan_limit('group_hooks', 'bronze', 50) - create_or_update_plan_limit('group_hooks', 'silver', 50) - create_or_update_plan_limit('group_hooks', 'gold', 50) - end - - def down - return unless Gitlab.com? - - create_or_update_plan_limit('group_hooks', 'bronze', 0) - create_or_update_plan_limit('group_hooks', 'silver', 0) - create_or_update_plan_limit('group_hooks', 'gold', 0) - end -end diff --git a/db/migrate/20200213093702_add_email_restrictions_to_application_settings.rb b/db/migrate/20200213093702_add_email_restrictions_to_application_settings.rb deleted file mode 100644 index 2b8afacb6b3..00000000000 --- a/db/migrate/20200213093702_add_email_restrictions_to_application_settings.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddEmailRestrictionsToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - def up - add_column(:application_settings, :email_restrictions_enabled, :boolean, default: false, null: false) - add_column(:application_settings, :email_restrictions, :text, null: true) - end - # rubocop:enable Migration/AddLimitToTextColumns - - def down - remove_column(:application_settings, :email_restrictions_enabled) - remove_column(:application_settings, :email_restrictions) - end -end diff --git a/db/migrate/20200213100530_add_verification_columns_to_packages.rb b/db/migrate/20200213100530_add_verification_columns_to_packages.rb deleted file mode 100644 index b715f35fcab..00000000000 --- a/db/migrate/20200213100530_add_verification_columns_to_packages.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddVerificationColumnsToPackages < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - add_column :packages_package_files, :verification_retry_at, :datetime_with_timezone - add_column :packages_package_files, :verified_at, :datetime_with_timezone - add_column :packages_package_files, :verification_checksum, :string, limit: 255 - add_column :packages_package_files, :verification_failure, :string, limit: 255 - add_column :packages_package_files, :verification_retry_count, :integer - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200213155311_add_npm_package_requests_forwarding_to_application_settings.rb b/db/migrate/20200213155311_add_npm_package_requests_forwarding_to_application_settings.rb deleted file mode 100644 index 3815117a7e8..00000000000 --- a/db/migrate/20200213155311_add_npm_package_requests_forwarding_to_application_settings.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddNpmPackageRequestsForwardingToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column_with_default(:application_settings, :npm_package_requests_forwarding, # rubocop:disable Migration/AddColumnWithDefault - :boolean, - default: false, - allow_null: false) - end - - def down - remove_column(:application_settings, :npm_package_requests_forwarding) - end -end diff --git a/db/migrate/20200213224220_add_sprints.rb b/db/migrate/20200213224220_add_sprints.rb deleted file mode 100644 index 8d82d1e261a..00000000000 --- a/db/migrate/20200213224220_add_sprints.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class AddSprints < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :sprints, id: :bigserial do |t| - t.timestamps_with_timezone null: false - t.date :start_date - t.date :due_date - - t.references :project, foreign_key: false, index: false - t.references :group, foreign_key: false, index: true - - t.integer :iid, null: false - t.integer :cached_markdown_version - t.integer :state, limit: 2 - # rubocop:disable Migration/AddLimitToTextColumns - t.text :title, null: false - t.text :title_html - t.text :description - t.text :description_html - # rubocop:enable Migration/AddLimitToTextColumns - - t.index :description, name: "index_sprints_on_description_trigram", opclass: :gin_trgm_ops, using: :gin - t.index :due_date - t.index %w(project_id iid), unique: true - t.index :title - t.index :title, name: "index_sprints_on_title_trigram", opclass: :gin_trgm_ops, using: :gin - - t.index %w(project_id title), unique: true, where: 'project_id IS NOT NULL' - t.index %w(group_id title), unique: true, where: 'group_id IS NOT NULL' - end - end -end diff --git a/db/migrate/20200214025454_add_canonical_emails.rb b/db/migrate/20200214025454_add_canonical_emails.rb deleted file mode 100644 index 0732d39169d..00000000000 --- a/db/migrate/20200214025454_add_canonical_emails.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class AddCanonicalEmails < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :user_canonical_emails do |t| - t.timestamps_with_timezone - t.references :user, index: false, null: false, foreign_key: { on_delete: :cascade } - t.string :canonical_email, null: false, index: true # rubocop:disable Migration/PreventStrings - end - end - - add_index :user_canonical_emails, [:user_id, :canonical_email], unique: true - add_index :user_canonical_emails, :user_id, unique: true - end - - def down - with_lock_retries do - drop_table(:user_canonical_emails) - end - end -end diff --git a/db/migrate/20200214085940_clean_grafana_url.rb b/db/migrate/20200214085940_clean_grafana_url.rb deleted file mode 100644 index 7dff6532516..00000000000 --- a/db/migrate/20200214085940_clean_grafana_url.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class CleanGrafanaUrl < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute( - <<-SQL - UPDATE - application_settings - SET - grafana_url = default - WHERE - position('javascript:' IN btrim(application_settings.grafana_url)) = 1 - SQL - ) - end - - def down - # no-op - end -end diff --git a/db/migrate/20200215222507_drop_forked_project_links_fk.rb b/db/migrate/20200215222507_drop_forked_project_links_fk.rb deleted file mode 100644 index 7fe38a6ccdb..00000000000 --- a/db/migrate/20200215222507_drop_forked_project_links_fk.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class DropForkedProjectLinksFk < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - remove_foreign_key_if_exists :forked_project_links, column: :forked_to_project_id - end - end - - def down - unless foreign_key_exists?(:forked_project_links, :projects, column: :forked_to_project_id) - with_lock_retries do - add_foreign_key :forked_project_links, :projects, column: :forked_to_project_id, on_delete: :cascade, validate: false - end - end - - fk_name = concurrent_foreign_key_name(:forked_project_links, :forked_to_project_id, prefix: 'fk_rails_') - validate_foreign_key(:forked_project_links, :forked_to_project_id, name: fk_name) - end -end diff --git a/db/migrate/20200215225103_drop_forked_project_links_table.rb b/db/migrate/20200215225103_drop_forked_project_links_table.rb deleted file mode 100644 index 6acced2c734..00000000000 --- a/db/migrate/20200215225103_drop_forked_project_links_table.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# rubocop:disable Migration/Datetime - -class DropForkedProjectLinksTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def change - # rubocop:disable Migration/DropTable - drop_table "forked_project_links", id: :serial do |t| - t.integer "forked_to_project_id", null: false - t.integer "forked_from_project_id", null: false - t.datetime "created_at" - t.datetime "updated_at" - t.index ["forked_to_project_id"], name: "index_forked_project_links_on_forked_to_project_id", unique: true - end - # rubocop:enable Migration/DropTable - end -end diff --git a/db/migrate/20200218113721_add_indexes_to_package_file.rb b/db/migrate/20200218113721_add_indexes_to_package_file.rb deleted file mode 100644 index 7c66da6819e..00000000000 --- a/db/migrate/20200218113721_add_indexes_to_package_file.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexesToPackageFile < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :packages_package_files, :verification_failure, where: "(verification_failure IS NOT NULL)", name: "packages_packages_verification_failure_partial" - add_concurrent_index :packages_package_files, :verification_checksum, where: "(verification_checksum IS NOT NULL)", name: "packages_packages_verification_checksum_partial" - end - - def down - remove_concurrent_index :packages_package_files, :verification_failure - remove_concurrent_index :packages_package_files, :verification_checksum - end -end diff --git a/db/migrate/20200219105209_add_filepath_to_release_links.rb b/db/migrate/20200219105209_add_filepath_to_release_links.rb deleted file mode 100644 index ba69332fb70..00000000000 --- a/db/migrate/20200219105209_add_filepath_to_release_links.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -class AddFilepathToReleaseLinks < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :release_links, :filepath, :string, limit: 128 # rubocop:disable Migration/PreventStrings - end -end diff --git a/db/migrate/20200219133859_add_environment_id_to_deployment_merge_requests.rb b/db/migrate/20200219133859_add_environment_id_to_deployment_merge_requests.rb deleted file mode 100644 index a57d0b44c52..00000000000 --- a/db/migrate/20200219133859_add_environment_id_to_deployment_merge_requests.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddEnvironmentIdToDeploymentMergeRequests < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :deployment_merge_requests, :environment_id, :integer, null: true - end -end diff --git a/db/migrate/20200219135440_add_limit_metric_type_to_list.rb b/db/migrate/20200219135440_add_limit_metric_type_to_list.rb deleted file mode 100644 index a2b2fb25ac9..00000000000 --- a/db/migrate/20200219135440_add_limit_metric_type_to_list.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddLimitMetricTypeToList < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :lists, :limit_metric, :string, limit: 20 # rubocop:disable Migration/PreventStrings - end -end diff --git a/db/migrate/20200219141307_add_environment_id_fk_to_deployment_merge_requests.rb b/db/migrate/20200219141307_add_environment_id_fk_to_deployment_merge_requests.rb deleted file mode 100644 index 76980b21feb..00000000000 --- a/db/migrate/20200219141307_add_environment_id_fk_to_deployment_merge_requests.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddEnvironmentIdFkToDeploymentMergeRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :deployment_merge_requests, :environments, column: :environment_id, on_delete: :cascade - end - - def down - remove_foreign_key_if_exists :deployment_merge_requests, column: :environment_id - end -end diff --git a/db/migrate/20200219142522_add_environment_id_merge_request_id_uniq_idx_to_deployment_merge_requests.rb b/db/migrate/20200219142522_add_environment_id_merge_request_id_uniq_idx_to_deployment_merge_requests.rb deleted file mode 100644 index a557f3f88d7..00000000000 --- a/db/migrate/20200219142522_add_environment_id_merge_request_id_uniq_idx_to_deployment_merge_requests.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddEnvironmentIdMergeRequestIdUniqIdxToDeploymentMergeRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :deployment_merge_requests, [:environment_id, :merge_request_id], unique: true, name: 'idx_environment_merge_requests_unique_index' - end - - def down - remove_concurrent_index_by_name :deployment_merge_requests, 'idx_environment_merge_requests_unique_index' - end -end diff --git a/db/migrate/20200220180944_add_keep_divergent_refs.rb b/db/migrate/20200220180944_add_keep_divergent_refs.rb deleted file mode 100644 index 0b123bc9d72..00000000000 --- a/db/migrate/20200220180944_add_keep_divergent_refs.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddKeepDivergentRefs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def change - add_column :remote_mirrors, :keep_divergent_refs, :boolean - end -end diff --git a/db/migrate/20200221023320_add_index_on_pages_domain_on_domain_lowercase.rb b/db/migrate/20200221023320_add_index_on_pages_domain_on_domain_lowercase.rb deleted file mode 100644 index 53f8f5e7f81..00000000000 --- a/db/migrate/20200221023320_add_index_on_pages_domain_on_domain_lowercase.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnPagesDomainOnDomainLowercase < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = 'index_pages_domains_on_domain_lowercase' - - disable_ddl_transaction! - - def up - add_concurrent_index :pages_domains, 'LOWER(domain)', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :pages_domains, INDEX_NAME - end -end diff --git a/db/migrate/20200221074028_add_mr_metrics_first_approved_at.rb b/db/migrate/20200221074028_add_mr_metrics_first_approved_at.rb deleted file mode 100644 index 993905f66ce..00000000000 --- a/db/migrate/20200221074028_add_mr_metrics_first_approved_at.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddMrMetricsFirstApprovedAt < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column :merge_request_metrics, :first_approved_at, :datetime_with_timezone - end - - def down - remove_column :merge_request_metrics, :first_approved_at - end -end diff --git a/db/migrate/20200221100514_create_users_statistics.rb b/db/migrate/20200221100514_create_users_statistics.rb deleted file mode 100644 index c02e635bdd4..00000000000 --- a/db/migrate/20200221100514_create_users_statistics.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CreateUsersStatistics < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :users_statistics do |t| - t.timestamps_with_timezone null: false - t.integer :without_groups_and_projects, null: false, default: 0 - t.integer :with_highest_role_guest, null: false, default: 0 - t.integer :with_highest_role_reporter, null: false, default: 0 - t.integer :with_highest_role_developer, null: false, default: 0 - t.integer :with_highest_role_maintainer, null: false, default: 0 - t.integer :with_highest_role_owner, null: false, default: 0 - t.integer :bots, null: false, default: 0 - t.integer :blocked, null: false, default: 0 - end - end -end diff --git a/db/migrate/20200221105436_update_application_setting_npm_package_requests_forwarding_default.rb b/db/migrate/20200221105436_update_application_setting_npm_package_requests_forwarding_default.rb deleted file mode 100644 index 2479df2737d..00000000000 --- a/db/migrate/20200221105436_update_application_setting_npm_package_requests_forwarding_default.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class UpdateApplicationSettingNpmPackageRequestsForwardingDefault < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - change_column_default :application_settings, :npm_package_requests_forwarding, true - - execute('UPDATE application_settings SET npm_package_requests_forwarding = TRUE') - end - - def down - change_column_default :application_settings, :npm_package_requests_forwarding, false - - execute('UPDATE application_settings SET npm_package_requests_forwarding = FALSE') - end -end diff --git a/db/migrate/20200221144534_drop_activate_prometheus_services_background_jobs.rb b/db/migrate/20200221144534_drop_activate_prometheus_services_background_jobs.rb deleted file mode 100644 index 4ec514f7fca..00000000000 --- a/db/migrate/20200221144534_drop_activate_prometheus_services_background_jobs.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class DropActivatePrometheusServicesBackgroundJobs < ActiveRecord::Migration[6.0] - DOWNTIME = false - DROPPED_JOB_CLASS = 'ActivatePrometheusServicesForSharedClusterApplications' - QUEUE = 'background_migration' - - def up - sidekiq_queues.each do |queue| - queue.each do |job| - klass, project_id, *should_be_empty = job.args - next unless klass == DROPPED_JOB_CLASS && project_id.is_a?(Integer) && should_be_empty.empty? - - job.delete - end - end - end - - def down - # no-op - end - - def sidekiq_queues - [Sidekiq::ScheduledSet.new, Sidekiq::RetrySet.new, Sidekiq::Queue.new(QUEUE)] - end -end diff --git a/db/migrate/20200222055543_add_confidential_to_note.rb b/db/migrate/20200222055543_add_confidential_to_note.rb deleted file mode 100644 index d7bf64dca44..00000000000 --- a/db/migrate/20200222055543_add_confidential_to_note.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true -class AddConfidentialToNote < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :notes, :confidential, :boolean - end - end - - def down - with_lock_retries do - remove_column :notes, :confidential - end - end -end diff --git a/db/migrate/20200224020219_add_status_page_settings.rb b/db/migrate/20200224020219_add_status_page_settings.rb deleted file mode 100644 index b45dfc8ec46..00000000000 --- a/db/migrate/20200224020219_add_status_page_settings.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddStatusPageSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :status_page_settings, id: false do |t| - t.references :project, index: true, primary_key: true, foreign_key: { on_delete: :cascade }, unique: true, null: false - t.timestamps_with_timezone null: false - t.boolean :enabled, default: false, null: false - t.string :aws_s3_bucket_name, limit: 63, null: false - t.string :aws_region, limit: 255, null: false - t.string :aws_access_key, limit: 255, null: false - t.string :encrypted_aws_secret_key, limit: 255, null: false - t.string :encrypted_aws_secret_key_iv, limit: 255, null: false - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200224163804_add_version_to_feature_flags_table.rb b/db/migrate/20200224163804_add_version_to_feature_flags_table.rb deleted file mode 100644 index d300f7c83e1..00000000000 --- a/db/migrate/20200224163804_add_version_to_feature_flags_table.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddVersionToFeatureFlagsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - FEATURE_FLAG_LEGACY_VERSION = 1 - - def up - # The operations_feature_flags table is small enough that we can disable this cop. - # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25552#note_291202882 - # rubocop:disable Migration/AddColumnWithDefault - add_column_with_default(:operations_feature_flags, :version, :smallint, default: FEATURE_FLAG_LEGACY_VERSION, allow_null: false) - # rubocop:enable Migration/AddColumnWithDefault - end - - def down - remove_column(:operations_feature_flags, :version) - end -end diff --git a/db/migrate/20200224185814_add_project_subscriptions_to_plan_limits.rb b/db/migrate/20200224185814_add_project_subscriptions_to_plan_limits.rb deleted file mode 100644 index 789f23501fb..00000000000 --- a/db/migrate/20200224185814_add_project_subscriptions_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddProjectSubscriptionsToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column(:plan_limits, :ci_project_subscriptions, :integer, default: 0, null: false) - end -end diff --git a/db/migrate/20200225111018_add_index_for_group_and_iid_search_to_epics.rb b/db/migrate/20200225111018_add_index_for_group_and_iid_search_to_epics.rb deleted file mode 100644 index 98f35d9f1ae..00000000000 --- a/db/migrate/20200225111018_add_index_for_group_and_iid_search_to_epics.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForGroupAndIidSearchToEpics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_epics_on_group_id_and_iid_varchar_pattern' - - disable_ddl_transaction! - - def up - disable_statement_timeout do - execute "CREATE INDEX CONCURRENTLY \"#{INDEX_NAME}\" ON epics (group_id, CAST(iid AS VARCHAR) varchar_pattern_ops);" - end - end - - def down - disable_statement_timeout do - remove_concurrent_index_by_name :epics, INDEX_NAME - end - end -end diff --git a/db/migrate/20200225123228_insert_project_subscriptions_plan_limits.rb b/db/migrate/20200225123228_insert_project_subscriptions_plan_limits.rb deleted file mode 100644 index f04e0c68cf6..00000000000 --- a/db/migrate/20200225123228_insert_project_subscriptions_plan_limits.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class InsertProjectSubscriptionsPlanLimits < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - return unless Gitlab.com? - - create_or_update_plan_limit('ci_project_subscriptions', 'free', 2) - create_or_update_plan_limit('ci_project_subscriptions', 'bronze', 2) - create_or_update_plan_limit('ci_project_subscriptions', 'silver', 2) - create_or_update_plan_limit('ci_project_subscriptions', 'gold', 2) - end - - def down - return unless Gitlab.com? - - create_or_update_plan_limit('ci_project_subscriptions', 'free', 0) - create_or_update_plan_limit('ci_project_subscriptions', 'bronze', 0) - create_or_update_plan_limit('ci_project_subscriptions', 'silver', 0) - create_or_update_plan_limit('ci_project_subscriptions', 'gold', 0) - end -end diff --git a/db/migrate/20200226100614_create_requirements.rb b/db/migrate/20200226100614_create_requirements.rb deleted file mode 100644 index f374e1e9581..00000000000 --- a/db/migrate/20200226100614_create_requirements.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class CreateRequirements < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :requirements do |t| - t.timestamps_with_timezone null: false - t.integer :project_id, null: false - t.integer :author_id - t.integer :iid, null: false - t.integer :cached_markdown_version - t.integer :state, limit: 2, default: 1, null: false - t.string :title, limit: 255, null: false - t.text :title_html # rubocop:disable Migration/AddLimitToTextColumns - - t.index :project_id - t.index :author_id - t.index :title, name: "index_requirements_on_title_trigram", using: :gin, opclass: :gin_trgm_ops - t.index :state - t.index :created_at - t.index :updated_at - t.index %w(project_id iid), name: 'index_requirements_on_project_id_and_iid', where: 'project_id IS NOT NULL', unique: true, using: :btree - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200226100624_requirements_add_project_fk.rb b/db/migrate/20200226100624_requirements_add_project_fk.rb deleted file mode 100644 index b44ce1d34ec..00000000000 --- a/db/migrate/20200226100624_requirements_add_project_fk.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RequirementsAddProjectFk < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key(:requirements, :projects, column: :project_id, on_delete: :cascade) - end - end - - def down - with_lock_retries do - remove_foreign_key(:requirements, column: :project_id) - end - end -end diff --git a/db/migrate/20200226100634_requirements_add_author_fk.rb b/db/migrate/20200226100634_requirements_add_author_fk.rb deleted file mode 100644 index b458657827f..00000000000 --- a/db/migrate/20200226100634_requirements_add_author_fk.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RequirementsAddAuthorFk < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key(:requirements, :users, column: :author_id, on_delete: :nullify) - end - end - - def down - with_lock_retries do - remove_foreign_key(:requirements, column: :author_id) - end - end -end diff --git a/db/migrate/20200226162156_rename_closed_at_to_dismissed_at_in_vulnerabilities.rb b/db/migrate/20200226162156_rename_closed_at_to_dismissed_at_in_vulnerabilities.rb deleted file mode 100644 index ce7170cb335..00000000000 --- a/db/migrate/20200226162156_rename_closed_at_to_dismissed_at_in_vulnerabilities.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RenameClosedAtToDismissedAtInVulnerabilities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - rename_column_concurrently :vulnerabilities, :closed_at, :dismissed_at - end - - def down - undo_rename_column_concurrently :vulnerabilities, :closed_at, :dismissed_at - end -end diff --git a/db/migrate/20200226162634_rename_closed_by_to_dismissed_by_in_vulnerabilities.rb b/db/migrate/20200226162634_rename_closed_by_to_dismissed_by_in_vulnerabilities.rb deleted file mode 100644 index 04b1f0d7136..00000000000 --- a/db/migrate/20200226162634_rename_closed_by_to_dismissed_by_in_vulnerabilities.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RenameClosedByToDismissedByInVulnerabilities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - rename_column_concurrently :vulnerabilities, :closed_by_id, :dismissed_by_id - end - - def down - undo_rename_column_concurrently :vulnerabilities, :closed_by_id, :dismissed_by_id - end -end diff --git a/db/migrate/20200227164113_create_scim_identities.rb b/db/migrate/20200227164113_create_scim_identities.rb deleted file mode 100644 index 34e119ccfe3..00000000000 --- a/db/migrate/20200227164113_create_scim_identities.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class CreateScimIdentities < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :scim_identities do |t| - t.references :group, foreign_key: { to_table: :namespaces, on_delete: :cascade }, null: false - t.references :user, index: false, foreign_key: { on_delete: :cascade }, null: false - t.timestamps_with_timezone - t.boolean :active, default: false - t.string :extern_uid, null: false, limit: 255 - - t.index 'LOWER(extern_uid),group_id', name: 'index_scim_identities_on_lower_extern_uid_and_group_id', unique: true - t.index [:user_id, :group_id], unique: true - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200227165129_create_user_details.rb b/db/migrate/20200227165129_create_user_details.rb deleted file mode 100644 index 89258eadb9f..00000000000 --- a/db/migrate/20200227165129_create_user_details.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class CreateUserDetails < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def up - with_lock_retries do - create_table :user_details, id: false do |t| - t.references :user, index: false, foreign_key: { on_delete: :cascade }, null: false, primary_key: true - t.string :job_title, limit: 200, default: "", null: false - end - end - - add_index :user_details, :user_id, unique: true - end - # rubocop:enable Migration/PreventStrings - - def down - with_lock_retries do - drop_table :user_details - end - end -end diff --git a/db/migrate/20200228160542_create_ci_sources_projects.rb b/db/migrate/20200228160542_create_ci_sources_projects.rb deleted file mode 100644 index 36f5167a784..00000000000 --- a/db/migrate/20200228160542_create_ci_sources_projects.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class CreateCiSourcesProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def change - create_table :ci_sources_projects do |t| - t.bigint :pipeline_id, null: false - t.bigint :source_project_id, null: false - - t.index [:source_project_id, :pipeline_id], unique: true - t.index :pipeline_id - end - end -end diff --git a/db/migrate/20200229171700_create_custom_emojis.rb b/db/migrate/20200229171700_create_custom_emojis.rb deleted file mode 100644 index f0574831f33..00000000000 --- a/db/migrate/20200229171700_create_custom_emojis.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class CreateCustomEmojis < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:custom_emoji) - create_table :custom_emoji do |t| - t.references :namespace, index: false, null: false, foreign_key: { on_delete: :cascade } - t.datetime_with_timezone :created_at, null: false - t.datetime_with_timezone :updated_at, null: false - t.text :name, null: false - t.text :file, null: false - end - end - - unless index_exists?(:custom_emoji, [:namespace_id, :name], unique: true) - add_index :custom_emoji, [:namespace_id, :name], unique: true - end - - add_text_limit(:custom_emoji, :name, 36) - add_text_limit(:custom_emoji, :file, 255) - end - - def down - drop_table :custom_emoji - end -end diff --git a/db/migrate/20200302152516_add_wiki_slug.rb b/db/migrate/20200302152516_add_wiki_slug.rb deleted file mode 100644 index a7891427c10..00000000000 --- a/db/migrate/20200302152516_add_wiki_slug.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddWikiSlug < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :wiki_page_meta, id: :serial do |t| - t.references :project, index: true, foreign_key: { on_delete: :cascade }, null: false - t.timestamps_with_timezone null: false - t.string :title, null: false, limit: 255 - end - - create_table :wiki_page_slugs, id: :serial do |t| - t.boolean :canonical, default: false, null: false - t.references :wiki_page_meta, index: true, foreign_key: { on_delete: :cascade }, null: false - t.timestamps_with_timezone null: false - t.string :slug, null: false, limit: 2048 - t.index [:slug, :wiki_page_meta_id], unique: true - t.index [:wiki_page_meta_id], name: 'one_canonical_wiki_page_slug_per_metadata', unique: true, where: "(canonical = true)" - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200303055348_add_expires_at_to_keys.rb b/db/migrate/20200303055348_add_expires_at_to_keys.rb deleted file mode 100644 index ef7b813a2ef..00000000000 --- a/db/migrate/20200303055348_add_expires_at_to_keys.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddExpiresAtToKeys < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :keys, :expires_at, :datetime_with_timezone - end -end diff --git a/db/migrate/20200303074328_add_index_on_snippet_description.rb b/db/migrate/20200303074328_add_index_on_snippet_description.rb deleted file mode 100644 index f23e5f8bf8e..00000000000 --- a/db/migrate/20200303074328_add_index_on_snippet_description.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnSnippetDescription < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_snippets_on_description_trigram' - - disable_ddl_transaction! - - def up - add_concurrent_index :snippets, :description, name: INDEX_NAME, using: :gin, opclass: { description: :gin_trgm_ops } - end - - def down - remove_concurrent_index_by_name :snippets, INDEX_NAME - end -end diff --git a/db/migrate/20200303181648_add_healthy_to_clusters_applications_prometheus.rb b/db/migrate/20200303181648_add_healthy_to_clusters_applications_prometheus.rb deleted file mode 100644 index 402cdbbdc14..00000000000 --- a/db/migrate/20200303181648_add_healthy_to_clusters_applications_prometheus.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddHealthyToClustersApplicationsPrometheus < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - # Default is null to indicate that a health check has not run for a project - # For now, health checks will only run on monitor demo projects - add_column :clusters_applications_prometheus, :healthy, :boolean - end - - def down - remove_column :clusters_applications_prometheus, :healthy - end -end diff --git a/db/migrate/20200304023245_add_sprint_to_issues.rb b/db/migrate/20200304023245_add_sprint_to_issues.rb deleted file mode 100644 index c8bc5258ffd..00000000000 --- a/db/migrate/20200304023245_add_sprint_to_issues.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddSprintToIssues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - # index will be added in another migration with `add_concurrent_index` - add_column :issues, :sprint_id, :bigint - end - end - - def down - with_lock_retries do - remove_column :issues, :sprint_id - end - end -end diff --git a/db/migrate/20200304023851_add_sprint_to_merge_requests.rb b/db/migrate/20200304023851_add_sprint_to_merge_requests.rb deleted file mode 100644 index e294abe66cd..00000000000 --- a/db/migrate/20200304023851_add_sprint_to_merge_requests.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddSprintToMergeRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - # index will be added in another migration with `add_concurrent_index` - add_column :merge_requests, :sprint_id, :bigint - end - end - - def down - with_lock_retries do - remove_column :merge_requests, :sprint_id - end - end -end diff --git a/db/migrate/20200304024025_add_sprint_id_index_to_issues.rb b/db/migrate/20200304024025_add_sprint_id_index_to_issues.rb deleted file mode 100644 index aaece3445db..00000000000 --- a/db/migrate/20200304024025_add_sprint_id_index_to_issues.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddSprintIdIndexToIssues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :issues, :sprint_id - add_concurrent_foreign_key :issues, :sprints, column: :sprint_id - end - - def down - with_lock_retries do - remove_foreign_key :issues, column: :sprint_id - end - remove_concurrent_index :issues, :sprint_id - end -end diff --git a/db/migrate/20200304024042_add_sprint_id_index_to_merge_requests.rb b/db/migrate/20200304024042_add_sprint_id_index_to_merge_requests.rb deleted file mode 100644 index 219d10ff47c..00000000000 --- a/db/migrate/20200304024042_add_sprint_id_index_to_merge_requests.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddSprintIdIndexToMergeRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_requests, :sprint_id - add_concurrent_foreign_key :merge_requests, :sprints, column: :sprint_id - end - - def down - with_lock_retries do - remove_foreign_key :merge_requests, column: :sprint_id - end - remove_concurrent_index :merge_requests, :sprint_id - end -end diff --git a/db/migrate/20200304085423_add_user_type.rb b/db/migrate/20200304085423_add_user_type.rb deleted file mode 100644 index 3c20f2d26d8..00000000000 --- a/db/migrate/20200304085423_add_user_type.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddUserType < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :users, :user_type, :integer, limit: 2 # rubocop:disable Migration/AddColumnsToWideTables - end - end - - def down - with_lock_retries do - remove_column :users, :user_type - end - end -end diff --git a/db/migrate/20200304090155_add_user_type_index.rb b/db/migrate/20200304090155_add_user_type_index.rb deleted file mode 100644 index cd3b87d0a45..00000000000 --- a/db/migrate/20200304090155_add_user_type_index.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddUserTypeIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :users, :user_type - end - - def down - remove_concurrent_index :users, :user_type - end -end diff --git a/db/migrate/20200304121828_add_ci_sources_project_pipeline_foreign_key.rb b/db/migrate/20200304121828_add_ci_sources_project_pipeline_foreign_key.rb deleted file mode 100644 index ed244a7d308..00000000000 --- a/db/migrate/20200304121828_add_ci_sources_project_pipeline_foreign_key.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddCiSourcesProjectPipelineForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :ci_sources_projects, :ci_pipelines, column: :pipeline_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :ci_sources_projects, :ci_pipelines, column: :pipeline_id - end - end -end diff --git a/db/migrate/20200304121844_add_ci_sources_project_source_project_foreign_key.rb b/db/migrate/20200304121844_add_ci_sources_project_source_project_foreign_key.rb deleted file mode 100644 index 56ae2106644..00000000000 --- a/db/migrate/20200304121844_add_ci_sources_project_source_project_foreign_key.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddCiSourcesProjectSourceProjectForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :ci_sources_projects, :projects, column: :source_project_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :ci_sources_projects, :projects, column: :source_project_id - end - end -end diff --git a/db/migrate/20200304124406_add_unlock_membership_to_ldap_of_groups.rb b/db/migrate/20200304124406_add_unlock_membership_to_ldap_of_groups.rb deleted file mode 100644 index 19e6573af9b..00000000000 --- a/db/migrate/20200304124406_add_unlock_membership_to_ldap_of_groups.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddUnlockMembershipToLdapOfGroups < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column(:namespaces, :unlock_membership_to_ldap, :boolean) # rubocop:disable Migration/AddColumnsToWideTables - end - end - - def down - with_lock_retries do - remove_column :namespaces, :unlock_membership_to_ldap - end - end -end diff --git a/db/migrate/20200304160800_add_index_services_on_template.rb b/db/migrate/20200304160800_add_index_services_on_template.rb deleted file mode 100644 index 731fa04123c..00000000000 --- a/db/migrate/20200304160800_add_index_services_on_template.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexServicesOnTemplate < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - # This migration is a corrective action to add the missing - # index_services_on_template index on staging. - def up - add_concurrent_index(:services, :template) unless index_exists?(:services, :template) - end - - def down - # No reverse action as this is a corrective migration. - end -end diff --git a/db/migrate/20200304160801_delete_template_services_duplicated_by_type.rb b/db/migrate/20200304160801_delete_template_services_duplicated_by_type.rb deleted file mode 100644 index a1c5161aea0..00000000000 --- a/db/migrate/20200304160801_delete_template_services_duplicated_by_type.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class DeleteTemplateServicesDuplicatedByType < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - # Delete service templates with duplicated types. Keep the service - # template with the lowest `id` because that is the service template used: - # https://gitlab.com/gitlab-org/gitlab/-/blob/v12.8.1-ee/app/controllers/admin/services_controller.rb#L37 - execute <<~SQL - DELETE - FROM services - WHERE TEMPLATE = TRUE - AND id NOT IN - (SELECT MIN(id) - FROM services - WHERE TEMPLATE = TRUE - GROUP BY TYPE); - SQL - end - - def down - # This migration cannot be reversed. - end -end diff --git a/db/migrate/20200304160823_add_index_to_service_unique_template_per_type.rb b/db/migrate/20200304160823_add_index_to_service_unique_template_per_type.rb deleted file mode 100644 index b81e5acf67f..00000000000 --- a/db/migrate/20200304160823_add_index_to_service_unique_template_per_type.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToServiceUniqueTemplatePerType < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index(:services, [:type, :template], unique: true, where: 'template IS TRUE') - end - - def down - remove_concurrent_index(:services, [:type, :template]) - end -end diff --git a/db/migrate/20200305020458_add_label_restore_table.rb b/db/migrate/20200305020458_add_label_restore_table.rb deleted file mode 100644 index a5809cfe14b..00000000000 --- a/db/migrate/20200305020458_add_label_restore_table.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class AddLabelRestoreTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - # copy table - execute "CREATE TABLE #{backup_labels_table_name} (LIKE #{labels_table_name} INCLUDING ALL);" - - # make the primary key a real functioning one rather than incremental - execute "ALTER TABLE #{backup_labels_table_name} ALTER COLUMN ID DROP DEFAULT;" - - # add some fields that make changes trackable - execute "ALTER TABLE #{backup_labels_table_name} ADD COLUMN restore_action INTEGER;" - execute "ALTER TABLE #{backup_labels_table_name} ADD COLUMN new_title VARCHAR;" - end - - def down - drop_table backup_labels_table_name - end - - private - - def labels_table_name - :labels - end - - def backup_labels_table_name - :backup_labels - end -end diff --git a/db/migrate/20200305020459_add_label_restore_foreign_keys.rb b/db/migrate/20200305020459_add_label_restore_foreign_keys.rb deleted file mode 100644 index 4b7c68cb20b..00000000000 --- a/db/migrate/20200305020459_add_label_restore_foreign_keys.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class AddLabelRestoreForeignKeys < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - # create foreign keys - connection.foreign_keys(labels_table_name).each do |fk| - fk_options = fk.options - add_concurrent_foreign_key(backup_labels_table_name, fk.to_table, name: fk.name, column: fk_options[:column]) - end - end - - def down - connection.foreign_keys(backup_labels_table_name).each do |fk| - with_lock_retries do - remove_foreign_key backup_labels_table_name, name: fk.name - end - end - end - - private - - def labels_table_name - :labels - end - - def backup_labels_table_name - :backup_labels - end -end diff --git a/db/migrate/20200305121159_add_merge_request_metrics_first_reassigned_at.rb b/db/migrate/20200305121159_add_merge_request_metrics_first_reassigned_at.rb deleted file mode 100644 index 714adf925ed..00000000000 --- a/db/migrate/20200305121159_add_merge_request_metrics_first_reassigned_at.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddMergeRequestMetricsFirstReassignedAt < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :merge_request_metrics, :first_reassigned_at, :datetime_with_timezone - end - end - - def down - with_lock_retries do - remove_column :merge_request_metrics, :first_reassigned_at, :datetime_with_timezone - end - end -end diff --git a/db/migrate/20200305151736_delete_template_project_services.rb b/db/migrate/20200305151736_delete_template_project_services.rb deleted file mode 100644 index 2ab8d46a94e..00000000000 --- a/db/migrate/20200305151736_delete_template_project_services.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class DeleteTemplateProjectServices < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - # In 12.9 an ActiveRecord validation for services not being a template and - # attached to a project at the same time is introduced. This migration cleans up invalid data. - execute <<~SQL - DELETE - FROM services - WHERE TEMPLATE = TRUE AND project_id IS NOT NULL - SQL - end - - def down - # This migration cannot be reversed. - end -end diff --git a/db/migrate/20200305200641_create_terraform_states.rb b/db/migrate/20200305200641_create_terraform_states.rb deleted file mode 100644 index 8429d5cfeb3..00000000000 --- a/db/migrate/20200305200641_create_terraform_states.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class CreateTerraformStates < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :terraform_states do |t| - t.references :project, index: true, foreign_key: { on_delete: :cascade }, null: false - t.timestamps_with_timezone null: false - t.integer :file_store, limit: 2 - t.string :file, limit: 255 - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200306095654_add_merge_request_assignee_created_at.rb b/db/migrate/20200306095654_add_merge_request_assignee_created_at.rb deleted file mode 100644 index 127a20f127b..00000000000 --- a/db/migrate/20200306095654_add_merge_request_assignee_created_at.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddMergeRequestAssigneeCreatedAt < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :merge_request_assignees, :created_at, :datetime_with_timezone - end - end - - def down - with_lock_retries do - remove_column :merge_request_assignees, :created_at - end - end -end diff --git a/db/migrate/20200306160521_add_index_on_author_id_and_created_at_to_events.rb b/db/migrate/20200306160521_add_index_on_author_id_and_created_at_to_events.rb deleted file mode 100644 index 2f7c16b3f20..00000000000 --- a/db/migrate/20200306160521_add_index_on_author_id_and_created_at_to_events.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnAuthorIdAndCreatedAtToEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_events_on_author_id_and_created_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :events, [:author_id, :created_at], name: INDEX_NAME - end - - def down - remove_concurrent_index :events, INDEX_NAME - end -end diff --git a/db/migrate/20200306170211_add_index_on_author_id_and_id_and_created_at_to_issues.rb b/db/migrate/20200306170211_add_index_on_author_id_and_id_and_created_at_to_issues.rb deleted file mode 100644 index c581ca3874f..00000000000 --- a/db/migrate/20200306170211_add_index_on_author_id_and_id_and_created_at_to_issues.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnAuthorIdAndIdAndCreatedAtToIssues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :issues, [:author_id, :id, :created_at] - end - - def down - remove_concurrent_index :issues, [:author_id, :id, :created_at] - end -end diff --git a/db/migrate/20200306170321_add_index_on_user_id_and_created_at_to_ci_pipelines.rb b/db/migrate/20200306170321_add_index_on_user_id_and_created_at_to_ci_pipelines.rb deleted file mode 100644 index b88f938d1c2..00000000000 --- a/db/migrate/20200306170321_add_index_on_user_id_and_created_at_to_ci_pipelines.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnUserIdAndCreatedAtToCiPipelines < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_pipelines, [:user_id, :created_at] - remove_concurrent_index :ci_pipelines, [:user_id] - end - - def down - add_concurrent_index :ci_pipelines, [:user_id] - remove_concurrent_index :ci_pipelines, [:user_id, :created_at] - end -end diff --git a/db/migrate/20200306170531_add_index_on_author_id_and_created_at_to_todos.rb b/db/migrate/20200306170531_add_index_on_author_id_and_created_at_to_todos.rb deleted file mode 100644 index d0d31ca7c52..00000000000 --- a/db/migrate/20200306170531_add_index_on_author_id_and_created_at_to_todos.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true -class AddIndexOnAuthorIdAndCreatedAtToTodos < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :todos, [:author_id, :created_at] - end - - def down - remove_concurrent_index :todos, [:author_id, :created_at] - end -end diff --git a/db/migrate/20200306192548_add_index_on_project_id_and_type_to_services.rb b/db/migrate/20200306192548_add_index_on_project_id_and_type_to_services.rb deleted file mode 100644 index 9deb3c2832d..00000000000 --- a/db/migrate/20200306192548_add_index_on_project_id_and_type_to_services.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnProjectIdAndTypeToServices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_services_on_project_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :services, [:project_id, :type] - - remove_concurrent_index_by_name :services, INDEX_NAME - end - - def down - add_concurrent_index :services, :project_id, name: INDEX_NAME - - remove_concurrent_index :services, [:project_id, :type] - end -end diff --git a/db/migrate/20200306193236_add_index_on_creator_id_and_created_at_to_projects.rb b/db/migrate/20200306193236_add_index_on_creator_id_and_created_at_to_projects.rb deleted file mode 100644 index 913383d32f4..00000000000 --- a/db/migrate/20200306193236_add_index_on_creator_id_and_created_at_to_projects.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnCreatorIdAndCreatedAtToProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_projects_on_creator_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, [:creator_id, :created_at] - - remove_concurrent_index_by_name :projects, INDEX_NAME - end - - def down - add_concurrent_index :projects, :creator_id, name: INDEX_NAME - - remove_concurrent_index :projects, [:creator_id, :created_at] - end -end diff --git a/db/migrate/20200309140540_add_index_on_project_id_and_repository_access_level_to_project_features.rb b/db/migrate/20200309140540_add_index_on_project_id_and_repository_access_level_to_project_features.rb deleted file mode 100644 index a2093db0b3b..00000000000 --- a/db/migrate/20200309140540_add_index_on_project_id_and_repository_access_level_to_project_features.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnProjectIdAndRepositoryAccessLevelToProjectFeatures < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_project_features_on_project_id_ral_20' - - disable_ddl_transaction! - - def up - add_concurrent_index :project_features, :project_id, where: 'repository_access_level = 20', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :project_features, INDEX_NAME - end -end diff --git a/db/migrate/20200309162244_add_open_project_tracker_data.rb b/db/migrate/20200309162244_add_open_project_tracker_data.rb deleted file mode 100644 index 5906eb7ebff..00000000000 --- a/db/migrate/20200309162244_add_open_project_tracker_data.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddOpenProjectTrackerData < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :open_project_tracker_data do |t| - t.references :service, foreign_key: { on_delete: :cascade }, type: :integer, index: true, null: false - t.timestamps_with_timezone - t.string :encrypted_url, limit: 255 - t.string :encrypted_url_iv, limit: 255 - t.string :encrypted_api_url, limit: 255 - t.string :encrypted_api_url_iv, limit: 255 - t.string :encrypted_token, limit: 255 - t.string :encrypted_token_iv, limit: 255 - t.string :closed_status_id, limit: 5 - t.string :project_identifier_code, limit: 100 - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200309195209_add_index_on_project_id_and_builds_access_level_to_project_features.rb b/db/migrate/20200309195209_add_index_on_project_id_and_builds_access_level_to_project_features.rb deleted file mode 100644 index 8d6ab60ca48..00000000000 --- a/db/migrate/20200309195209_add_index_on_project_id_and_builds_access_level_to_project_features.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnProjectIdAndBuildsAccessLevelToProjectFeatures < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_project_features_on_project_id_bal_20' - - disable_ddl_transaction! - - def up - add_concurrent_index :project_features, :project_id, where: 'builds_access_level = 20', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :project_features, INDEX_NAME - end -end diff --git a/db/migrate/20200309195710_add_index_on_mirror_and_creator_id_and_created_at_to_projects.rb b/db/migrate/20200309195710_add_index_on_mirror_and_creator_id_and_created_at_to_projects.rb deleted file mode 100644 index e1bdb5d7a0d..00000000000 --- a/db/migrate/20200309195710_add_index_on_mirror_and_creator_id_and_created_at_to_projects.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnMirrorAndCreatorIdAndCreatedAtToProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_projects_on_mirror_creator_id_created_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, [:creator_id, :created_at], where: 'mirror = true and mirror_trigger_builds = true', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :projects, INDEX_NAME - end -end diff --git a/db/migrate/20200310123229_add_index_on_enabled_and_provider_type_and_id_to_clusters.rb b/db/migrate/20200310123229_add_index_on_enabled_and_provider_type_and_id_to_clusters.rb deleted file mode 100644 index edd9343e743..00000000000 --- a/db/migrate/20200310123229_add_index_on_enabled_and_provider_type_and_id_to_clusters.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnEnabledAndProviderTypeAndIdToClusters < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :clusters, [:enabled, :provider_type, :id] - remove_concurrent_index :clusters, :enabled - end - - def down - add_concurrent_index :clusters, :enabled - remove_concurrent_index :clusters, [:enabled, :provider_type, :id] - end -end diff --git a/db/migrate/20200310132654_add_instance_to_services.rb b/db/migrate/20200310132654_add_instance_to_services.rb deleted file mode 100644 index 5f3c3e8616b..00000000000 --- a/db/migrate/20200310132654_add_instance_to_services.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddInstanceToServices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - # rubocop:disable Migration/AddColumnWithDefault - # rubocop:disable Migration/UpdateLargeTable - def up - add_column_with_default(:services, :instance, :boolean, default: false) - end - # rubocop:enable Migration/AddColumnWithDefault - # rubocop:enable Migration/UpdateLargeTable - - def down - remove_column(:services, :instance) - end -end diff --git a/db/migrate/20200310133822_add_index_on_author_id_and_id_and_created_at_to_notes.rb b/db/migrate/20200310133822_add_index_on_author_id_and_id_and_created_at_to_notes.rb deleted file mode 100644 index 8005da5fbae..00000000000 --- a/db/migrate/20200310133822_add_index_on_author_id_and_id_and_created_at_to_notes.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnAuthorIdAndIdAndCreatedAtToNotes < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :notes, [:author_id, :created_at] - remove_concurrent_index :notes, [:author_id] - end - - def down - add_concurrent_index :notes, [:author_id] - remove_concurrent_index :notes, [:author_id, :created_at] - end -end diff --git a/db/migrate/20200310135823_add_index_to_service_unique_instance_per_type.rb b/db/migrate/20200310135823_add_index_to_service_unique_instance_per_type.rb deleted file mode 100644 index 1a60c521b71..00000000000 --- a/db/migrate/20200310135823_add_index_to_service_unique_instance_per_type.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToServiceUniqueInstancePerType < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index(:services, [:type, :instance], unique: true, where: 'instance IS TRUE') - end - - def down - remove_concurrent_index(:services, [:type, :instance]) - end -end diff --git a/db/migrate/20200310145304_add_runtime_created_to_ci_job_variables.rb b/db/migrate/20200310145304_add_runtime_created_to_ci_job_variables.rb deleted file mode 100644 index e76136a5c1f..00000000000 --- a/db/migrate/20200310145304_add_runtime_created_to_ci_job_variables.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddRuntimeCreatedToCiJobVariables < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - DEFAULT_SOURCE = 0 # Equvalent to Ci::JobVariable.internal_source - - def up - add_column_with_default(:ci_job_variables, :source, :integer, limit: 2, default: DEFAULT_SOURCE, allow_null: false) # rubocop:disable Migration/AddColumnWithDefault - end - - def down - remove_column(:ci_job_variables, :source) - end -end diff --git a/db/migrate/20200311074438_migrate_bot_type_to_user_type.rb b/db/migrate/20200311074438_migrate_bot_type_to_user_type.rb deleted file mode 100644 index b13842794d3..00000000000 --- a/db/migrate/20200311074438_migrate_bot_type_to_user_type.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class MigrateBotTypeToUserType < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute('UPDATE users SET user_type = bot_type WHERE bot_type IS NOT NULL AND user_type IS NULL') - end - - def down - execute('UPDATE users SET user_type = NULL WHERE bot_type IS NOT NULL AND bot_type = user_type') - end -end diff --git a/db/migrate/20200311082301_add_user_state_index.rb b/db/migrate/20200311082301_add_user_state_index.rb deleted file mode 100644 index 953941c2a53..00000000000 --- a/db/migrate/20200311082301_add_user_state_index.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddUserStateIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index(:users, [:state, :user_type], where: 'ghost IS NOT TRUE', name: 'index_users_on_state_and_user_type_internal') - remove_concurrent_index_by_name(:users, 'index_users_on_state_and_internal_ee') - remove_concurrent_index_by_name(:users, 'index_users_on_state_and_internal') - end - - def down - add_concurrent_index(:users, :state, where: 'ghost IS NOT TRUE AND bot_type IS NULL', name: 'index_users_on_state_and_internal_ee') - add_concurrent_index(:users, :state, where: 'ghost IS NOT TRUE', name: 'index_users_on_state_and_internal') - remove_concurrent_index_by_name(:users, 'index_users_on_state_and_internal_ee') - end -end diff --git a/db/migrate/20200311084025_add_index_on_user_id_status_created_at_to_deployments.rb b/db/migrate/20200311084025_add_index_on_user_id_status_created_at_to_deployments.rb deleted file mode 100644 index 1744b701f0a..00000000000 --- a/db/migrate/20200311084025_add_index_on_user_id_status_created_at_to_deployments.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnUserIdStatusCreatedAtToDeployments < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :deployments, [:user_id, :status, :created_at] - end - - def down - remove_concurrent_index :deployments, [:user_id, :status, :created_at] - end -end diff --git a/db/migrate/20200311093210_create_user_highest_roles.rb b/db/migrate/20200311093210_create_user_highest_roles.rb deleted file mode 100644 index 36007f196d1..00000000000 --- a/db/migrate/20200311093210_create_user_highest_roles.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class CreateUserHighestRoles < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :user_highest_roles, id: false do |t| - t.datetime_with_timezone :updated_at, null: false - t.references :user, primary_key: true, default: nil, index: false, foreign_key: { on_delete: :cascade } - t.integer :highest_access_level - - t.index [:user_id, :highest_access_level] - end - end - end - - def down - with_lock_retries do - drop_table :user_highest_roles - end - end -end diff --git a/db/migrate/20200311094020_add_index_on_id_and_status_to_deployments.rb b/db/migrate/20200311094020_add_index_on_id_and_status_to_deployments.rb deleted file mode 100644 index 77c746ed88b..00000000000 --- a/db/migrate/20200311094020_add_index_on_id_and_status_to_deployments.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnIdAndStatusToDeployments < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :deployments, [:id, :status] - end - - def down - remove_concurrent_index :deployments, [:id, :status] - end -end diff --git a/db/migrate/20200311141053_add_ci_pipeline_schedules_to_plan_limits.rb b/db/migrate/20200311141053_add_ci_pipeline_schedules_to_plan_limits.rb deleted file mode 100644 index e7fe3e63349..00000000000 --- a/db/migrate/20200311141053_add_ci_pipeline_schedules_to_plan_limits.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddCiPipelineSchedulesToPlanLimits < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - - def up - add_column_with_default(:plan_limits, :ci_pipeline_schedules, :integer, default: 0, allow_null: false) # rubocop:disable Migration/AddColumnWithDefault - end - - def down - remove_column(:plan_limits, :ci_pipeline_schedules) - end -end diff --git a/db/migrate/20200311141943_insert_ci_pipeline_schedules_plan_limits.rb b/db/migrate/20200311141943_insert_ci_pipeline_schedules_plan_limits.rb deleted file mode 100644 index 2a04781c65e..00000000000 --- a/db/migrate/20200311141943_insert_ci_pipeline_schedules_plan_limits.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class InsertCiPipelineSchedulesPlanLimits < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - return unless Gitlab.com? - - create_or_update_plan_limit('ci_pipeline_schedules', 'free', 10) - create_or_update_plan_limit('ci_pipeline_schedules', 'bronze', 50) - create_or_update_plan_limit('ci_pipeline_schedules', 'silver', 50) - create_or_update_plan_limit('ci_pipeline_schedules', 'gold', 50) - end - - def down - return unless Gitlab.com? - - create_or_update_plan_limit('ci_pipeline_schedules', 'free', 0) - create_or_update_plan_limit('ci_pipeline_schedules', 'bronze', 0) - create_or_update_plan_limit('ci_pipeline_schedules', 'silver', 0) - create_or_update_plan_limit('ci_pipeline_schedules', 'gold', 0) - end -end diff --git a/db/migrate/20200311154110_create_vulnerability_exports.rb b/db/migrate/20200311154110_create_vulnerability_exports.rb deleted file mode 100644 index 5a3355ab5be..00000000000 --- a/db/migrate/20200311154110_create_vulnerability_exports.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class CreateVulnerabilityExports < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :vulnerability_exports do |t| - t.timestamps_with_timezone null: false - t.datetime_with_timezone :started_at - t.datetime_with_timezone :finished_at - t.string :status, limit: 255, null: false - t.string :file, limit: 255 - t.bigint :project_id, null: false - t.bigint :author_id, null: false - t.integer :file_store - t.integer :format, limit: 2, null: false, default: 0 - - t.index %i[project_id id], unique: true - t.index %i[author_id] - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200311165635_create_project_export_jobs.rb b/db/migrate/20200311165635_create_project_export_jobs.rb deleted file mode 100644 index 21ff5f488f7..00000000000 --- a/db/migrate/20200311165635_create_project_export_jobs.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class CreateProjectExportJobs < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :project_export_jobs do |t| - t.references :project, index: false, null: false, foreign_key: { on_delete: :cascade } - t.timestamps_with_timezone null: false - t.integer :status, limit: 2, null: false, default: 0 - t.string :jid, limit: 100, null: false, unique: true - - t.index [:project_id, :jid] - t.index [:jid], unique: true - t.index [:status] - t.index [:project_id, :status] - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200311214912_add_modsecurity_mode_to_ingress_application.rb b/db/migrate/20200311214912_add_modsecurity_mode_to_ingress_application.rb deleted file mode 100644 index 7f3366a4900..00000000000 --- a/db/migrate/20200311214912_add_modsecurity_mode_to_ingress_application.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddModsecurityModeToIngressApplication < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column_with_default(:clusters_applications_ingress, :modsecurity_mode, :smallint, default: 0, allow_null: false) # rubocop:disable Migration/AddColumnWithDefault - end - - def down - remove_column :clusters_applications_ingress, :modsecurity_mode - end -end diff --git a/db/migrate/20200312053852_populate_canonical_emails.rb b/db/migrate/20200312053852_populate_canonical_emails.rb deleted file mode 100644 index 10efffab59c..00000000000 --- a/db/migrate/20200312053852_populate_canonical_emails.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class PopulateCanonicalEmails < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - class User < ActiveRecord::Base - include EachBatch - - self.table_name = 'users' - - scope :with_gmail, -> { select(:id, :email).where("email ILIKE '%gmail.com'") } - end - - # Limited to *@gmail.com addresses only as a first iteration, because we know - # Gmail ignores `.` appearing in the Agent name, as well as anything after `+` - - def up - # batch size is the default, 1000 - migration = Gitlab::BackgroundMigration::PopulateCanonicalEmails - migration_name = migration.to_s.demodulize - - queue_background_migration_jobs_by_range_at_intervals( - User.with_gmail, - migration_name, - 1.minute) - end - - def down - # no-op - end -end diff --git a/db/migrate/20200312125121_add_index_on_active_and_template_and_type_and_id_to_services.rb b/db/migrate/20200312125121_add_index_on_active_and_template_and_type_and_id_to_services.rb deleted file mode 100644 index 76e5860c2f3..00000000000 --- a/db/migrate/20200312125121_add_index_on_active_and_template_and_type_and_id_to_services.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnActiveAndTemplateAndTypeAndIdToServices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_services_on_type_and_id_and_template_when_active' - - disable_ddl_transaction! - - def up - add_concurrent_index :services, [:type, :id, :template], where: 'active = TRUE', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :services, INDEX_NAME - end -end diff --git a/db/migrate/20200312160532_add_index_on_mirror_and_id_to_projects.rb b/db/migrate/20200312160532_add_index_on_mirror_and_id_to_projects.rb deleted file mode 100644 index 3a64b915931..00000000000 --- a/db/migrate/20200312160532_add_index_on_mirror_and_id_to_projects.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnMirrorAndIdToProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - OLD_INDEX_NAME = 'index_projects_on_mirror_and_mirror_trigger_builds_both_true' - NEW_INDEX_NAME = 'index_projects_on_mirror_id_where_mirror_and_trigger_builds' - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, :id, where: 'mirror = TRUE AND mirror_trigger_builds = TRUE', name: NEW_INDEX_NAME - remove_concurrent_index_by_name :projects, OLD_INDEX_NAME - end - - def down - add_concurrent_index :projects, :id, where: 'mirror IS TRUE AND mirror_trigger_builds IS TRUE', name: OLD_INDEX_NAME - remove_concurrent_index_by_name :projects, NEW_INDEX_NAME - end -end diff --git a/db/migrate/20200312163407_add_index_on_id_and_service_desk_enabled_to_projects.rb b/db/migrate/20200312163407_add_index_on_id_and_service_desk_enabled_to_projects.rb deleted file mode 100644 index 903bd12ddf4..00000000000 --- a/db/migrate/20200312163407_add_index_on_id_and_service_desk_enabled_to_projects.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnIdAndServiceDeskEnabledToProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_projects_on_id_service_desk_enabled' - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, :id, where: 'service_desk_enabled = true', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :projects, INDEX_NAME - end -end diff --git a/db/migrate/20200313101649_fill_ghost_user_type.rb b/db/migrate/20200313101649_fill_ghost_user_type.rb deleted file mode 100644 index fa0c02e5413..00000000000 --- a/db/migrate/20200313101649_fill_ghost_user_type.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class FillGhostUserType < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute('UPDATE users SET user_type = 5 WHERE ghost IS TRUE AND user_type IS NULL') - end - - def down - execute('UPDATE users SET user_type = NULL WHERE ghost IS TRUE AND user_type IS NOT NULL') - end -end diff --git a/db/migrate/20200313123934_add_index_on_user_id_type_source_type_ldap_and_created_at_to_members.rb b/db/migrate/20200313123934_add_index_on_user_id_type_source_type_ldap_and_created_at_to_members.rb deleted file mode 100644 index c4dde7086c2..00000000000 --- a/db/migrate/20200313123934_add_index_on_user_id_type_source_type_ldap_and_created_at_to_members.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnUserIdTypeSourceTypeLdapAndCreatedAtToMembers < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_members_on_user_id_created_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :members, [:user_id, :created_at], where: "ldap = TRUE AND type = 'GroupMember' AND source_type = 'Namespace'", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :members, INDEX_NAME - end -end diff --git a/db/migrate/20200313202430_add_index_chat_name_service_id.rb b/db/migrate/20200313202430_add_index_chat_name_service_id.rb deleted file mode 100644 index f4a88973751..00000000000 --- a/db/migrate/20200313202430_add_index_chat_name_service_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexChatNameServiceId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :chat_names, :service_id - end - - def down - remove_concurrent_index :chat_names, :service_id - end -end diff --git a/db/migrate/20200313203525_add_invalid_foreign_key_from_chat_name_to_service.rb b/db/migrate/20200313203525_add_invalid_foreign_key_from_chat_name_to_service.rb deleted file mode 100644 index c6e340693f8..00000000000 --- a/db/migrate/20200313203525_add_invalid_foreign_key_from_chat_name_to_service.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddInvalidForeignKeyFromChatNameToService < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :chat_names, :services, column: :service_id, on_delete: :cascade, validate: false - end - - def down - remove_foreign_key_if_exists :chat_names, column: :service_id - end -end diff --git a/db/migrate/20200314060834_add_scanned_resources_count_to_security_scan.rb b/db/migrate/20200314060834_add_scanned_resources_count_to_security_scan.rb deleted file mode 100644 index e8f7a693e99..00000000000 --- a/db/migrate/20200314060834_add_scanned_resources_count_to_security_scan.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true -class AddScannedResourcesCountToSecurityScan < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column :security_scans, :scanned_resources_count, :integer - end - - def down - remove_column :security_scans, :scanned_resources_count - end -end diff --git a/db/migrate/20200316111759_add_index_on_id_and_ldap_key_to_keys.rb b/db/migrate/20200316111759_add_index_on_id_and_ldap_key_to_keys.rb deleted file mode 100644 index 23e7b5ba7b9..00000000000 --- a/db/migrate/20200316111759_add_index_on_id_and_ldap_key_to_keys.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnIdAndLdapKeyToKeys < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_keys_on_id_and_ldap_key_type' - - disable_ddl_transaction! - - def up - add_concurrent_index :keys, [:id], where: "type = 'LDAPKey'", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :keys, INDEX_NAME - end -end diff --git a/db/migrate/20200316162648_add_index_on_namespace_id_and_id_to_projects.rb b/db/migrate/20200316162648_add_index_on_namespace_id_and_id_to_projects.rb deleted file mode 100644 index 96fbab1e2ea..00000000000 --- a/db/migrate/20200316162648_add_index_on_namespace_id_and_id_to_projects.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnNamespaceIdAndIdToProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, [:namespace_id, :id] - remove_concurrent_index :projects, :namespace_id - end - - def down - add_concurrent_index :projects, :namespace_id - remove_concurrent_index :projects, [:namespace_id, :id] - end -end diff --git a/db/migrate/20200316173312_add_vulnerability_export_project_foreign_key.rb b/db/migrate/20200316173312_add_vulnerability_export_project_foreign_key.rb deleted file mode 100644 index 84b96c64658..00000000000 --- a/db/migrate/20200316173312_add_vulnerability_export_project_foreign_key.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddVulnerabilityExportProjectForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :vulnerability_exports, :projects, column: :project_id, on_delete: :cascade, index: false - end - end - - def down - with_lock_retries do - remove_foreign_key :vulnerability_exports, column: :project_id - end - end -end diff --git a/db/migrate/20200317110602_add_migrating_user_highest_roles_table_index_to_users.rb b/db/migrate/20200317110602_add_migrating_user_highest_roles_table_index_to_users.rb deleted file mode 100644 index e67dc323c39..00000000000 --- a/db/migrate/20200317110602_add_migrating_user_highest_roles_table_index_to_users.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddMigratingUserHighestRolesTableIndexToUsers < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_for_migrating_user_highest_roles_table' - - disable_ddl_transaction! - - def up - add_concurrent_index :users, - :id, - where: "state = 'active' AND user_type IS NULL AND bot_type IS NULL AND ghost IS NOT TRUE", - name: INDEX_NAME - end - - def down - remove_concurrent_index :users, :id, name: INDEX_NAME - end -end diff --git a/db/migrate/20200317142110_add_vulnerability_export_user_foreign_key.rb b/db/migrate/20200317142110_add_vulnerability_export_user_foreign_key.rb deleted file mode 100644 index c4f685701b9..00000000000 --- a/db/migrate/20200317142110_add_vulnerability_export_user_foreign_key.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddVulnerabilityExportUserForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :vulnerability_exports, :users, column: :author_id, on_delete: :cascade, index: false - end - end - - def down - with_lock_retries do - remove_foreign_key :vulnerability_exports, column: :author_id - end - end -end diff --git a/db/migrate/20200318140400_create_vulnerability_user_mentions.rb b/db/migrate/20200318140400_create_vulnerability_user_mentions.rb deleted file mode 100644 index 919bc94cfa6..00000000000 --- a/db/migrate/20200318140400_create_vulnerability_user_mentions.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CreateVulnerabilityUserMentions < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :vulnerability_user_mentions do |t| - t.references :vulnerability, type: :bigint, index: false, null: false, foreign_key: { on_delete: :cascade } - t.references :note, type: :integer, - index: { where: 'note_id IS NOT NULL', unique: true }, null: true, foreign_key: { on_delete: :cascade } - t.integer :mentioned_users_ids, array: true - t.integer :mentioned_projects_ids, array: true - t.integer :mentioned_groups_ids, array: true - end - - add_index :vulnerability_user_mentions, [:vulnerability_id], where: 'note_id is null', unique: true, name: 'index_vulns_user_mentions_on_vulnerability_id' - add_index :vulnerability_user_mentions, [:vulnerability_id, :note_id], unique: true, name: 'index_vulns_user_mentions_on_vulnerability_id_and_note_id' - end -end diff --git a/db/migrate/20200318152134_adds_sha256_to_package_files.rb b/db/migrate/20200318152134_adds_sha256_to_package_files.rb deleted file mode 100644 index 26d2c1b97d4..00000000000 --- a/db/migrate/20200318152134_adds_sha256_to_package_files.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddsSha256ToPackageFiles < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :packages_package_files, :file_sha256, :binary - end -end diff --git a/db/migrate/20200318162148_add_external_key_to_issues_table.rb b/db/migrate/20200318162148_add_external_key_to_issues_table.rb deleted file mode 100644 index b98937861be..00000000000 --- a/db/migrate/20200318162148_add_external_key_to_issues_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddExternalKeyToIssuesTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :issues, :external_key, :string, limit: 255 # rubocop:disable Migration/PreventStrings - end - end - - def down - with_lock_retries do - remove_column :issues, :external_key - end - end -end diff --git a/db/migrate/20200318163148_add_index_on_external_key_to_issues_table.rb b/db/migrate/20200318163148_add_index_on_external_key_to_issues_table.rb deleted file mode 100644 index adca6c3b493..00000000000 --- a/db/migrate/20200318163148_add_index_on_external_key_to_issues_table.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnExternalKeyToIssuesTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index(:issues, [:project_id, :external_key], unique: true, where: 'external_key IS NOT NULL') - end - - def down - remove_concurrent_index(:issues, [:project_id, :external_key]) - end -end diff --git a/db/migrate/20200318164448_add_external_key_to_epics_table.rb b/db/migrate/20200318164448_add_external_key_to_epics_table.rb deleted file mode 100644 index dee2ca98f36..00000000000 --- a/db/migrate/20200318164448_add_external_key_to_epics_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddExternalKeyToEpicsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :epics, :external_key, :string, limit: 255 # rubocop:disable Migration/PreventStrings - end - end - - def down - with_lock_retries do - remove_column :epics, :external_key - end - end -end diff --git a/db/migrate/20200318165448_add_index_on_external_key_to_epics_table.rb b/db/migrate/20200318165448_add_index_on_external_key_to_epics_table.rb deleted file mode 100644 index 0f3b2dbe3ee..00000000000 --- a/db/migrate/20200318165448_add_index_on_external_key_to_epics_table.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnExternalKeyToEpicsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index(:epics, [:group_id, :external_key], unique: true, where: 'external_key IS NOT NULL') - end - - def down - remove_concurrent_index(:epics, [:group_id, :external_key]) - end -end diff --git a/db/migrate/20200318175008_add_index_on_id_and_archived_and_pending_delete_to_projects.rb b/db/migrate/20200318175008_add_index_on_id_and_archived_and_pending_delete_to_projects.rb deleted file mode 100644 index 9dba8537764..00000000000 --- a/db/migrate/20200318175008_add_index_on_id_and_archived_and_pending_delete_to_projects.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnIdAndArchivedAndPendingDeleteToProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_projects_on_id_and_archived_and_pending_delete' - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, :id, where: "archived = FALSE AND pending_delete = FALSE", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :projects, INDEX_NAME - end -end diff --git a/db/migrate/20200318183553_create_pypi_package_metadata.rb b/db/migrate/20200318183553_create_pypi_package_metadata.rb deleted file mode 100644 index 6ebe70da643..00000000000 --- a/db/migrate/20200318183553_create_pypi_package_metadata.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class CreatePypiPackageMetadata < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def change - create_table :packages_pypi_metadata, id: false do |t| - t.references :package, primary_key: true, index: false, default: nil, foreign_key: { to_table: :packages_packages, on_delete: :cascade }, type: :bigint - t.string "required_python", null: false, limit: 50 # rubocop:disable Migration/PreventStrings - end - end -end diff --git a/db/migrate/20200319123041_update_plan_limits_defaults.rb b/db/migrate/20200319123041_update_plan_limits_defaults.rb deleted file mode 100644 index 252af26cb7f..00000000000 --- a/db/migrate/20200319123041_update_plan_limits_defaults.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class UpdatePlanLimitsDefaults < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - change_column_default :plan_limits, :project_hooks, 100 - change_column_default :plan_limits, :group_hooks, 50 - change_column_default :plan_limits, :ci_project_subscriptions, 2 - change_column_default :plan_limits, :ci_pipeline_schedules, 10 - end - - def down - change_column_default :plan_limits, :project_hooks, 0 - change_column_default :plan_limits, :group_hooks, 0 - change_column_default :plan_limits, :ci_project_subscriptions, 0 - change_column_default :plan_limits, :ci_pipeline_schedules, 0 - end -end diff --git a/db/migrate/20200319124127_create_metrics_dashboard_annotations.rb b/db/migrate/20200319124127_create_metrics_dashboard_annotations.rb deleted file mode 100644 index 9e10299b4f8..00000000000 --- a/db/migrate/20200319124127_create_metrics_dashboard_annotations.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class CreateMetricsDashboardAnnotations < ActiveRecord::Migration[6.0] - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :metrics_dashboard_annotations do |t| - t.datetime_with_timezone :starting_at, null: false - t.datetime_with_timezone :ending_at - t.references :environment, index: false, foreign_key: { on_delete: :cascade }, null: true - t.references :cluster, index: false, foreign_key: { on_delete: :cascade }, null: true - t.string :dashboard_path, null: false, limit: 255 - t.string :panel_xid, limit: 255 - t.text :description, null: false, limit: 255 # rubocop:disable Migration/AddLimitToTextColumns - - t.index %i(environment_id dashboard_path starting_at ending_at), where: 'environment_id IS NOT NULL', name: "index_metrics_dashboard_annotations_on_environment_id_and_3_col" - t.index %i(cluster_id dashboard_path starting_at ending_at), where: 'cluster_id IS NOT NULL', name: "index_metrics_dashboard_annotations_on_cluster_id_and_3_columns" - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200319203901_add_index_on_users_unlock_token.rb b/db/migrate/20200319203901_add_index_on_users_unlock_token.rb deleted file mode 100644 index 931e685f3fe..00000000000 --- a/db/migrate/20200319203901_add_index_on_users_unlock_token.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnUsersUnlockToken < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_users_on_unlock_token' - - disable_ddl_transaction! - - def up - add_concurrent_index :users, :unlock_token, unique: true, name: INDEX_NAME - end - - def down - remove_concurrent_index :users, :unlock_token, unique: true, name: INDEX_NAME - end -end diff --git a/db/migrate/20200320112455_add_cost_factor_fileds_to_ci_runners.rb b/db/migrate/20200320112455_add_cost_factor_fileds_to_ci_runners.rb deleted file mode 100644 index ca92b395b6f..00000000000 --- a/db/migrate/20200320112455_add_cost_factor_fileds_to_ci_runners.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddCostFactorFiledsToCiRunners < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column_with_default(:ci_runners, :public_projects_minutes_cost_factor, :float, allow_null: false, default: 0.0) # rubocop:disable Migration/AddColumnWithDefault - add_column_with_default(:ci_runners, :private_projects_minutes_cost_factor, :float, allow_null: false, default: 1.0) # rubocop:disable Migration/AddColumnWithDefault - end - - def down - remove_column(:ci_runners, :public_projects_minutes_cost_factor) - remove_column(:ci_runners, :private_projects_minutes_cost_factor) - end -end diff --git a/db/migrate/20200320123839_add_letsencrypt_errors_to_pages_domains.rb b/db/migrate/20200320123839_add_letsencrypt_errors_to_pages_domains.rb deleted file mode 100644 index 6e7c37918e1..00000000000 --- a/db/migrate/20200320123839_add_letsencrypt_errors_to_pages_domains.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddLetsencryptErrorsToPagesDomains < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column_with_default :pages_domains, :auto_ssl_failed, :boolean, default: false # rubocop:disable Migration/AddColumnWithDefault - end - - def down - remove_column :pages_domains, :auto_ssl_failed - end -end diff --git a/db/migrate/20200320212400_add_project_show_default_award_emojis.rb b/db/migrate/20200320212400_add_project_show_default_award_emojis.rb deleted file mode 100644 index c8238f75455..00000000000 --- a/db/migrate/20200320212400_add_project_show_default_award_emojis.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddProjectShowDefaultAwardEmojis < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def change - add_column :project_settings, :show_default_award_emojis, :boolean, default: true, null: false - end -end diff --git a/db/migrate/20200323071918_add_bio_to_user_details.rb b/db/migrate/20200323071918_add_bio_to_user_details.rb deleted file mode 100644 index 9ef9d553215..00000000000 --- a/db/migrate/20200323071918_add_bio_to_user_details.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddBioToUserDetails < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - # rubocop:disable Migration/PreventStrings - def up - # rubocop:disable Migration/AddColumnWithDefault - add_column_with_default(:user_details, :bio, :string, default: '', allow_null: false, limit: 255) - # rubocop:enable Migration/AddColumnWithDefault - end - # rubocop:enable Migration/PreventStrings - - def down - remove_column(:user_details, :bio) - end -end diff --git a/db/migrate/20200323074147_add_temp_index_on_users_bio.rb b/db/migrate/20200323074147_add_temp_index_on_users_bio.rb deleted file mode 100644 index 4b26bb971f5..00000000000 --- a/db/migrate/20200323074147_add_temp_index_on_users_bio.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddTempIndexOnUsersBio < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'tmp_idx_on_user_id_where_bio_is_filled' - - disable_ddl_transaction! - - def up - add_concurrent_index :users, :id, where: "(COALESCE(bio, '') IS DISTINCT FROM '')", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :users, INDEX_NAME - end -end diff --git a/db/migrate/20200323075043_add_max_personal_access_token_lifetime_to_namespaces.rb b/db/migrate/20200323075043_add_max_personal_access_token_lifetime_to_namespaces.rb deleted file mode 100644 index 7388d6bbc13..00000000000 --- a/db/migrate/20200323075043_add_max_personal_access_token_lifetime_to_namespaces.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddMaxPersonalAccessTokenLifetimeToNamespaces < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :namespaces, :max_personal_access_token_lifetime, :integer # rubocop:disable Migration/AddColumnsToWideTables - end - end - - def down - with_lock_retries do - remove_column :namespaces, :max_personal_access_token_lifetime - end - end -end diff --git a/db/migrate/20200323122201_add_index_on_user_and_created_at_to_ci_builds.rb b/db/migrate/20200323122201_add_index_on_user_and_created_at_to_ci_builds.rb deleted file mode 100644 index d0f63034502..00000000000 --- a/db/migrate/20200323122201_add_index_on_user_and_created_at_to_ci_builds.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnUserAndCreatedAtToCiBuilds < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'index_ci_builds_on_user_id_and_created_at_and_type_eq_ci_build' - - def up - add_concurrent_index :ci_builds, [:user_id, :created_at], where: "type = 'Ci::Build'", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :ci_builds, INDEX_NAME - end -end diff --git a/db/migrate/20200323134519_add_api_indexes_for_archived_projects.rb b/db/migrate/20200323134519_add_api_indexes_for_archived_projects.rb deleted file mode 100644 index cacf427dbe4..00000000000 --- a/db/migrate/20200323134519_add_api_indexes_for_archived_projects.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class AddApiIndexesForArchivedProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - PUBLIC_AND_ARCHIVED_INDEX_NAME = "index_projects_api_created_at_id_for_archived_vis20" - ARCHIVED_INDEX_NAME = "index_projects_api_created_at_id_for_archived" - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, [:created_at, :id], - where: "archived = true AND visibility_level = 20 AND pending_delete = false", - name: PUBLIC_AND_ARCHIVED_INDEX_NAME - - add_concurrent_index :projects, [:created_at, :id], where: "archived = true AND pending_delete = false", - name: ARCHIVED_INDEX_NAME - end - - def down - remove_concurrent_index_by_name :projects, ARCHIVED_INDEX_NAME - - remove_concurrent_index_by_name :projects, PUBLIC_AND_ARCHIVED_INDEX_NAME - end -end diff --git a/db/migrate/20200324093258_add_index_on_id_creator_id_and_created_at_to_projects_table.rb b/db/migrate/20200324093258_add_index_on_id_creator_id_and_created_at_to_projects_table.rb deleted file mode 100644 index 6c4d59af5d6..00000000000 --- a/db/migrate/20200324093258_add_index_on_id_creator_id_and_created_at_to_projects_table.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnIdCreatorIdAndCreatedAtToProjectsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_service_desk_enabled_projects_on_id_creator_id_created_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, [:id, :creator_id, :created_at], where: '"projects"."service_desk_enabled" = TRUE', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :projects, INDEX_NAME - end -end diff --git a/db/migrate/20200324115359_add_namespace_storage_size_limit_to_application_settings.rb b/db/migrate/20200324115359_add_namespace_storage_size_limit_to_application_settings.rb deleted file mode 100644 index 793dc4678c6..00000000000 --- a/db/migrate/20200324115359_add_namespace_storage_size_limit_to_application_settings.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddNamespaceStorageSizeLimitToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - add_column_with_default :application_settings, :namespace_storage_size_limit, :bigint, default: 0 # rubocop:disable Migration/AddColumnWithDefault - end - - def down - remove_column :application_settings, :namespace_storage_size_limit - end -end diff --git a/db/migrate/20200325094612_add_allow_merge_on_skipped_pipeline_to_project_settings.rb b/db/migrate/20200325094612_add_allow_merge_on_skipped_pipeline_to_project_settings.rb deleted file mode 100644 index 8575dd2f080..00000000000 --- a/db/migrate/20200325094612_add_allow_merge_on_skipped_pipeline_to_project_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddAllowMergeOnSkippedPipelineToProjectSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :project_settings, :allow_merge_on_skipped_pipeline, :boolean - end -end diff --git a/db/migrate/20200325104755_add_push_rules_id_to_project_settings.rb b/db/migrate/20200325104755_add_push_rules_id_to_project_settings.rb deleted file mode 100644 index 93de736436b..00000000000 --- a/db/migrate/20200325104755_add_push_rules_id_to_project_settings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPushRulesIdToProjectSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :project_settings, :push_rule_id, :bigint - end - end - - def down - with_lock_retries do - remove_column :project_settings, :push_rule_id - end - end -end diff --git a/db/migrate/20200325104756_add_push_rules_foreign_key_to_project_settings.rb b/db/migrate/20200325104756_add_push_rules_foreign_key_to_project_settings.rb deleted file mode 100644 index 41ad8d73b4c..00000000000 --- a/db/migrate/20200325104756_add_push_rules_foreign_key_to_project_settings.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddPushRulesForeignKeyToProjectSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - add_concurrent_index :project_settings, :push_rule_id, unique: true - add_concurrent_foreign_key :project_settings, :push_rules, column: :push_rule_id, on_delete: :cascade - end - - def down - remove_foreign_key_if_exists :project_settings, column: :push_rule_id - remove_concurrent_index :project_settings, :push_rule_id - end -end diff --git a/db/migrate/20200325104833_add_push_rules_id_to_application_settings.rb b/db/migrate/20200325104833_add_push_rules_id_to_application_settings.rb deleted file mode 100644 index 4650f1734c0..00000000000 --- a/db/migrate/20200325104833_add_push_rules_id_to_application_settings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPushRulesIdToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :application_settings, :push_rule_id, :bigint - end - end - - def down - with_lock_retries do - remove_column :application_settings, :push_rule_id - end - end -end diff --git a/db/migrate/20200325104834_add_push_rules_foreign_key_to_application_settings.rb b/db/migrate/20200325104834_add_push_rules_foreign_key_to_application_settings.rb deleted file mode 100644 index 5263250833d..00000000000 --- a/db/migrate/20200325104834_add_push_rules_foreign_key_to_application_settings.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddPushRulesForeignKeyToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - add_concurrent_index :application_settings, :push_rule_id, unique: true - add_concurrent_foreign_key :application_settings, :push_rules, column: :push_rule_id, on_delete: :nullify - end - - def down - remove_concurrent_index :application_settings, :push_rule_id - remove_foreign_key_if_exists :application_settings, column: :push_rule_id - end -end diff --git a/db/migrate/20200325111432_add_issues_create_limit_to_application_settings.rb b/db/migrate/20200325111432_add_issues_create_limit_to_application_settings.rb deleted file mode 100644 index 60da96ccf33..00000000000 --- a/db/migrate/20200325111432_add_issues_create_limit_to_application_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddIssuesCreateLimitToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :issues_create_limit, :integer, default: 300, null: false - end -end diff --git a/db/migrate/20200325152327_add_seat_link_enabled_to_application_settings.rb b/db/migrate/20200325152327_add_seat_link_enabled_to_application_settings.rb deleted file mode 100644 index fbea3ad1227..00000000000 --- a/db/migrate/20200325152327_add_seat_link_enabled_to_application_settings.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddSeatLinkEnabledToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column_with_default(:application_settings, :seat_link_enabled, # rubocop:disable Migration/AddColumnWithDefault - :boolean, - default: true, - allow_null: false) - end - - def down - remove_column(:application_settings, :seat_link_enabled) - end -end diff --git a/db/migrate/20200325160952_add_index_on_name_type_eq_ci_build_to_ci_builds.rb b/db/migrate/20200325160952_add_index_on_name_type_eq_ci_build_to_ci_builds.rb deleted file mode 100644 index 7e15c3ad11d..00000000000 --- a/db/migrate/20200325160952_add_index_on_name_type_eq_ci_build_to_ci_builds.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnNameTypeEqCiBuildToCiBuilds < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'index_ci_builds_on_name_and_security_type_eq_ci_build' - - def up - add_concurrent_index :ci_builds, [:name, :id], - name: INDEX_NAME, - where: "((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('license_scanning'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text)" - end - - def down - remove_concurrent_index_by_name :ci_builds, INDEX_NAME - end -end diff --git a/db/migrate/20200325183636_add_api_index_for_internal_projects.rb b/db/migrate/20200325183636_add_api_index_for_internal_projects.rb deleted file mode 100644 index ce47f1f3ded..00000000000 --- a/db/migrate/20200325183636_add_api_index_for_internal_projects.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddApiIndexForInternalProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INTERNAL_PROJECTS_INDEX_NAME = "index_projects_api_created_at_id_for_vis10" - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, [:created_at, :id], - where: "visibility_level = 10 AND pending_delete = false", - name: INTERNAL_PROJECTS_INDEX_NAME - end - - def down - remove_concurrent_index_by_name :projects, INTERNAL_PROJECTS_INDEX_NAME - end -end diff --git a/db/migrate/20200326114443_create_jira_imports_table.rb b/db/migrate/20200326114443_create_jira_imports_table.rb deleted file mode 100644 index d53ccb166b0..00000000000 --- a/db/migrate/20200326114443_create_jira_imports_table.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class CreateJiraImportsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - # rubocop:disable Migration/PreventStrings - def change - create_table :jira_imports do |t| - t.integer :project_id, null: false, limit: 8 - t.integer :user_id, limit: 8 - t.integer :label_id, limit: 8 - t.timestamps_with_timezone - t.datetime_with_timezone :finished_at - t.integer :jira_project_xid, null: false, limit: 8 - t.integer :total_issue_count, null: false, default: 0, limit: 4 - t.integer :imported_issues_count, null: false, default: 0, limit: 4 - t.integer :failed_to_import_count, null: false, default: 0, limit: 4 - t.integer :status, limit: 2, null: false, default: 0 - t.string :jid, limit: 255 - t.string :jira_project_key, null: false, limit: 255 - t.string :jira_project_name, null: false, limit: 255 - end - - add_index :jira_imports, [:project_id, :jira_project_key], name: 'index_jira_imports_on_project_id_and_jira_project_key' - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200326122700_create_diff_note_positions.rb b/db/migrate/20200326122700_create_diff_note_positions.rb deleted file mode 100644 index d37f7fef078..00000000000 --- a/db/migrate/20200326122700_create_diff_note_positions.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class CreateDiffNotePositions < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # rubocop:disable Migration/PreventStrings - def up - with_lock_retries do - create_table :diff_note_positions do |t| - t.references :note, foreign_key: { on_delete: :cascade }, null: false, index: false - t.integer :old_line - t.integer :new_line - t.integer :diff_content_type, limit: 2, null: false - t.integer :diff_type, limit: 2, null: false - t.string :line_code, limit: 255, null: false - t.binary :base_sha, null: false - t.binary :start_sha, null: false - t.binary :head_sha, null: false - t.text :old_path, null: false - t.text :new_path, null: false - - t.index [:note_id, :diff_type], unique: true - end - end - end - # rubocop:enable Migration/PreventStrings - # rubocop:enable Migration/AddLimitToTextColumns - - def down - drop_table :diff_note_positions - end -end diff --git a/db/migrate/20200326124443_add_projects_fk_to_jira_imports_table.rb b/db/migrate/20200326124443_add_projects_fk_to_jira_imports_table.rb deleted file mode 100644 index 654d35619e3..00000000000 --- a/db/migrate/20200326124443_add_projects_fk_to_jira_imports_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddProjectsFkToJiraImportsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :jira_imports, :projects, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :jira_imports, :projects - end - end -end diff --git a/db/migrate/20200326134443_add_users_fk_to_jira_imports_table.rb b/db/migrate/20200326134443_add_users_fk_to_jira_imports_table.rb deleted file mode 100644 index 429f72628e2..00000000000 --- a/db/migrate/20200326134443_add_users_fk_to_jira_imports_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddUsersFkToJiraImportsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :jira_imports, :users, on_delete: :nullify - end - end - - def down - with_lock_retries do - remove_foreign_key :jira_imports, :users - end - end -end diff --git a/db/migrate/20200326135443_add_users_fk_index_on_jira_imports_table.rb b/db/migrate/20200326135443_add_users_fk_index_on_jira_imports_table.rb deleted file mode 100644 index 5a26672f305..00000000000 --- a/db/migrate/20200326135443_add_users_fk_index_on_jira_imports_table.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddUsersFkIndexOnJiraImportsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :jira_imports, :user_id - end - - def down - remove_concurrent_index :jira_imports, :user_id - end -end diff --git a/db/migrate/20200326144443_add_labels_fk_to_jira_imports_table.rb b/db/migrate/20200326144443_add_labels_fk_to_jira_imports_table.rb deleted file mode 100644 index 9bcadcb61c1..00000000000 --- a/db/migrate/20200326144443_add_labels_fk_to_jira_imports_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddLabelsFkToJiraImportsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :jira_imports, :labels, on_delete: :nullify - end - end - - def down - with_lock_retries do - remove_foreign_key :jira_imports, :labels - end - end -end diff --git a/db/migrate/20200326145443_add_labels_fk_index_on_jira_imports_table.rb b/db/migrate/20200326145443_add_labels_fk_index_on_jira_imports_table.rb deleted file mode 100644 index d71c6f07989..00000000000 --- a/db/migrate/20200326145443_add_labels_fk_index_on_jira_imports_table.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddLabelsFkIndexOnJiraImportsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :jira_imports, :label_id - end - - def down - remove_concurrent_index :jira_imports, :label_id - end -end diff --git a/db/migrate/20200330074719_add_index_for_group_vsm_usage_ping.rb b/db/migrate/20200330074719_add_index_for_group_vsm_usage_ping.rb deleted file mode 100644 index 55ae2383d71..00000000000 --- a/db/migrate/20200330074719_add_index_for_group_vsm_usage_ping.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForGroupVsmUsagePing < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_analytics_cycle_analytics_group_stages_custom_only' - - disable_ddl_transaction! - - def up - add_concurrent_index :analytics_cycle_analytics_group_stages, :id, where: 'custom = true', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :analytics_cycle_analytics_group_stages, INDEX_NAME - end -end diff --git a/db/migrate/20200330121000_add_confidential_attribute_to_epics.rb b/db/migrate/20200330121000_add_confidential_attribute_to_epics.rb deleted file mode 100644 index 4db227728c8..00000000000 --- a/db/migrate/20200330121000_add_confidential_attribute_to_epics.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddConfidentialAttributeToEpics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column_with_default(:epics, :confidential, :boolean, default: false) # rubocop:disable Migration/AddColumnWithDefault - end - - def down - remove_column(:epics, :confidential) - end -end diff --git a/db/migrate/20200330123739_remove_index_ci_builds_on_name_for_security_reports_values.rb b/db/migrate/20200330123739_remove_index_ci_builds_on_name_for_security_reports_values.rb deleted file mode 100644 index 7ab57183e18..00000000000 --- a/db/migrate/20200330123739_remove_index_ci_builds_on_name_for_security_reports_values.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexCiBuildsOnNameForSecurityReportsValues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'index_ci_builds_on_name_for_security_reports_values' - - def up - remove_concurrent_index_by_name :ci_builds, INDEX_NAME - end - - def down - add_concurrent_index :ci_builds, - :name, - name: INDEX_NAME, - where: "((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('license_scanning'::character varying)::text]))" - end -end diff --git a/db/migrate/20200330132913_add_index_on_author_id_and_created_at_and_id_to_notes.rb b/db/migrate/20200330132913_add_index_on_author_id_and_created_at_and_id_to_notes.rb deleted file mode 100644 index 3b0a63ee565..00000000000 --- a/db/migrate/20200330132913_add_index_on_author_id_and_created_at_and_id_to_notes.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnAuthorIdAndCreatedAtAndIdToNotes < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :notes, [:author_id, :created_at, :id] - remove_concurrent_index :notes, [:author_id, :created_at] - end - - def down - add_concurrent_index :notes, [:author_id, :created_at] - remove_concurrent_index :notes, [:author_id, :created_at, :id] - end -end diff --git a/db/migrate/20200330203826_drop_fk_in_ci_ref.rb b/db/migrate/20200330203826_drop_fk_in_ci_ref.rb deleted file mode 100644 index 08cb4aaddab..00000000000 --- a/db/migrate/20200330203826_drop_fk_in_ci_ref.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class DropFkInCiRef < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - remove_foreign_key_if_exists :ci_refs, column: :project_id - end - with_lock_retries do - remove_foreign_key_if_exists :ci_refs, column: :last_updated_by_pipeline_id - end - end - - def down - add_foreign_key_if_not_exists :ci_refs, :projects, column: :project_id, on_delete: :cascade - add_foreign_key_if_not_exists :ci_refs, :ci_pipelines, column: :last_updated_by_pipeline_id, on_delete: :nullify - end - - private - - def add_foreign_key_if_not_exists(source, target, column:, on_delete:) - return unless table_exists?(source) - return if foreign_key_exists?(source, target, column: column) - - add_concurrent_foreign_key(source, target, column: column, on_delete: on_delete) - end -end diff --git a/db/migrate/20200330203837_recreate_ci_ref.rb b/db/migrate/20200330203837_recreate_ci_ref.rb deleted file mode 100644 index 734795f594f..00000000000 --- a/db/migrate/20200330203837_recreate_ci_ref.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -class RecreateCiRef < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - UNKNOWN_STATUS = 0 - - def up - with_lock_retries do - # rubocop:disable Migration/DropTable - drop_table :ci_refs - # rubocop:enable Migration/DropTable - - create_table :ci_refs do |t| - t.references :project, null: false, index: false, foreign_key: { on_delete: :cascade }, type: :bigint - t.integer :lock_version, null: false, default: 0 - t.integer :status, null: false, limit: 2, default: UNKNOWN_STATUS - t.text :ref_path, null: false # rubocop: disable Migration/AddLimitToTextColumns - t.index [:project_id, :ref_path], unique: true - end - end - end - - def down - with_lock_retries do - drop_table :ci_refs - - create_table :ci_refs do |t| - t.references :project, null: false, index: false, foreign_key: { on_delete: :cascade }, type: :integer - t.integer :lock_version, default: 0 - t.integer :last_updated_by_pipeline_id - t.boolean :tag, default: false, null: false - t.string :ref, null: false, limit: 255 - t.string :status, null: false, limit: 255 - t.foreign_key :ci_pipelines, column: :last_updated_by_pipeline_id, on_delete: :nullify - t.index [:project_id, :ref, :tag], unique: true - t.index [:last_updated_by_pipeline_id] - end - end - end -end diff --git a/db/migrate/20200331103637_add_ci_ref_id_to_ci_pipelines.rb b/db/migrate/20200331103637_add_ci_ref_id_to_ci_pipelines.rb deleted file mode 100644 index 9f2780670dc..00000000000 --- a/db/migrate/20200331103637_add_ci_ref_id_to_ci_pipelines.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddCiRefIdToCiPipelines < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :ci_pipelines, :ci_ref_id, :bigint - end - end - - def down - with_lock_retries do - remove_column :ci_pipelines, :ci_ref_id, :bigint - end - end -end diff --git a/db/migrate/20200331113728_add_index_to_ci_ref_id.rb b/db/migrate/20200331113728_add_index_to_ci_ref_id.rb deleted file mode 100644 index d3495fd4fa1..00000000000 --- a/db/migrate/20200331113728_add_index_to_ci_ref_id.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToCiRefId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - add_concurrent_index :ci_pipelines, [:ci_ref_id], where: 'ci_ref_id IS NOT NULL' - end - - def down - remove_concurrent_index :ci_pipelines, [:ci_ref_id], where: 'ci_ref_id IS NOT NULL' - end -end diff --git a/db/migrate/20200331113738_add_fk_to_ci_ref_id.rb b/db/migrate/20200331113738_add_fk_to_ci_ref_id.rb deleted file mode 100644 index 1a7a76904b1..00000000000 --- a/db/migrate/20200331113738_add_fk_to_ci_ref_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddFkToCiRefId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :ci_pipelines, :ci_refs, column: :ci_ref_id, on_delete: :nullify - end - - def down - with_lock_retries do - remove_foreign_key_if_exists :ci_pipelines, column: :ci_ref_id - end - end -end diff --git a/db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb b/db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb deleted file mode 100644 index 6af8c6db939..00000000000 --- a/db/migrate/20200331132103_add_project_compliance_framework_settings_table.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddProjectComplianceFrameworkSettingsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :project_compliance_framework_settings, id: false do |t| - t.references :project, primary_key: true, null: false, index: true, foreign_key: { on_delete: :cascade } - t.integer :framework, null: false, limit: 2 - end - end - end - - def down - with_lock_retries do - drop_table :project_compliance_framework_settings - end - end -end diff --git a/db/migrate/20200331195952_add_container_expiration_policies_enable_historic_entries_to_application_settings.rb b/db/migrate/20200331195952_add_container_expiration_policies_enable_historic_entries_to_application_settings.rb deleted file mode 100644 index b4cbb04b93a..00000000000 --- a/db/migrate/20200331195952_add_container_expiration_policies_enable_historic_entries_to_application_settings.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddContainerExpirationPoliciesEnableHistoricEntriesToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column_with_default(:application_settings, # rubocop:disable Migration/AddColumnWithDefault - :container_expiration_policies_enable_historic_entries, - :boolean, - default: false, - allow_null: false) - end - - def down - remove_column(:application_settings, - :container_expiration_policies_enable_historic_entries) - end -end diff --git a/db/migrate/20200331220930_enable_container_expiration_policies_by_default.rb b/db/migrate/20200331220930_enable_container_expiration_policies_by_default.rb deleted file mode 100644 index 46393416eb7..00000000000 --- a/db/migrate/20200331220930_enable_container_expiration_policies_by_default.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class EnableContainerExpirationPoliciesByDefault < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :container_expiration_policies, :enabled, true - end - end - - def down - with_lock_retries do - change_column_default :container_expiration_policies, :enabled, false - end - end -end diff --git a/db/migrate/20200401095430_add_jsonb_to_geo_node_status_table.rb b/db/migrate/20200401095430_add_jsonb_to_geo_node_status_table.rb deleted file mode 100644 index 46eb826341c..00000000000 --- a/db/migrate/20200401095430_add_jsonb_to_geo_node_status_table.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddJsonbToGeoNodeStatusTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_table :geo_node_statuses do |t| - t.jsonb :status, null: false, default: {} - end - end -end diff --git a/db/migrate/20200401211005_create_operations_user_lists.rb b/db/migrate/20200401211005_create_operations_user_lists.rb deleted file mode 100644 index b0b02ca8886..00000000000 --- a/db/migrate/20200401211005_create_operations_user_lists.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateOperationsUserLists < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :operations_user_lists do |t| - t.references :project, index: false, foreign_key: { on_delete: :cascade }, null: false - t.timestamps_with_timezone - t.integer :iid, null: false - t.string :name, null: false, limit: 255 # rubocop:disable Migration/PreventStrings - t.text :user_xids, null: false, default: '' # rubocop:disable Migration/AddLimitToTextColumns - - t.index [:project_id, :iid], unique: true - t.index [:project_id, :name], unique: true - end - end -end diff --git a/db/migrate/20200402001106_add_cluster_type_index_to_clusters.rb b/db/migrate/20200402001106_add_cluster_type_index_to_clusters.rb deleted file mode 100644 index b328b8681c1..00000000000 --- a/db/migrate/20200402001106_add_cluster_type_index_to_clusters.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddClusterTypeIndexToClusters < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - INDEX_NAME = 'index_clusters_on_enabled_cluster_type_id_and_created_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :clusters, [:enabled, :cluster_type, :id, :created_at], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :clusters, INDEX_NAME - end -end diff --git a/db/migrate/20200402115013_add_index_on_modsecurity_to_ingress.rb b/db/migrate/20200402115013_add_index_on_modsecurity_to_ingress.rb deleted file mode 100644 index 8bd2d957092..00000000000 --- a/db/migrate/20200402115013_add_index_on_modsecurity_to_ingress.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnModsecurityToIngress < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_clusters_applications_ingress_on_modsecurity' - - disable_ddl_transaction! - - def up - add_concurrent_index :clusters_applications_ingress, [:modsecurity_enabled, :modsecurity_mode, :cluster_id], name: INDEX_NAME - end - - def down - remove_concurrent_index :clusters_applications_ingress, [:modsecurity_enabled, :modsecurity_mode, :cluster_id], name: INDEX_NAME - end -end diff --git a/db/migrate/20200402115623_add_index_on_successful_deployment_and_environment_id_to_deployments.rb b/db/migrate/20200402115623_add_index_on_successful_deployment_and_environment_id_to_deployments.rb deleted file mode 100644 index c86f7ad63f0..00000000000 --- a/db/migrate/20200402115623_add_index_on_successful_deployment_and_environment_id_to_deployments.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnSuccessfulDeploymentAndEnvironmentIdToDeployments < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_successful_deployments_on_cluster_id_and_environment_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :deployments, [:cluster_id, :environment_id], where: 'status = 2', name: INDEX_NAME - end - - def down - remove_concurrent_index :deployments, [:cluster_id, :environment_id], where: 'status = 2', name: INDEX_NAME - end -end diff --git a/db/migrate/20200402123926_add_line_metrics_to_mr_metrics.rb b/db/migrate/20200402123926_add_line_metrics_to_mr_metrics.rb deleted file mode 100644 index 1ca106e1614..00000000000 --- a/db/migrate/20200402123926_add_line_metrics_to_mr_metrics.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddLineMetricsToMrMetrics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :merge_request_metrics, :added_lines, :integer - add_column :merge_request_metrics, :removed_lines, :integer - end - end - - def down - with_lock_retries do - remove_column :merge_request_metrics, :added_lines, :integer - remove_column :merge_request_metrics, :removed_lines, :integer - end - end -end diff --git a/db/migrate/20200402124802_add_correlation_id_to_project_import_state.rb b/db/migrate/20200402124802_add_correlation_id_to_project_import_state.rb deleted file mode 100644 index 97eb01529cc..00000000000 --- a/db/migrate/20200402124802_add_correlation_id_to_project_import_state.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddCorrelationIdToProjectImportState < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def up - with_lock_retries do - add_column :project_mirror_data, :correlation_id_value, :string, limit: 128 - end - end - # rubocop:enable Migration/PreventStrings - - def down - with_lock_retries do - remove_column :project_mirror_data, :correlation_id_value - end - end -end diff --git a/db/migrate/20200402135250_add_delete_status_to_container_repository.rb b/db/migrate/20200402135250_add_delete_status_to_container_repository.rb deleted file mode 100644 index a0dbb307bfc..00000000000 --- a/db/migrate/20200402135250_add_delete_status_to_container_repository.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddDeleteStatusToContainerRepository < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column(:container_repositories, :status, :integer, limit: 2) - end - - def down - remove_column(:container_repositories, :status) - end -end diff --git a/db/migrate/20200402185044_create_clusters_applications_fluentd.rb b/db/migrate/20200402185044_create_clusters_applications_fluentd.rb deleted file mode 100644 index 2116b2ffe01..00000000000 --- a/db/migrate/20200402185044_create_clusters_applications_fluentd.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class CreateClustersApplicationsFluentd < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - create_table :clusters_applications_fluentd do |t| - t.integer :protocol, null: false, limit: 2 - t.integer :status, null: false - t.integer :port, null: false - t.references :cluster, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade } - t.timestamps_with_timezone null: false - t.string :version, null: false, limit: 255 - t.string :host, null: false, limit: 255 - t.text :status_reason # rubocop:disable Migration/AddLimitToTextColumns - end - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200403184110_add_partial_index_on_id_to_ci_job_artifacts.rb b/db/migrate/20200403184110_add_partial_index_on_id_to_ci_job_artifacts.rb deleted file mode 100644 index f5f9f167df3..00000000000 --- a/db/migrate/20200403184110_add_partial_index_on_id_to_ci_job_artifacts.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexOnIdToCiJobArtifacts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_ci_job_artifacts_file_store_is_null' - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_job_artifacts, :id, where: 'file_store IS NULL', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME - end -end diff --git a/db/migrate/20200403185127_add_partial_index_on_id_to_lfs_objects.rb b/db/migrate/20200403185127_add_partial_index_on_id_to_lfs_objects.rb deleted file mode 100644 index e72bb37eb0e..00000000000 --- a/db/migrate/20200403185127_add_partial_index_on_id_to_lfs_objects.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexOnIdToLfsObjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_lfs_objects_file_store_is_null' - - disable_ddl_transaction! - - def up - add_concurrent_index :lfs_objects, :id, where: 'file_store IS NULL', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :lfs_objects, INDEX_NAME - end -end diff --git a/db/migrate/20200403185422_add_partial_index_on_id_to_uploads.rb b/db/migrate/20200403185422_add_partial_index_on_id_to_uploads.rb deleted file mode 100644 index e5b532bad61..00000000000 --- a/db/migrate/20200403185422_add_partial_index_on_id_to_uploads.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexOnIdToUploads < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_uploads_store_is_null' - - disable_ddl_transaction! - - def up - add_concurrent_index :uploads, :id, where: 'store IS NULL', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :uploads, INDEX_NAME - end -end diff --git a/db/migrate/20200406095930_add_needs_ssl_renewal_user_provided_pages_domains_index.rb b/db/migrate/20200406095930_add_needs_ssl_renewal_user_provided_pages_domains_index.rb deleted file mode 100644 index 73db5e71b94..00000000000 --- a/db/migrate/20200406095930_add_needs_ssl_renewal_user_provided_pages_domains_index.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddNeedsSslRenewalUserProvidedPagesDomainsIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = 'index_pages_domains_need_auto_ssl_renewal_user_provided' - INDEX_SCOPE = "auto_ssl_enabled = true AND auto_ssl_failed = false AND certificate_source = 0" - - disable_ddl_transaction! - - def up - add_concurrent_index(:pages_domains, :id, where: INDEX_SCOPE, name: INDEX_NAME) - end - - def down - remove_concurrent_index(:pages_domains, :id, where: INDEX_SCOPE, name: INDEX_NAME) - end -end diff --git a/db/migrate/20200406100909_add_needs_ssl_renewal_valid_not_after_pages_domains_index.rb b/db/migrate/20200406100909_add_needs_ssl_renewal_valid_not_after_pages_domains_index.rb deleted file mode 100644 index 3c5db9ec082..00000000000 --- a/db/migrate/20200406100909_add_needs_ssl_renewal_valid_not_after_pages_domains_index.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddNeedsSslRenewalValidNotAfterPagesDomainsIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = 'index_pages_domains_need_auto_ssl_renewal_valid_not_after' - INDEX_SCOPE = "auto_ssl_enabled = true AND auto_ssl_failed = false" - - disable_ddl_transaction! - - def up - add_concurrent_index(:pages_domains, :certificate_valid_not_after, where: INDEX_SCOPE, name: INDEX_NAME) - end - - def down - remove_concurrent_index(:pages_domains, :certificate_valid_not_after, where: INDEX_SCOPE, name: INDEX_NAME) - end -end diff --git a/db/migrate/20200406102111_add_index_to_deployments_where_cluster_id_is_not_null.rb b/db/migrate/20200406102111_add_index_to_deployments_where_cluster_id_is_not_null.rb deleted file mode 100644 index 67ffba6af5e..00000000000 --- a/db/migrate/20200406102111_add_index_to_deployments_where_cluster_id_is_not_null.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToDeploymentsWhereClusterIdIsNotNull < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :deployments, :id, where: 'cluster_id IS NOT NULL', name: 'index_deployments_on_id_where_cluster_id_present' - end - - def down - remove_concurrent_index :deployments, :id, where: 'cluster_id IS NOT NULL', name: 'index_deployments_on_id_where_cluster_id_present' - end -end diff --git a/db/migrate/20200406132529_add_resource_state_events_table.rb b/db/migrate/20200406132529_add_resource_state_events_table.rb deleted file mode 100644 index ce241dff4dd..00000000000 --- a/db/migrate/20200406132529_add_resource_state_events_table.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddResourceStateEventsTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :resource_state_events, id: :bigserial do |t| - t.bigint :user_id, null: false - t.bigint :issue_id, null: true - t.bigint :merge_request_id, null: true - - t.datetime_with_timezone :created_at, null: false - t.integer :state, limit: 2, null: false - - t.index [:issue_id, :created_at], name: 'index_resource_state_events_on_issue_id_and_created_at' - t.index [:user_id], name: 'index_resource_state_events_on_user_id' - t.index [:merge_request_id], name: 'index_resource_state_events_on_merge_request_id' - end - end -end diff --git a/db/migrate/20200406135648_add_index_to_created_at_on_resource_milestone_events.rb b/db/migrate/20200406135648_add_index_to_created_at_on_resource_milestone_events.rb deleted file mode 100644 index 6b8b981990d..00000000000 --- a/db/migrate/20200406135648_add_index_to_created_at_on_resource_milestone_events.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToCreatedAtOnResourceMilestoneEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - INDEX_NAME = 'index_resource_milestone_events_created_at' - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :resource_milestone_events, :created_at, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :resource_milestone_events, INDEX_NAME - end -end diff --git a/db/migrate/20200406141452_add_index_to_issue_id_and_created_at_on_resource_weight_events.rb b/db/migrate/20200406141452_add_index_to_issue_id_and_created_at_on_resource_weight_events.rb deleted file mode 100644 index 94a1b589ff9..00000000000 --- a/db/migrate/20200406141452_add_index_to_issue_id_and_created_at_on_resource_weight_events.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToIssueIdAndCreatedAtOnResourceWeightEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - INDEX_NAME = 'index_resource_weight_events_on_issue_id_and_created_at' - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :resource_weight_events, [:issue_id, :created_at], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :resource_weight_events, INDEX_NAME - end -end diff --git a/db/migrate/20200406192059_add_write_registry_to_deploy_tokens.rb b/db/migrate/20200406192059_add_write_registry_to_deploy_tokens.rb deleted file mode 100644 index 9d1628bc42a..00000000000 --- a/db/migrate/20200406192059_add_write_registry_to_deploy_tokens.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddWriteRegistryToDeployTokens < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column_with_default(:deploy_tokens, :write_registry, :boolean, default: false, allow_null: false) # rubocop:disable Migration/AddColumnWithDefault - end - - def down - remove_column(:deploy_tokens, :write_registry) - end -end diff --git a/db/migrate/20200407120000_add_push_rule_id_to_groups.rb b/db/migrate/20200407120000_add_push_rule_id_to_groups.rb deleted file mode 100644 index 738f0a4c605..00000000000 --- a/db/migrate/20200407120000_add_push_rule_id_to_groups.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPushRuleIdToGroups < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :namespaces, :push_rule_id, :bigint # rubocop:disable Migration/AddColumnsToWideTables - end - end - - def down - with_lock_retries do - remove_column :namespaces, :push_rule_id - end - end -end diff --git a/db/migrate/20200407121321_add_push_rule_foreign_key_to_groups.rb b/db/migrate/20200407121321_add_push_rule_foreign_key_to_groups.rb deleted file mode 100644 index acc74b43659..00000000000 --- a/db/migrate/20200407121321_add_push_rule_foreign_key_to_groups.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddPushRuleForeignKeyToGroups < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - add_concurrent_index :namespaces, :push_rule_id, unique: true - add_concurrent_foreign_key :namespaces, :push_rules, column: :push_rule_id, on_delete: :nullify - end - - def down - remove_foreign_key_if_exists :namespaces, column: :push_rule_id - remove_concurrent_index :namespaces, :push_rule_id - end -end diff --git a/db/migrate/20200407171133_add_protected_tag_create_access_levels_user_id_foreign_key.rb b/db/migrate/20200407171133_add_protected_tag_create_access_levels_user_id_foreign_key.rb deleted file mode 100644 index 79532b8179c..00000000000 --- a/db/migrate/20200407171133_add_protected_tag_create_access_levels_user_id_foreign_key.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class AddProtectedTagCreateAccessLevelsUserIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_protected_tag_create_access_levels_user_id' - - disable_ddl_transaction! - - def up - with_lock_retries do - add_foreign_key(:protected_tag_create_access_levels, :users, on_delete: :cascade, validate: false, name: CONSTRAINT_NAME) - remove_foreign_key_if_exists(:protected_tag_create_access_levels, column: :user_id, on_delete: nil) - end - end - - def down - fk_exists = foreign_key_exists?(:protected_tag_create_access_levels, :users, column: :user_id, on_delete: nil) - - unless fk_exists - with_lock_retries do - add_foreign_key(:protected_tag_create_access_levels, :users, column: :user_id, validate: false) - end - end - - remove_foreign_key_if_exists(:protected_tag_create_access_levels, column: :user_id, name: CONSTRAINT_NAME) - - fk_name = concurrent_foreign_key_name(:protected_tag_create_access_levels, :user_id, prefix: 'fk_rails_') - validate_foreign_key(:protected_tag_create_access_levels, :user_id, name: fk_name) - end -end diff --git a/db/migrate/20200407171417_validate_protected_tag_create_access_levels_user_id_foreign_key.rb b/db/migrate/20200407171417_validate_protected_tag_create_access_levels_user_id_foreign_key.rb deleted file mode 100644 index baba65e0b7d..00000000000 --- a/db/migrate/20200407171417_validate_protected_tag_create_access_levels_user_id_foreign_key.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class ValidateProtectedTagCreateAccessLevelsUserIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_protected_tag_create_access_levels_user_id' - - def up - validate_foreign_key :protected_tag_create_access_levels, :user_id, name: CONSTRAINT_NAME - end - - def down - # no op - end -end diff --git a/db/migrate/20200407182205_create_partitioned_foreign_keys.rb b/db/migrate/20200407182205_create_partitioned_foreign_keys.rb deleted file mode 100644 index aca8116d2dd..00000000000 --- a/db/migrate/20200407182205_create_partitioned_foreign_keys.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class CreatePartitionedForeignKeys < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :partitioned_foreign_keys do |t| - t.boolean :cascade_delete, null: false, default: true - t.text :from_table, null: false - t.text :from_column, null: false - t.text :to_table, null: false - t.text :to_column, null: false - end - - add_text_limit :partitioned_foreign_keys, :from_table, 63 - add_text_limit :partitioned_foreign_keys, :from_column, 63 - add_text_limit :partitioned_foreign_keys, :to_table, 63 - add_text_limit :partitioned_foreign_keys, :to_column, 63 - - add_index :partitioned_foreign_keys, [:to_table, :from_table, :from_column], unique: true, - name: "index_partitioned_foreign_keys_unique_index" - end - - def down - drop_table :partitioned_foreign_keys - end -end diff --git a/db/migrate/20200407222647_create_project_repository_storage_moves.rb b/db/migrate/20200407222647_create_project_repository_storage_moves.rb deleted file mode 100644 index 402a1cdd4a6..00000000000 --- a/db/migrate/20200407222647_create_project_repository_storage_moves.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class CreateProjectRepositoryStorageMoves < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :project_repository_storage_moves do |t| - t.timestamps_with_timezone - t.integer :project_id, limit: 8, null: false - t.integer :state, limit: 2, default: 1, null: false - t.text :source_storage_name, null: false - t.text :destination_storage_name, null: false - end - - add_index :project_repository_storage_moves, :project_id - - add_text_limit(:project_repository_storage_moves, :source_storage_name, 255, constraint_name: 'project_repository_storage_moves_source_storage_name') - add_text_limit(:project_repository_storage_moves, :destination_storage_name, 255, constraint_name: 'project_repository_storage_moves_destination_storage_name') - end - - def down - remove_check_constraint(:project_repository_storage_moves, 'project_repository_storage_moves_source_storage_name') - remove_check_constraint(:project_repository_storage_moves, 'project_repository_storage_moves_destination_storage_name') - - drop_table :project_repository_storage_moves - end -end diff --git a/db/migrate/20200408125046_create_ci_freeze_periods.rb b/db/migrate/20200408125046_create_ci_freeze_periods.rb deleted file mode 100644 index 42a385150b8..00000000000 --- a/db/migrate/20200408125046_create_ci_freeze_periods.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class CreateCiFreezePeriods < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:ci_freeze_periods) - create_table :ci_freeze_periods do |t| - t.references :project, foreign_key: true, null: false - t.text :freeze_start, null: false - t.text :freeze_end, null: false - t.text :cron_timezone, null: false - - t.timestamps_with_timezone null: false - end - end - - add_text_limit :ci_freeze_periods, :freeze_start, 998 - add_text_limit :ci_freeze_periods, :freeze_end, 998 - add_text_limit :ci_freeze_periods, :cron_timezone, 255 - end - - def down - drop_table :ci_freeze_periods - end -end diff --git a/db/migrate/20200408133211_add_index_on_route_path_trigram.rb b/db/migrate/20200408133211_add_index_on_route_path_trigram.rb deleted file mode 100644 index 3329252bbd3..00000000000 --- a/db/migrate/20200408133211_add_index_on_route_path_trigram.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnRoutePathTrigram < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_routes_on_path_trigram' - - disable_ddl_transaction! - - def up - add_concurrent_index :routes, :path, name: INDEX_NAME, using: :gin, opclass: { path: :gin_trgm_ops } - end - - def down - remove_concurrent_index_by_name(:routes, INDEX_NAME) - end -end diff --git a/db/migrate/20200408153842_add_index_on_creator_id_and_id_on_projects.rb b/db/migrate/20200408153842_add_index_on_creator_id_and_id_on_projects.rb deleted file mode 100644 index 2cc91efcc36..00000000000 --- a/db/migrate/20200408153842_add_index_on_creator_id_and_id_on_projects.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnCreatorIdAndIdOnProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, [:creator_id, :id] - end - - def down - remove_concurrent_index :projects, [:creator_id, :id] - end -end diff --git a/db/migrate/20200408154331_add_protected_branch_merge_access_levels_user_id_foreign_key.rb b/db/migrate/20200408154331_add_protected_branch_merge_access_levels_user_id_foreign_key.rb deleted file mode 100644 index 0c5118c162b..00000000000 --- a/db/migrate/20200408154331_add_protected_branch_merge_access_levels_user_id_foreign_key.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class AddProtectedBranchMergeAccessLevelsUserIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_protected_branch_merge_access_levels_user_id' - - disable_ddl_transaction! - - def up - with_lock_retries do - add_foreign_key(:protected_branch_merge_access_levels, :users, on_delete: :cascade, validate: false, name: CONSTRAINT_NAME) - remove_foreign_key_if_exists(:protected_branch_merge_access_levels, column: :user_id, on_delete: nil) - end - end - - def down - fk_exists = foreign_key_exists?(:protected_branch_merge_access_levels, :users, column: :user_id, on_delete: nil) - - unless fk_exists - with_lock_retries do - add_foreign_key(:protected_branch_merge_access_levels, :users, column: :user_id, validate: false) - end - end - - remove_foreign_key_if_exists(:protected_branch_merge_access_levels, column: :user_id, name: CONSTRAINT_NAME) - - fk_name = concurrent_foreign_key_name(:protected_branch_merge_access_levels, :user_id, prefix: 'fk_rails_') - validate_foreign_key(:protected_branch_merge_access_levels, :user_id, name: fk_name) - end -end diff --git a/db/migrate/20200408154349_validate_protected_branch_merge_access_levels_user_id_foreign_key.rb b/db/migrate/20200408154349_validate_protected_branch_merge_access_levels_user_id_foreign_key.rb deleted file mode 100644 index c4ec957d607..00000000000 --- a/db/migrate/20200408154349_validate_protected_branch_merge_access_levels_user_id_foreign_key.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class ValidateProtectedBranchMergeAccessLevelsUserIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_protected_branch_merge_access_levels_user_id' - - def up - validate_foreign_key :protected_branch_merge_access_levels, :user_id, name: CONSTRAINT_NAME - end - - def down - # no op - end -end diff --git a/db/migrate/20200408154411_add_path_locks_user_id_foreign_key.rb b/db/migrate/20200408154411_add_path_locks_user_id_foreign_key.rb deleted file mode 100644 index aae79c175bc..00000000000 --- a/db/migrate/20200408154411_add_path_locks_user_id_foreign_key.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class AddPathLocksUserIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_path_locks_user_id' - - disable_ddl_transaction! - - def up - with_lock_retries do - add_foreign_key(:path_locks, :users, on_delete: :cascade, validate: false, name: CONSTRAINT_NAME) - remove_foreign_key_if_exists(:path_locks, column: :user_id, on_delete: nil) - end - end - - def down - fk_exists = foreign_key_exists?(:path_locks, :users, column: :user_id, on_delete: nil) - - unless fk_exists - with_lock_retries do - add_foreign_key(:path_locks, :users, column: :user_id, validate: false) - end - end - - remove_foreign_key_if_exists(:path_locks, column: :user_id, name: CONSTRAINT_NAME) - - fk_name = concurrent_foreign_key_name(:path_locks, :user_id, prefix: 'fk_rails_') - validate_foreign_key(:path_locks, :user_id, name: fk_name) - end -end diff --git a/db/migrate/20200408154428_validate_path_locks_user_id_foreign_key.rb b/db/migrate/20200408154428_validate_path_locks_user_id_foreign_key.rb deleted file mode 100644 index 500409ee44a..00000000000 --- a/db/migrate/20200408154428_validate_path_locks_user_id_foreign_key.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class ValidatePathLocksUserIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_path_locks_user_id' - - def up - validate_foreign_key :path_locks, :user_id, name: CONSTRAINT_NAME - end - - def down - # no op - end -end diff --git a/db/migrate/20200408154455_add_protected_branch_push_access_levels_user_id_foreign_key.rb b/db/migrate/20200408154455_add_protected_branch_push_access_levels_user_id_foreign_key.rb deleted file mode 100644 index 1cfe240df05..00000000000 --- a/db/migrate/20200408154455_add_protected_branch_push_access_levels_user_id_foreign_key.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class AddProtectedBranchPushAccessLevelsUserIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_protected_branch_push_access_levels_user_id' - - disable_ddl_transaction! - - def up - with_lock_retries do - add_foreign_key(:protected_branch_push_access_levels, :users, on_delete: :cascade, validate: false, name: CONSTRAINT_NAME) - remove_foreign_key_if_exists(:protected_branch_push_access_levels, column: :user_id, on_delete: nil) - end - end - - def down - fk_exists = foreign_key_exists?(:protected_branch_push_access_levels, :users, column: :user_id, on_delete: nil) - - unless fk_exists - with_lock_retries do - add_foreign_key(:protected_branch_push_access_levels, :users, column: :user_id, validate: false) - end - end - - remove_foreign_key_if_exists(:protected_branch_push_access_levels, column: :user_id, name: CONSTRAINT_NAME) - - fk_name = concurrent_foreign_key_name(:protected_branch_push_access_levels, :user_id, prefix: 'fk_rails_') - validate_foreign_key(:protected_branch_push_access_levels, :user_id, name: fk_name) - end -end diff --git a/db/migrate/20200408154533_validate_protected_branch_push_access_levels_user_id_foreign_key.rb b/db/migrate/20200408154533_validate_protected_branch_push_access_levels_user_id_foreign_key.rb deleted file mode 100644 index d6f9cab6d7e..00000000000 --- a/db/migrate/20200408154533_validate_protected_branch_push_access_levels_user_id_foreign_key.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class ValidateProtectedBranchPushAccessLevelsUserIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_protected_branch_push_access_levels_user_id' - - def up - validate_foreign_key :protected_branch_push_access_levels, :user_id, name: CONSTRAINT_NAME - end - - def down - # no op - end -end diff --git a/db/migrate/20200408154604_add_u2f_registrations_user_id_foreign_key.rb b/db/migrate/20200408154604_add_u2f_registrations_user_id_foreign_key.rb deleted file mode 100644 index cdb81d73c99..00000000000 --- a/db/migrate/20200408154604_add_u2f_registrations_user_id_foreign_key.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class AddU2fRegistrationsUserIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_u2f_registrations_user_id' - - disable_ddl_transaction! - - def up - with_lock_retries do - add_foreign_key(:u2f_registrations, :users, on_delete: :cascade, validate: false, name: CONSTRAINT_NAME) - remove_foreign_key_if_exists(:u2f_registrations, column: :user_id, on_delete: nil) - end - end - - def down - fk_exists = foreign_key_exists?(:u2f_registrations, :users, column: :user_id, on_delete: nil) - - unless fk_exists - with_lock_retries do - add_foreign_key(:u2f_registrations, :users, column: :user_id, validate: false) - end - end - - remove_foreign_key_if_exists(:u2f_registrations, column: :user_id, name: CONSTRAINT_NAME) - - fk_name = concurrent_foreign_key_name(:u2f_registrations, :user_id, prefix: 'fk_rails_') - validate_foreign_key(:u2f_registrations, :user_id, name: fk_name) - end -end diff --git a/db/migrate/20200408154624_validate_u2f_registrations_user_id_foreign_key.rb b/db/migrate/20200408154624_validate_u2f_registrations_user_id_foreign_key.rb deleted file mode 100644 index ff723a4793f..00000000000 --- a/db/migrate/20200408154624_validate_u2f_registrations_user_id_foreign_key.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true -# -class ValidateU2fRegistrationsUserIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_u2f_registrations_user_id' - - def up - validate_foreign_key :u2f_registrations, :user_id, name: CONSTRAINT_NAME - end - - def down - # no op - end -end diff --git a/db/migrate/20200408175424_add_index_on_creator_id_created_at_id_to_projects_table.rb b/db/migrate/20200408175424_add_index_on_creator_id_created_at_id_to_projects_table.rb deleted file mode 100644 index 70df38aea17..00000000000 --- a/db/migrate/20200408175424_add_index_on_creator_id_created_at_id_to_projects_table.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnCreatorIdCreatedAtIdToProjectsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, [:creator_id, :created_at, :id] - end - - def down - remove_concurrent_index :projects, [:creator_id, :created_at, :id] - end -end diff --git a/db/migrate/20200408212219_add_status_page_url_to_status_page_settings.rb b/db/migrate/20200408212219_add_status_page_url_to_status_page_settings.rb deleted file mode 100644 index 3b3849c109c..00000000000 --- a/db/migrate/20200408212219_add_status_page_url_to_status_page_settings.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddStatusPageUrlToStatusPageSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column :status_page_settings, :status_page_url, :text - add_text_limit :status_page_settings, :status_page_url, 1024 - end - - def down - remove_column :status_page_settings, :status_page_url - end -end diff --git a/db/migrate/20200409085956_add_partial_index_on_import_failures_retry_count.rb b/db/migrate/20200409085956_add_partial_index_on_import_failures_retry_count.rb deleted file mode 100644 index 0999f7b4c95..00000000000 --- a/db/migrate/20200409085956_add_partial_index_on_import_failures_retry_count.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexOnImportFailuresRetryCount < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :import_failures, [:project_id, :correlation_id_value], where: 'retry_count = 0' - end - - def down - remove_concurrent_index :import_failures, [:project_id, :correlation_id_value] - end -end diff --git a/db/migrate/20200409105455_change_verification_checksum_field_type_in_package_file.rb b/db/migrate/20200409105455_change_verification_checksum_field_type_in_package_file.rb deleted file mode 100644 index 187ab0aa20b..00000000000 --- a/db/migrate/20200409105455_change_verification_checksum_field_type_in_package_file.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class ChangeVerificationChecksumFieldTypeInPackageFile < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - # The use of this column is behind a feature flag that never got enabled, - # so it's safe to remove it in a normal migration - remove_column :packages_package_files, :verification_checksum, :string # rubocop:disable Migration/RemoveColumn - add_column :packages_package_files, :verification_checksum, :binary - end - - def down - remove_column :packages_package_files, :verification_checksum, :binary - add_column :packages_package_files, :verification_checksum, :string - end -end diff --git a/db/migrate/20200409105456_add_checksum_index_to_package_file.rb b/db/migrate/20200409105456_add_checksum_index_to_package_file.rb deleted file mode 100644 index 07762109895..00000000000 --- a/db/migrate/20200409105456_add_checksum_index_to_package_file.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddChecksumIndexToPackageFile < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :packages_package_files, :verification_checksum, where: "(verification_checksum IS NOT NULL)", name: "packages_packages_verification_checksum_partial" - end - - def down - remove_concurrent_index :packages_package_files, :verification_checksum - end -end diff --git a/db/migrate/20200410104828_add_comment_detail_to_services.rb b/db/migrate/20200410104828_add_comment_detail_to_services.rb deleted file mode 100644 index 61d993cce32..00000000000 --- a/db/migrate/20200410104828_add_comment_detail_to_services.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddCommentDetailToServices < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column :services, :comment_detail, :smallint - end - - def down - remove_column :services, :comment_detail - end -end diff --git a/db/migrate/20200410232012_add_metrics_dashboard_access_level_to_project_feature.rb b/db/migrate/20200410232012_add_metrics_dashboard_access_level_to_project_feature.rb deleted file mode 100644 index 2953cdf3429..00000000000 --- a/db/migrate/20200410232012_add_metrics_dashboard_access_level_to_project_feature.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddMetricsDashboardAccessLevelToProjectFeature < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :project_features, :metrics_dashboard_access_level, :integer - end - end - - def down - with_lock_retries do - remove_column :project_features, :metrics_dashboard_access_level, :integer - end - end -end diff --git a/db/migrate/20200411125656_add_package_scopes_to_deploy_tokens.rb b/db/migrate/20200411125656_add_package_scopes_to_deploy_tokens.rb deleted file mode 100644 index e7e2f91d4d1..00000000000 --- a/db/migrate/20200411125656_add_package_scopes_to_deploy_tokens.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPackageScopesToDeployTokens < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column_with_default(:deploy_tokens, :read_package_registry, :boolean, default: false, allow_null: false) # rubocop:disable Migration/AddColumnWithDefault - add_column_with_default(:deploy_tokens, :write_package_registry, :boolean, default: false, allow_null: false) # rubocop:disable Migration/AddColumnWithDefault - end - - def down - remove_column(:deploy_tokens, :read_package_registry) - remove_column(:deploy_tokens, :write_package_registry) - end -end diff --git a/db/migrate/20200413072059_add_group_owners_can_manage_default_branch_protection_to_application_settings.rb b/db/migrate/20200413072059_add_group_owners_can_manage_default_branch_protection_to_application_settings.rb deleted file mode 100644 index 2918aaea93e..00000000000 --- a/db/migrate/20200413072059_add_group_owners_can_manage_default_branch_protection_to_application_settings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddGroupOwnersCanManageDefaultBranchProtectionToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - add_column_with_default(:application_settings, # rubocop:disable Migration/AddColumnWithDefault - :group_owners_can_manage_default_branch_protection, - :boolean, - default: true) - end - - def down - remove_column :application_settings, :group_owners_can_manage_default_branch_protection - end -end diff --git a/db/migrate/20200413230056_add_waf_and_cilium_logs_to_applications_fluentd.rb b/db/migrate/20200413230056_add_waf_and_cilium_logs_to_applications_fluentd.rb deleted file mode 100644 index 99f6aa0e4a8..00000000000 --- a/db/migrate/20200413230056_add_waf_and_cilium_logs_to_applications_fluentd.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class AddWafAndCiliumLogsToApplicationsFluentd < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column_with_default(:clusters_applications_fluentd, # rubocop:disable Migration/AddColumnWithDefault - :waf_log_enabled, - :boolean, - default: true, - allow_null: false) - add_column_with_default(:clusters_applications_fluentd, # rubocop:disable Migration/AddColumnWithDefault - :cilium_log_enabled, - :boolean, - default: true, - allow_null: false) - end - - def down - remove_column(:clusters_applications_fluentd, - :waf_log_enabled) - remove_column(:clusters_applications_fluentd, - :cilium_log_enabled) - end -end diff --git a/db/migrate/20200414112444_add_group_id_to_vulnerability_exports.rb b/db/migrate/20200414112444_add_group_id_to_vulnerability_exports.rb deleted file mode 100644 index fad63d53a81..00000000000 --- a/db/migrate/20200414112444_add_group_id_to_vulnerability_exports.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddGroupIdToVulnerabilityExports < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :vulnerability_exports, :group_id, :integer - change_column_null :vulnerability_exports, :project_id, true - end -end diff --git a/db/migrate/20200414114611_add_group_id_index_and_fk_to_vulnerability_exports.rb b/db/migrate/20200414114611_add_group_id_index_and_fk_to_vulnerability_exports.rb deleted file mode 100644 index a3e60b87857..00000000000 --- a/db/migrate/20200414114611_add_group_id_index_and_fk_to_vulnerability_exports.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddGroupIdIndexAndFkToVulnerabilityExports < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - GROUP_ID_INDEX_NAME = 'index_vulnerability_exports_on_group_id_not_null' - - disable_ddl_transaction! - - def up - add_concurrent_index(:vulnerability_exports, :group_id, where: 'group_id IS NOT NULL', name: GROUP_ID_INDEX_NAME) - add_concurrent_foreign_key(:vulnerability_exports, :namespaces, column: :group_id) - end - - def down - remove_foreign_key(:vulnerability_exports, column: :group_id) - remove_concurrent_index_by_name(:vulnerability_exports, GROUP_ID_INDEX_NAME) - end -end diff --git a/db/migrate/20200414115801_change_project_index_on_vulnerability_exports.rb b/db/migrate/20200414115801_change_project_index_on_vulnerability_exports.rb deleted file mode 100644 index e669faa7fca..00000000000 --- a/db/migrate/20200414115801_change_project_index_on_vulnerability_exports.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class ChangeProjectIndexOnVulnerabilityExports < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - OLD_INDEX_NAME = 'index_vulnerability_exports_on_project_id_and_id' - NEW_INDEX_NAME = 'index_vulnerability_exports_on_project_id_not_null' - - disable_ddl_transaction! - - def up - add_concurrent_index(:vulnerability_exports, :project_id, where: 'project_id IS NOT NULL', name: NEW_INDEX_NAME) - remove_concurrent_index_by_name(:vulnerability_exports, OLD_INDEX_NAME) - end - - def down - add_concurrent_index(:vulnerability_exports, [:project_id, :id], unique: true, name: OLD_INDEX_NAME) - remove_concurrent_index_by_name(:vulnerability_exports, NEW_INDEX_NAME) - end -end diff --git a/db/migrate/20200414144547_remove_index_projects_on_creator_id_and_created_at_from_projects.rb b/db/migrate/20200414144547_remove_index_projects_on_creator_id_and_created_at_from_projects.rb deleted file mode 100644 index c4409fcc55d..00000000000 --- a/db/migrate/20200414144547_remove_index_projects_on_creator_id_and_created_at_from_projects.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexProjectsOnCreatorIdAndCreatedAtFromProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_projects_on_creator_id_and_created_at' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :projects, INDEX_NAME - end - - def down - add_concurrent_index :projects, [:creator_id, :created_at], name: INDEX_NAME - end -end diff --git a/db/migrate/20200415153154_add_unique_index_on_plan_name.rb b/db/migrate/20200415153154_add_unique_index_on_plan_name.rb deleted file mode 100644 index d959d1315b4..00000000000 --- a/db/migrate/20200415153154_add_unique_index_on_plan_name.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueIndexOnPlanName < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index :plans, :name - add_concurrent_index :plans, :name, unique: true - end - - def down - remove_concurrent_index :plans, :name, unique: true - add_concurrent_index :plans, :name - end -end diff --git a/db/migrate/20200415160722_remove_not_null_lfs_objects_constraint.rb b/db/migrate/20200415160722_remove_not_null_lfs_objects_constraint.rb deleted file mode 100644 index 58cfa8e8969..00000000000 --- a/db/migrate/20200415160722_remove_not_null_lfs_objects_constraint.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RemoveNotNullLfsObjectsConstraint < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - execute <<~SQL - ALTER TABLE lfs_objects DROP CONSTRAINT IF EXISTS lfs_objects_file_store_not_null; - SQL - end - end - - def down - # No-op - end -end diff --git a/db/migrate/20200415161021_remove_not_null_ci_job_artifacts_constraint.rb b/db/migrate/20200415161021_remove_not_null_ci_job_artifacts_constraint.rb deleted file mode 100644 index 65430c180ce..00000000000 --- a/db/migrate/20200415161021_remove_not_null_ci_job_artifacts_constraint.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RemoveNotNullCiJobArtifactsConstraint < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - execute <<~SQL - ALTER TABLE ci_job_artifacts DROP CONSTRAINT IF EXISTS ci_job_artifacts_file_store_not_null; - SQL - end - end - - def down - # No-op - end -end diff --git a/db/migrate/20200415161206_remove_not_null_uploads_constraint.rb b/db/migrate/20200415161206_remove_not_null_uploads_constraint.rb deleted file mode 100644 index 23f202bac7e..00000000000 --- a/db/migrate/20200415161206_remove_not_null_uploads_constraint.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RemoveNotNullUploadsConstraint < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - execute <<~SQL - ALTER TABLE uploads DROP CONSTRAINT IF EXISTS uploads_store_not_null; - SQL - end - end - - def down - # No-op - end -end diff --git a/db/migrate/20200415192656_add_name_regex_keep_to_container_expiration_policies.rb b/db/migrate/20200415192656_add_name_regex_keep_to_container_expiration_policies.rb deleted file mode 100644 index e223d94caf7..00000000000 --- a/db/migrate/20200415192656_add_name_regex_keep_to_container_expiration_policies.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddNameRegexKeepToContainerExpirationPolicies < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - CONSTRAINT_NAME = 'container_expiration_policies_name_regex_keep' - - def up - add_column(:container_expiration_policies, :name_regex_keep, :text) - add_text_limit(:container_expiration_policies, :name_regex_keep, 255, constraint_name: CONSTRAINT_NAME) - end - - def down - remove_check_constraint(:container_expiration_policies, CONSTRAINT_NAME) - remove_column(:container_expiration_policies, :name_regex_keep) - end -end diff --git a/db/migrate/20200415203024_add_offset_pagination_plan_limit.rb b/db/migrate/20200415203024_add_offset_pagination_plan_limit.rb deleted file mode 100644 index b4d4be894f6..00000000000 --- a/db/migrate/20200415203024_add_offset_pagination_plan_limit.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddOffsetPaginationPlanLimit < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :plan_limits, :offset_pagination_limit, :integer, default: 50000, null: false - end -end diff --git a/db/migrate/20200416005331_create_status_page_published_incidents.rb b/db/migrate/20200416005331_create_status_page_published_incidents.rb deleted file mode 100644 index 75889cd5bb6..00000000000 --- a/db/migrate/20200416005331_create_status_page_published_incidents.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class CreateStatusPagePublishedIncidents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :status_page_published_incidents do |t| - t.timestamps_with_timezone null: false - t.references :issue, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade } - end - end - end - - def down - drop_table :status_page_published_incidents - end -end diff --git a/db/migrate/20200416120128_add_columns_to_terraform_state.rb b/db/migrate/20200416120128_add_columns_to_terraform_state.rb deleted file mode 100644 index 65d25d842e5..00000000000 --- a/db/migrate/20200416120128_add_columns_to_terraform_state.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddColumnsToTerraformState < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/PreventStrings - def change - add_column :terraform_states, :lock_xid, :string, limit: 255 - add_column :terraform_states, :locked_at, :datetime_with_timezone - add_column :terraform_states, :locked_by_user_id, :bigint - add_column :terraform_states, :uuid, :string, limit: 32, null: false # rubocop:disable Rails/NotNullColumn (table not used yet) - add_column :terraform_states, :name, :string, limit: 255 - add_index :terraform_states, :locked_by_user_id # rubocop:disable Migration/AddIndex (table not used yet) - add_index :terraform_states, :uuid, unique: true # rubocop:disable Migration/AddIndex (table not used yet) - add_index :terraform_states, [:project_id, :name], unique: true # rubocop:disable Migration/AddIndex (table not used yet) - remove_index :terraform_states, :project_id # rubocop:disable Migration/RemoveIndex (table not used yet) - end - # rubocop:enable Migration/PreventStrings -end diff --git a/db/migrate/20200416120354_add_locked_by_user_id_foreign_key_to_terraform_state.rb b/db/migrate/20200416120354_add_locked_by_user_id_foreign_key_to_terraform_state.rb deleted file mode 100644 index 144291d94be..00000000000 --- a/db/migrate/20200416120354_add_locked_by_user_id_foreign_key_to_terraform_state.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddLockedByUserIdForeignKeyToTerraformState < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :terraform_states, :users, column: :locked_by_user_id - end - end - - def down - with_lock_retries do - remove_foreign_key :terraform_states, column: :locked_by_user_id - end - end -end diff --git a/db/migrate/20200417044453_create_alert_management_alerts.rb b/db/migrate/20200417044453_create_alert_management_alerts.rb deleted file mode 100644 index 6221eeeb24b..00000000000 --- a/db/migrate/20200417044453_create_alert_management_alerts.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -class CreateAlertManagementAlerts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:alert_management_alerts) - create_table :alert_management_alerts do |t| - t.timestamps_with_timezone - t.datetime_with_timezone :started_at, null: false - t.datetime_with_timezone :ended_at - t.integer :events, default: 1, null: false - t.integer :iid, null: false - t.integer :severity, default: 0, null: false, limit: 2 - t.integer :status, default: 0, null: false, limit: 2 - t.binary :fingerprint - t.bigint :issue_id, index: true - t.bigint :project_id, null: false - t.text :title, null: false - t.text :description - t.text :service - t.text :monitoring_tool - t.text :hosts, array: true, null: false, default: [] # rubocop:disable Migration/AddLimitToTextColumns - t.jsonb :payload, null: false, default: {} - - t.index %w(project_id iid), name: 'index_alert_management_alerts_on_project_id_and_iid', unique: true, using: :btree - t.index %w(project_id fingerprint), name: 'index_alert_management_alerts_on_project_id_and_fingerprint', unique: true, using: :btree - end - end - - add_text_limit :alert_management_alerts, :title, 200 - add_text_limit :alert_management_alerts, :description, 1000 - add_text_limit :alert_management_alerts, :service, 100 - add_text_limit :alert_management_alerts, :monitoring_tool, 100 - end - - def down - drop_table :alert_management_alerts - end -end diff --git a/db/migrate/20200417075843_remove_and_add_foreign_key_to_project_settings.rb b/db/migrate/20200417075843_remove_and_add_foreign_key_to_project_settings.rb deleted file mode 100644 index 695bd3381c8..00000000000 --- a/db/migrate/20200417075843_remove_and_add_foreign_key_to_project_settings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RemoveAndAddForeignKeyToProjectSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_project_settings_push_rule_id' - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :project_settings, :push_rules, column: :push_rule_id, name: CONSTRAINT_NAME, on_delete: :nullify - remove_foreign_key_if_exists :project_settings, column: :push_rule_id, on_delete: :cascade - end - - def down - add_concurrent_foreign_key :project_settings, :push_rules, column: :push_rule_id, on_delete: :cascade - remove_foreign_key_if_exists :project_settings, column: :push_rule_id, name: CONSTRAINT_NAME, on_delete: :nullify - end -end diff --git a/db/migrate/20200417145946_add_locked_to_ci_job_artifact.rb b/db/migrate/20200417145946_add_locked_to_ci_job_artifact.rb deleted file mode 100644 index 3bcc733f3b0..00000000000 --- a/db/migrate/20200417145946_add_locked_to_ci_job_artifact.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddLockedToCiJobArtifact < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :ci_job_artifacts, :locked, :boolean - end - end - - def down - with_lock_retries do - remove_column :ci_job_artifacts, :locked - end - end -end diff --git a/db/migrate/20200420092011_add_profile_image_guidelines_to_appearances.rb b/db/migrate/20200420092011_add_profile_image_guidelines_to_appearances.rb deleted file mode 100644 index bab3e21e285..00000000000 --- a/db/migrate/20200420092011_add_profile_image_guidelines_to_appearances.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddProfileImageGuidelinesToAppearances < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column :appearances, :profile_image_guidelines, :text, null: true - add_column :appearances, :profile_image_guidelines_html, :text, null: true # rubocop:disable Migration/AddLimitToTextColumns - - add_text_limit :appearances, :profile_image_guidelines, 4096, constraint_name: 'appearances_profile_image_guidelines' - end - - def down - remove_column :appearances, :profile_image_guidelines - remove_column :appearances, :profile_image_guidelines_html - end -end diff --git a/db/migrate/20200420104303_add_group_import_states_table.rb b/db/migrate/20200420104303_add_group_import_states_table.rb deleted file mode 100644 index a44a2ea75f3..00000000000 --- a/db/migrate/20200420104303_add_group_import_states_table.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class AddGroupImportStatesTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - def up - with_lock_retries do - create_table :group_import_states, id: false do |t| - t.references :group, primary_key: true, foreign_key: { to_table: :namespaces, on_delete: :cascade } - t.timestamps_with_timezone null: false - t.integer :status, limit: 2, null: false, default: 0 - t.text :jid, null: false, unique: true - t.text :last_error - end - end - end - # rubocop:enable Migration/AddLimitToTextColumns - - def down - drop_table :group_import_states - end -end diff --git a/db/migrate/20200420104323_add_text_limit_to_group_import_states.rb b/db/migrate/20200420104323_add_text_limit_to_group_import_states.rb deleted file mode 100644 index c21b18d7b0e..00000000000 --- a/db/migrate/20200420104323_add_text_limit_to_group_import_states.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToGroupImportStates < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :group_import_states, :jid, 100 - add_text_limit :group_import_states, :last_error, 255 - end - - def down - remove_text_limit :group_import_states, :jid - remove_text_limit :group_import_states, :last_error - end -end diff --git a/db/migrate/20200420115948_create_metrics_users_starred_dashboard.rb b/db/migrate/20200420115948_create_metrics_users_starred_dashboard.rb deleted file mode 100644 index 27130136e9d..00000000000 --- a/db/migrate/20200420115948_create_metrics_users_starred_dashboard.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class CreateMetricsUsersStarredDashboard < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # limit added in following migration db/migrate/20200424101920_add_text_limit_to_metrics_users_starred_dashboards_dashboard_path.rb - # to allow this migration to be run inside the transaction - # rubocop: disable Migration/AddLimitToTextColumns - def up - create_table :metrics_users_starred_dashboards do |t| - t.timestamps_with_timezone - t.bigint :project_id, null: false - t.bigint :user_id, null: false - t.text :dashboard_path, null: false - - t.index :project_id - t.index %i(user_id project_id dashboard_path), name: "idx_metrics_users_starred_dashboard_on_user_project_dashboard", unique: true - end - end - # rubocop: enable Migration/AddLimitToTextColumns - - def down - drop_table :metrics_users_starred_dashboards - end -end diff --git a/db/migrate/20200420141733_add_index_on_enabled_clusters.rb b/db/migrate/20200420141733_add_index_on_enabled_clusters.rb deleted file mode 100644 index 43f4b072c82..00000000000 --- a/db/migrate/20200420141733_add_index_on_enabled_clusters.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnEnabledClusters < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_enabled_clusters_on_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :clusters, [:id], where: 'enabled = true', name: INDEX_NAME - end - - def down - remove_concurrent_index :clusters, [:id], where: 'enabled = true', name: INDEX_NAME - end -end diff --git a/db/migrate/20200420172113_add_text_limit_to_sprints_title.rb b/db/migrate/20200420172113_add_text_limit_to_sprints_title.rb deleted file mode 100644 index 17707cc9dd1..00000000000 --- a/db/migrate/20200420172113_add_text_limit_to_sprints_title.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToSprintsTitle < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - CONSTRAINT_NAME = 'sprints_title' - - def up - add_text_limit :sprints, :title, 255, constraint_name: CONSTRAINT_NAME - end - - def down - remove_check_constraint :sprints, CONSTRAINT_NAME - end -end diff --git a/db/migrate/20200420172752_add_sprints_foreign_key_to_projects.rb b/db/migrate/20200420172752_add_sprints_foreign_key_to_projects.rb deleted file mode 100644 index 46b5c9c2ac2..00000000000 --- a/db/migrate/20200420172752_add_sprints_foreign_key_to_projects.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddSprintsForeignKeyToProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :sprints, :projects, column: :project_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :sprints, column: :project_id - end - end -end diff --git a/db/migrate/20200420172927_add_sprints_foreign_key_to_groups.rb b/db/migrate/20200420172927_add_sprints_foreign_key_to_groups.rb deleted file mode 100644 index cd90fe50cde..00000000000 --- a/db/migrate/20200420172927_add_sprints_foreign_key_to_groups.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddSprintsForeignKeyToGroups < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :sprints, :namespaces, column: :group_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :sprints, column: :group_id - end - end -end diff --git a/db/migrate/20200420201933_add_check_constraint_to_sprint_must_belong_to_project_or_group.rb b/db/migrate/20200420201933_add_check_constraint_to_sprint_must_belong_to_project_or_group.rb deleted file mode 100644 index 9962eab95e3..00000000000 --- a/db/migrate/20200420201933_add_check_constraint_to_sprint_must_belong_to_project_or_group.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddCheckConstraintToSprintMustBelongToProjectOrGroup < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - CONSTRAINT_NAME = 'sprints_must_belong_to_project_or_group' - - def up - add_check_constraint :sprints, '(project_id != NULL AND group_id IS NULL) OR (group_id != NULL AND project_id IS NULL)', CONSTRAINT_NAME - end - - def down - remove_check_constraint :sprints, CONSTRAINT_NAME - end -end diff --git a/db/migrate/20200421054930_remove_index_on_pipeline_id_from_ci_pipeline_variables.rb b/db/migrate/20200421054930_remove_index_on_pipeline_id_from_ci_pipeline_variables.rb deleted file mode 100644 index 1a904188fc6..00000000000 --- a/db/migrate/20200421054930_remove_index_on_pipeline_id_from_ci_pipeline_variables.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexOnPipelineIdFromCiPipelineVariables < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_ci_pipeline_variables_on_pipeline_id' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :ci_pipeline_variables, INDEX_NAME - end - - def down - add_concurrent_index :ci_pipeline_variables, :pipeline_id, name: INDEX_NAME, where: "key = 'AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE'" - end -end diff --git a/db/migrate/20200421054948_remove_index_on_pipeline_id_from_ci_variables.rb b/db/migrate/20200421054948_remove_index_on_pipeline_id_from_ci_variables.rb deleted file mode 100644 index f7e6d10e8a3..00000000000 --- a/db/migrate/20200421054948_remove_index_on_pipeline_id_from_ci_variables.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexOnPipelineIdFromCiVariables < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_ci_variables_on_project_id' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :ci_variables, INDEX_NAME - end - - def down - add_concurrent_index :ci_variables, :project_id, name: INDEX_NAME, where: "key = 'AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE'" - end -end diff --git a/db/migrate/20200421092907_add_index_container_repository_on_name_trigram_to_container_repository.rb b/db/migrate/20200421092907_add_index_container_repository_on_name_trigram_to_container_repository.rb deleted file mode 100644 index debca8c6008..00000000000 --- a/db/migrate/20200421092907_add_index_container_repository_on_name_trigram_to_container_repository.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexContainerRepositoryOnNameTrigramToContainerRepository < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_container_repository_on_name_trigram' - - disable_ddl_transaction! - - def up - add_concurrent_index :container_repositories, :name, name: INDEX_NAME, using: :gin, opclass: { name: :gin_trgm_ops } - end - - def down - remove_concurrent_index_by_name(:container_repositories, INDEX_NAME) - end -end diff --git a/db/migrate/20200421111005_create_daily_build_group_report_results.rb b/db/migrate/20200421111005_create_daily_build_group_report_results.rb deleted file mode 100644 index 12d1c7531d5..00000000000 --- a/db/migrate/20200421111005_create_daily_build_group_report_results.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class CreateDailyBuildGroupReportResults < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :ci_daily_build_group_report_results do |t| - t.date :date, null: false - t.bigint :project_id, null: false - t.bigint :last_pipeline_id, null: false - t.text :ref_path, null: false # rubocop:disable Migration/AddLimitToTextColumns - t.text :group_name, null: false # rubocop:disable Migration/AddLimitToTextColumns - t.jsonb :data, null: false - - t.index :last_pipeline_id - t.index [:project_id, :ref_path, :date, :group_name], name: 'index_daily_build_group_report_results_unique_columns', unique: true - t.foreign_key :projects, on_delete: :cascade - t.foreign_key :ci_pipelines, column: :last_pipeline_id, on_delete: :cascade - end - end -end diff --git a/db/migrate/20200421233150_add_foreign_keys_for_alert_management_alerts.rb b/db/migrate/20200421233150_add_foreign_keys_for_alert_management_alerts.rb deleted file mode 100644 index b16bdf9830c..00000000000 --- a/db/migrate/20200421233150_add_foreign_keys_for_alert_management_alerts.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeysForAlertManagementAlerts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :alert_management_alerts, :projects, column: :project_id, on_delete: :cascade - add_concurrent_foreign_key :alert_management_alerts, :issues, column: :issue_id, on_delete: :nullify - end - - def down - remove_foreign_key_if_exists :alert_management_alerts, column: :project_id - remove_foreign_key_if_exists :alert_management_alerts, column: :issue_id - end -end diff --git a/db/migrate/20200422091541_create_ci_instance_variables.rb b/db/migrate/20200422091541_create_ci_instance_variables.rb deleted file mode 100644 index ab2a4722f89..00000000000 --- a/db/migrate/20200422091541_create_ci_instance_variables.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class CreateCiInstanceVariables < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:ci_instance_variables) - create_table :ci_instance_variables do |t| - t.integer :variable_type, null: false, limit: 2, default: 1 - t.boolean :masked, default: false, allow_null: false - t.boolean :protected, default: false, allow_null: false - t.text :key, null: false - t.text :encrypted_value - t.text :encrypted_value_iv - - t.index [:key], name: 'index_ci_instance_variables_on_key', unique: true, using: :btree - end - end - - add_text_limit(:ci_instance_variables, :key, 255) - add_text_limit(:ci_instance_variables, :encrypted_value, 1024) - add_text_limit(:ci_instance_variables, :encrypted_value_iv, 255) - end - - def down - drop_table :ci_instance_variables - end -end diff --git a/db/migrate/20200422213749_create_operations_strategies_user_lists.rb b/db/migrate/20200422213749_create_operations_strategies_user_lists.rb deleted file mode 100644 index 113f2f2f54a..00000000000 --- a/db/migrate/20200422213749_create_operations_strategies_user_lists.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class CreateOperationsStrategiesUserLists < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :operations_strategies_user_lists do |t| - t.references :strategy, index: false, foreign_key: { on_delete: :cascade, to_table: :operations_strategies }, null: false - t.references :user_list, index: true, foreign_key: { on_delete: :cascade, to_table: :operations_user_lists }, null: false - - t.index [:strategy_id, :user_list_id], unique: true, name: :index_ops_strategies_user_lists_on_strategy_id_and_user_list_id - end - end -end diff --git a/db/migrate/20200423075720_add_user_id_foreign_key_to_resource_state_events.rb b/db/migrate/20200423075720_add_user_id_foreign_key_to_resource_state_events.rb deleted file mode 100644 index 91a6dbe4214..00000000000 --- a/db/migrate/20200423075720_add_user_id_foreign_key_to_resource_state_events.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddUserIdForeignKeyToResourceStateEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :resource_state_events, :users, column: :user_id, on_delete: :nullify - end - end - - def down - with_lock_retries do - remove_foreign_key :resource_state_events, column: :user_id - end - end -end diff --git a/db/migrate/20200423080334_add_issue_id_foreign_key_to_resource_state_events.rb b/db/migrate/20200423080334_add_issue_id_foreign_key_to_resource_state_events.rb deleted file mode 100644 index b9f0fdeaa16..00000000000 --- a/db/migrate/20200423080334_add_issue_id_foreign_key_to_resource_state_events.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIssueIdForeignKeyToResourceStateEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :resource_state_events, :issues, column: :issue_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :resource_state_events, column: :issue_id - end - end -end diff --git a/db/migrate/20200423080607_add_merge_request_id_foreign_key_to_resource_state_events.rb b/db/migrate/20200423080607_add_merge_request_id_foreign_key_to_resource_state_events.rb deleted file mode 100644 index 3c070984f9e..00000000000 --- a/db/migrate/20200423080607_add_merge_request_id_foreign_key_to_resource_state_events.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddMergeRequestIdForeignKeyToResourceStateEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :resource_state_events, :merge_requests, column: :merge_request_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :resource_state_events, column: :merge_request_id - end - end -end diff --git a/db/migrate/20200423081409_add_constraint_to_resource_state_events_must_belong_to_issue_or_merge_request.rb b/db/migrate/20200423081409_add_constraint_to_resource_state_events_must_belong_to_issue_or_merge_request.rb deleted file mode 100644 index 57df1045e2c..00000000000 --- a/db/migrate/20200423081409_add_constraint_to_resource_state_events_must_belong_to_issue_or_merge_request.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddConstraintToResourceStateEventsMustBelongToIssueOrMergeRequest < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - CONSTRAINT_NAME = 'resource_state_events_must_belong_to_issue_or_merge_request' - - def up - add_check_constraint :resource_state_events, '(issue_id != NULL AND merge_request_id IS NULL) OR (merge_request_id != NULL AND issue_id IS NULL)', CONSTRAINT_NAME - end - - def down - remove_check_constraint :resource_state_events, CONSTRAINT_NAME - end -end diff --git a/db/migrate/20200423081441_add_foreign_key_from_users_to_metrics_users_starred_dashboars.rb b/db/migrate/20200423081441_add_foreign_key_from_users_to_metrics_users_starred_dashboars.rb deleted file mode 100644 index c3a7635193c..00000000000 --- a/db/migrate/20200423081441_add_foreign_key_from_users_to_metrics_users_starred_dashboars.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyFromUsersToMetricsUsersStarredDashboars < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :metrics_users_starred_dashboards, :users, column: :user_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key_if_exists :metrics_users_starred_dashboards, column: :user_id - end - end -end diff --git a/db/migrate/20200423081519_add_foreign_key_from_projects_to_metrics_users_starred_dashboars.rb b/db/migrate/20200423081519_add_foreign_key_from_projects_to_metrics_users_starred_dashboars.rb deleted file mode 100644 index 88565c24eca..00000000000 --- a/db/migrate/20200423081519_add_foreign_key_from_projects_to_metrics_users_starred_dashboars.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyFromProjectsToMetricsUsersStarredDashboars < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :metrics_users_starred_dashboards, :projects, column: :project_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key_if_exists :metrics_users_starred_dashboards, column: :project_id - end - end -end diff --git a/db/migrate/20200423101529_add_scheduled_at_to_jira_imports.rb b/db/migrate/20200423101529_add_scheduled_at_to_jira_imports.rb deleted file mode 100644 index f0d9393b6f9..00000000000 --- a/db/migrate/20200423101529_add_scheduled_at_to_jira_imports.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddScheduledAtToJiraImports < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :jira_imports, :scheduled_at, :datetime_with_timezone - end -end diff --git a/db/migrate/20200424050250_remove_orphaned_invited_members.rb b/db/migrate/20200424050250_remove_orphaned_invited_members.rb deleted file mode 100644 index 0fb2f7d9c39..00000000000 --- a/db/migrate/20200424050250_remove_orphaned_invited_members.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RemoveOrphanedInvitedMembers < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - # As of 2020-04-23, there are 19 entries on GitLab.com that match this criteria. - execute "DELETE FROM members WHERE user_id IS NULL AND invite_token IS NULL AND invite_accepted_at IS NOT NULL" - end - - def down - end -end diff --git a/db/migrate/20200424101920_add_text_limit_to_metrics_users_starred_dashboards_dashboard_path.rb b/db/migrate/20200424101920_add_text_limit_to_metrics_users_starred_dashboards_dashboard_path.rb deleted file mode 100644 index a5620fd8e29..00000000000 --- a/db/migrate/20200424101920_add_text_limit_to_metrics_users_starred_dashboards_dashboard_path.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToMetricsUsersStarredDashboardsDashboardPath < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - add_text_limit :metrics_users_starred_dashboards, :dashboard_path, 255 - end - - def down - remove_text_limit :metrics_users_starred_dashboards, :dashboard_path - end -end diff --git a/db/migrate/20200424102023_add_shared_runners_enabled_and_override_to_namespaces.rb b/db/migrate/20200424102023_add_shared_runners_enabled_and_override_to_namespaces.rb deleted file mode 100644 index 1adc421b9af..00000000000 --- a/db/migrate/20200424102023_add_shared_runners_enabled_and_override_to_namespaces.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddSharedRunnersEnabledAndOverrideToNamespaces < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :namespaces, :shared_runners_enabled, :boolean, default: true, null: false # rubocop:disable Migration/AddColumnsToWideTables - add_column :namespaces, :allow_descendants_override_disabled_shared_runners, :boolean, default: false, null: false # rubocop:disable Migration/AddColumnsToWideTables - end - end - - def down - with_lock_retries do - remove_column :namespaces, :shared_runners_enabled, :boolean - remove_column :namespaces, :allow_descendants_override_disabled_shared_runners, :boolean - end - end -end diff --git a/db/migrate/20200424135319_create_nuget_dependency_link_metadata.rb b/db/migrate/20200424135319_create_nuget_dependency_link_metadata.rb deleted file mode 100644 index 1043616a1c7..00000000000 --- a/db/migrate/20200424135319_create_nuget_dependency_link_metadata.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class CreateNugetDependencyLinkMetadata < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - CONSTRAINT_NAME = 'packages_nuget_dependency_link_metadata_target_framework_constr' - - def up - unless table_exists?(:packages_nuget_dependency_link_metadata) - create_table :packages_nuget_dependency_link_metadata, id: false do |t| - t.references :dependency_link, primary_key: true, default: nil, foreign_key: { to_table: :packages_dependency_links, on_delete: :cascade }, index: { name: 'index_packages_nuget_dl_metadata_on_dependency_link_id' }, type: :bigint - t.text :target_framework, null: false - end - end - - add_text_limit :packages_nuget_dependency_link_metadata, :target_framework, 255, constraint_name: CONSTRAINT_NAME - end - - def down - drop_table :packages_nuget_dependency_link_metadata - end -end diff --git a/db/migrate/20200429001827_sprint_rename_state_to_state_enum.rb b/db/migrate/20200429001827_sprint_rename_state_to_state_enum.rb deleted file mode 100644 index 721b9b7c64f..00000000000 --- a/db/migrate/20200429001827_sprint_rename_state_to_state_enum.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class SprintRenameStateToStateEnum < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - rename_column_concurrently :sprints, :state, :state_enum - end - - def down - undo_rename_column_concurrently :sprints, :state, :state_enum - end -end diff --git a/db/migrate/20200429015603_add_fk_to_project_repository_storage_moves.rb b/db/migrate/20200429015603_add_fk_to_project_repository_storage_moves.rb deleted file mode 100644 index 166ce320a23..00000000000 --- a/db/migrate/20200429015603_add_fk_to_project_repository_storage_moves.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddFkToProjectRepositoryStorageMoves < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :project_repository_storage_moves, :projects, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :project_repository_storage_moves, :projects - end - end -end diff --git a/db/migrate/20200429023324_add_composer_metadata.rb b/db/migrate/20200429023324_add_composer_metadata.rb deleted file mode 100644 index 738b630bec1..00000000000 --- a/db/migrate/20200429023324_add_composer_metadata.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddComposerMetadata < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :packages_composer_metadata, id: false do |t| - t.references :package, primary_key: true, index: false, default: nil, foreign_key: { to_table: :packages_packages, on_delete: :cascade }, type: :bigint - t.binary :target_sha, null: false - end - end -end diff --git a/db/migrate/20200429181335_add_default_value_for_file_store_to_lfs_objects.rb b/db/migrate/20200429181335_add_default_value_for_file_store_to_lfs_objects.rb deleted file mode 100644 index f316a092bfc..00000000000 --- a/db/migrate/20200429181335_add_default_value_for_file_store_to_lfs_objects.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultValueForFileStoreToLfsObjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :lfs_objects, :file_store, 1 - end - end - - def down - with_lock_retries do - change_column_default :lfs_objects, :file_store, nil - end - end -end diff --git a/db/migrate/20200429181955_add_default_value_for_file_store_to_ci_job_artifacts.rb b/db/migrate/20200429181955_add_default_value_for_file_store_to_ci_job_artifacts.rb deleted file mode 100644 index ac3d5e41e3e..00000000000 --- a/db/migrate/20200429181955_add_default_value_for_file_store_to_ci_job_artifacts.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultValueForFileStoreToCiJobArtifacts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :ci_job_artifacts, :file_store, 1 - end - end - - def down - with_lock_retries do - change_column_default :ci_job_artifacts, :file_store, nil - end - end -end diff --git a/db/migrate/20200429182245_add_default_value_for_store_to_uploads.rb b/db/migrate/20200429182245_add_default_value_for_store_to_uploads.rb deleted file mode 100644 index f28fcce8f2f..00000000000 --- a/db/migrate/20200429182245_add_default_value_for_store_to_uploads.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultValueForStoreToUploads < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :uploads, :store, 1 - end - end - - def down - with_lock_retries do - change_column_default :uploads, :store, nil - end - end -end diff --git a/db/migrate/20200430103158_create_group_wiki_repositories.rb b/db/migrate/20200430103158_create_group_wiki_repositories.rb deleted file mode 100644 index b84a8a55def..00000000000 --- a/db/migrate/20200430103158_create_group_wiki_repositories.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class CreateGroupWikiRepositories < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :group_wiki_repositories, id: false do |t| - t.bigint :shard_id, null: false, index: true - t.bigint :group_id, null: false, index: false, primary_key: true, default: nil - - # The limit is added in db/migrate/20200511120430_add_group_wiki_repositories_disk_path_limit.rb - t.text :disk_path, null: false, index: { unique: true } # rubocop:disable Migration/AddLimitToTextColumns - end - end -end diff --git a/db/migrate/20200430123614_create_project_access_tokens.rb b/db/migrate/20200430123614_create_project_access_tokens.rb deleted file mode 100644 index f07b1875ce0..00000000000 --- a/db/migrate/20200430123614_create_project_access_tokens.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class CreateProjectAccessTokens < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :project_access_tokens, primary_key: [:personal_access_token_id, :project_id] do |t| - t.column :personal_access_token_id, :bigint, null: false - t.column :project_id, :bigint, null: false - end - - add_index :project_access_tokens, :project_id - end -end diff --git a/db/migrate/20200430130048_create_packages_nuget_metadata.rb b/db/migrate/20200430130048_create_packages_nuget_metadata.rb deleted file mode 100644 index 0f0d490c93d..00000000000 --- a/db/migrate/20200430130048_create_packages_nuget_metadata.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesNugetMetadata < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - LICENSE_URL_CONSTRAINT_NAME = 'packages_nuget_metadata_license_url_constraint' - PROJECT_URL_CONSTRAINT_NAME = 'packages_nuget_metadata_project_url_constraint' - ICON_URL_CONSTRAINT_NAME = 'packages_nuget_metadata_icon_url_constraint' - - def up - unless table_exists?(:packages_nuget_metadata) - with_lock_retries do - create_table :packages_nuget_metadata, id: false do |t| - t.references :package, primary_key: true, default: nil, index: false, foreign_key: { to_table: :packages_packages, on_delete: :cascade }, type: :bigint - t.text :license_url - t.text :project_url - t.text :icon_url - end - end - end - - add_text_limit :packages_nuget_metadata, :license_url, 255, constraint_name: LICENSE_URL_CONSTRAINT_NAME - add_text_limit :packages_nuget_metadata, :project_url, 255, constraint_name: PROJECT_URL_CONSTRAINT_NAME - add_text_limit :packages_nuget_metadata, :icon_url, 255, constraint_name: ICON_URL_CONSTRAINT_NAME - end - - def down - drop_table :packages_nuget_metadata - end -end diff --git a/db/migrate/20200430174637_create_group_deploy_keys.rb b/db/migrate/20200430174637_create_group_deploy_keys.rb deleted file mode 100644 index 9771ae013ea..00000000000 --- a/db/migrate/20200430174637_create_group_deploy_keys.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -class CreateGroupDeployKeys < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:group_deploy_keys) - with_lock_retries do - create_table :group_deploy_keys do |t| - t.references :user, foreign_key: { on_delete: :restrict }, index: true - t.timestamps_with_timezone - t.datetime_with_timezone :last_used_at - t.datetime_with_timezone :expires_at - t.text :key, null: false, unique: true - t.text :title - t.text :fingerprint, null: false, unique: true - t.binary :fingerprint_sha256 - - t.index :fingerprint, unique: true - t.index :fingerprint_sha256 - end - end - end - - add_text_limit(:group_deploy_keys, :key, 4096) - add_text_limit(:group_deploy_keys, :title, 255) - add_text_limit(:group_deploy_keys, :fingerprint, 255) - end - - def down - drop_table :group_deploy_keys - end -end diff --git a/db/migrate/20200504191813_add_fingerprint_to_events.rb b/db/migrate/20200504191813_add_fingerprint_to_events.rb deleted file mode 100644 index 1171d548f10..00000000000 --- a/db/migrate/20200504191813_add_fingerprint_to_events.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -class AddFingerprintToEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless column_exists?(:events, :fingerprint) - with_lock_retries { add_column :events, :fingerprint, :binary } - end - - unless check_constraint_exists?(:events, constraint_name) - add_check_constraint( - :events, - "octet_length(fingerprint) <= 128", - constraint_name, - validate: true - ) - end - end - - def down - remove_check_constraint(:events, constraint_name) - - if column_exists?(:events, :fingerprint) - with_lock_retries { remove_column :events, :fingerprint } - end - end - - def constraint_name - check_constraint_name(:events, :fingerprint, 'max_length') - end -end diff --git a/db/migrate/20200504200709_add_index_on_fingerprint_and_target_type_to_events.rb b/db/migrate/20200504200709_add_index_on_fingerprint_and_target_type_to_events.rb deleted file mode 100644 index 9b06d593300..00000000000 --- a/db/migrate/20200504200709_add_index_on_fingerprint_and_target_type_to_events.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnFingerprintAndTargetTypeToEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - KEYS = [:target_type, :target_id, :fingerprint] - - def up - add_concurrent_index :events, KEYS, using: :btree, unique: true - end - - def down - remove_concurrent_index :events, KEYS - end -end diff --git a/db/migrate/20200505164958_add_registry_settings_to_application_settings.rb b/db/migrate/20200505164958_add_registry_settings_to_application_settings.rb deleted file mode 100644 index 4c307dbe845..00000000000 --- a/db/migrate/20200505164958_add_registry_settings_to_application_settings.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class AddRegistrySettingsToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - # rubocop:disable Migration/AddLimitToTextColumns - def up - add_column_with_default(:application_settings, # rubocop:disable Migration/AddColumnWithDefault - :container_registry_vendor, - :text, - default: '', - allow_null: false) - - add_column_with_default(:application_settings, # rubocop:disable Migration/AddColumnWithDefault - :container_registry_version, - :text, - default: '', - allow_null: false) - end - # rubocop:enable Migration/AddLimitToTextColumns - - def down - remove_column :application_settings, :container_registry_vendor - remove_column :application_settings, :container_registry_version - end -end diff --git a/db/migrate/20200505171834_add_text_limit_to_container_registry_vendor.rb b/db/migrate/20200505171834_add_text_limit_to_container_registry_vendor.rb deleted file mode 100644 index 242dcc9a837..00000000000 --- a/db/migrate/20200505171834_add_text_limit_to_container_registry_vendor.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToContainerRegistryVendor < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :container_registry_vendor, 255 - end - - def down - remove_text_limit :application_settings, :container_registry_vendor - end -end diff --git a/db/migrate/20200505172405_add_text_limit_to_container_registry_version.rb b/db/migrate/20200505172405_add_text_limit_to_container_registry_version.rb deleted file mode 100644 index 36589c9cc75..00000000000 --- a/db/migrate/20200505172405_add_text_limit_to_container_registry_version.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToContainerRegistryVersion < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :container_registry_version, 255 - end - - def down - remove_text_limit :application_settings, :container_registry_version - end -end diff --git a/db/migrate/20200507221434_add_container_registry_features_to_application_settings.rb b/db/migrate/20200507221434_add_container_registry_features_to_application_settings.rb deleted file mode 100644 index fbbf2306f81..00000000000 --- a/db/migrate/20200507221434_add_container_registry_features_to_application_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddContainerRegistryFeaturesToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column :application_settings, :container_registry_features, :text, array: true, default: [], null: false - end - - def down - remove_column :application_settings, :container_registry_features - end -end diff --git a/db/migrate/20200508021128_remove_ultraauth_provider_from_identities.rb b/db/migrate/20200508021128_remove_ultraauth_provider_from_identities.rb deleted file mode 100644 index dd3f1dbcc0e..00000000000 --- a/db/migrate/20200508021128_remove_ultraauth_provider_from_identities.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveUltraauthProviderFromIdentities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :identities, :provider - execute "DELETE FROM identities WHERE provider = 'ultraauth'" - remove_concurrent_index :identities, :provider - end - - def down - end -end diff --git a/db/migrate/20200508050301_add_spam_check_endpoint_to_application_settings.rb b/db/migrate/20200508050301_add_spam_check_endpoint_to_application_settings.rb deleted file mode 100644 index d30b8abbbc3..00000000000 --- a/db/migrate/20200508050301_add_spam_check_endpoint_to_application_settings.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -class AddSpamCheckEndpointToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless column_exists?(:application_settings, :spam_check_endpoint_url) - add_column :application_settings, :spam_check_endpoint_url, :text - end - - add_text_limit :application_settings, :spam_check_endpoint_url, 255 - - unless column_exists?(:application_settings, :spam_check_endpoint_enabled) - add_column :application_settings, :spam_check_endpoint_enabled, :boolean, null: false, default: false - end - end - - def down - remove_column_if_exists :spam_check_endpoint_url - remove_column_if_exists :spam_check_endpoint_enabled - end - - private - - def remove_column_if_exists(column) - return unless column_exists?(:application_settings, column) - - remove_column :application_settings, column - end -end diff --git a/db/migrate/20200508140959_add_elasticsearch_pause_indexing_to_application_settings.rb b/db/migrate/20200508140959_add_elasticsearch_pause_indexing_to_application_settings.rb deleted file mode 100644 index 5828db973ed..00000000000 --- a/db/migrate/20200508140959_add_elasticsearch_pause_indexing_to_application_settings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddElasticsearchPauseIndexingToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - add_column :application_settings, :elasticsearch_pause_indexing, :boolean, default: false, null: false - end - end - - def down - remove_column :application_settings, :elasticsearch_pause_indexing - end -end diff --git a/db/migrate/20200508203901_add_repository_storages_weighted_to_application_settings.rb b/db/migrate/20200508203901_add_repository_storages_weighted_to_application_settings.rb deleted file mode 100644 index fecaed9a7a0..00000000000 --- a/db/migrate/20200508203901_add_repository_storages_weighted_to_application_settings.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -class AddRepositoryStoragesWeightedToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - class ApplicationSetting < ActiveRecord::Base - serialize :repository_storages - self.table_name = 'application_settings' - end - - def up - add_column :application_settings, :repository_storages_weighted, :jsonb, default: {}, null: false - - seed_repository_storages_weighted - end - - def down - remove_column :application_settings, :repository_storages_weighted - end - - private - - def seed_repository_storages_weighted - # We need to flush the cache to ensure the newly-added column is loaded - ApplicationSetting.reset_column_information - - # There should only be one row here due to - # 20200420162730_remove_additional_application_settings_rows.rb - ApplicationSetting.all.each do |settings| - storages = Gitlab.config.repositories.storages.keys.collect do |storage| - weight = settings.repository_storages.include?(storage) ? 100 : 0 - [storage.to_sym, weight] - end - - settings.repository_storages_weighted = Hash[storages] - settings.save! - end - end -end diff --git a/db/migrate/20200509203901_reseed_repository_storages_weighted.rb b/db/migrate/20200509203901_reseed_repository_storages_weighted.rb deleted file mode 100644 index 7a751b77c1c..00000000000 --- a/db/migrate/20200509203901_reseed_repository_storages_weighted.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class ReseedRepositoryStoragesWeighted < ActiveRecord::Migration[6.0] - DOWNTIME = false - - class ApplicationSetting < ActiveRecord::Base - serialize :repository_storages - self.table_name = 'application_settings' - end - - def up - reseed_repository_storages_weighted - end - - private - - def reseed_repository_storages_weighted - # We need to flush the cache to ensure the newly-added column is loaded - ApplicationSetting.reset_column_information - - # There should only be one row here due to - # 20200420162730_remove_additional_application_settings_rows.rb - ApplicationSetting.all.each do |settings| - # Admins may have already tweaked these values, so don't do anything - # if there is data already. - next if settings.repository_storages_weighted.present? - - storages = Gitlab.config.repositories.storages.keys.collect do |storage| - weight = settings.repository_storages.include?(storage) ? 100 : 0 - [storage.to_sym, weight] - end - - settings.repository_storages_weighted = Hash[storages] - settings.save! - end - end -end diff --git a/db/migrate/20200510181937_add_web_authn_xid_to_user_details.rb b/db/migrate/20200510181937_add_web_authn_xid_to_user_details.rb deleted file mode 100644 index d41e6611c45..00000000000 --- a/db/migrate/20200510181937_add_web_authn_xid_to_user_details.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddWebAuthnXidToUserDetails < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in subsequent migration - def change - add_column :user_details, :webauthn_xid, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20200510182218_add_text_limit_to_user_details_webauthn_xid.rb b/db/migrate/20200510182218_add_text_limit_to_user_details_webauthn_xid.rb deleted file mode 100644 index 715cfd771f5..00000000000 --- a/db/migrate/20200510182218_add_text_limit_to_user_details_webauthn_xid.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToUserDetailsWebauthnXid < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :user_details, :webauthn_xid, 100 - end - - def down - remove_text_limit :user_details, :webauthn_xid - end -end diff --git a/db/migrate/20200510182556_add_text_limit_to_webauthn_registrations_name.rb b/db/migrate/20200510182556_add_text_limit_to_webauthn_registrations_name.rb deleted file mode 100644 index 28805505ba6..00000000000 --- a/db/migrate/20200510182556_add_text_limit_to_webauthn_registrations_name.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToWebauthnRegistrationsName < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :webauthn_registrations, :name, 255 - end - - def down - remove_text_limit :webauthn_registrations, :name - end -end diff --git a/db/migrate/20200510182824_add_text_limit_to_webauthn_registrations_credential_xid.rb b/db/migrate/20200510182824_add_text_limit_to_webauthn_registrations_credential_xid.rb deleted file mode 100644 index 51155f370ef..00000000000 --- a/db/migrate/20200510182824_add_text_limit_to_webauthn_registrations_credential_xid.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToWebauthnRegistrationsCredentialXid < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :webauthn_registrations, :credential_xid, 255 - end - - def down - remove_text_limit :webauthn_registrations, :credential_xid - end -end diff --git a/db/migrate/20200510183128_add_foreign_key_from_webauthn_registrations_to_users.rb b/db/migrate/20200510183128_add_foreign_key_from_webauthn_registrations_to_users.rb deleted file mode 100644 index 9071e3e17e3..00000000000 --- a/db/migrate/20200510183128_add_foreign_key_from_webauthn_registrations_to_users.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyFromWebauthnRegistrationsToUsers < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - # disable_ddl_transaction! - - def up - with_lock_retries do - add_foreign_key :webauthn_registrations, :users, column: :user_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :webauthn_registrations, column: :user_id - end - end -end diff --git a/db/migrate/20200511092246_add_epic_id_to_resource_state_events.rb b/db/migrate/20200511092246_add_epic_id_to_resource_state_events.rb deleted file mode 100644 index 85d965972aa..00000000000 --- a/db/migrate/20200511092246_add_epic_id_to_resource_state_events.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddEpicIdToResourceStateEvents < ActiveRecord::Migration[6.0] - DOWNTIME = false - - INDEX_NAME = 'index_resource_state_events_on_epic_id' - - def up - add_column :resource_state_events, :epic_id, :integer - add_index :resource_state_events, :epic_id, name: INDEX_NAME # rubocop:disable Migration/AddIndex - end - - def down - remove_index :resource_state_events, name: INDEX_NAME # rubocop:disable Migration/RemoveIndex - remove_column :resource_state_events, :epic_id, :integer - end -end diff --git a/db/migrate/20200511092505_add_foreign_key_to_epic_id_on_resource_state_events.rb b/db/migrate/20200511092505_add_foreign_key_to_epic_id_on_resource_state_events.rb deleted file mode 100644 index 1daa620501a..00000000000 --- a/db/migrate/20200511092505_add_foreign_key_to_epic_id_on_resource_state_events.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToEpicIdOnResourceStateEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :resource_state_events, :epics, column: :epic_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :resource_state_events, column: :epic_id - end - end -end diff --git a/db/migrate/20200511115430_add_inherit_from_to_services.rb b/db/migrate/20200511115430_add_inherit_from_to_services.rb deleted file mode 100644 index c409b543dbf..00000000000 --- a/db/migrate/20200511115430_add_inherit_from_to_services.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddInheritFromToServices < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :services, :inherit_from_id, :bigint - end -end diff --git a/db/migrate/20200511115431_add_index_inherit_from_id_to_services.rb b/db/migrate/20200511115431_add_index_inherit_from_id_to_services.rb deleted file mode 100644 index a0a5f361edf..00000000000 --- a/db/migrate/20200511115431_add_index_inherit_from_id_to_services.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexInheritFromIdToServices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :services, :inherit_from_id - - add_concurrent_foreign_key :services, :services, column: :inherit_from_id, on_delete: :nullify - end - - def down - remove_foreign_key_if_exists :services, column: :inherit_from_id - - remove_concurrent_index :services, :inherit_from_id - end -end diff --git a/db/migrate/20200511121549_add_group_wiki_repositories_shard_id_foreign_key.rb b/db/migrate/20200511121549_add_group_wiki_repositories_shard_id_foreign_key.rb deleted file mode 100644 index d1bb3fcc6ea..00000000000 --- a/db/migrate/20200511121549_add_group_wiki_repositories_shard_id_foreign_key.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddGroupWikiRepositoriesShardIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :group_wiki_repositories, :shards, on_delete: :restrict - end - end - - def down - with_lock_retries do - remove_foreign_key :group_wiki_repositories, :shards - end - end -end diff --git a/db/migrate/20200511121610_add_group_wiki_repositories_group_id_foreign_key.rb b/db/migrate/20200511121610_add_group_wiki_repositories_group_id_foreign_key.rb deleted file mode 100644 index 40f272cc0e7..00000000000 --- a/db/migrate/20200511121610_add_group_wiki_repositories_group_id_foreign_key.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddGroupWikiRepositoriesGroupIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :group_wiki_repositories, :namespaces, column: :group_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :group_wiki_repositories, :namespaces, column: :group_id - end - end -end diff --git a/db/migrate/20200511121620_add_group_wiki_repositories_disk_path_limit.rb b/db/migrate/20200511121620_add_group_wiki_repositories_disk_path_limit.rb deleted file mode 100644 index db4b9d8a6e4..00000000000 --- a/db/migrate/20200511121620_add_group_wiki_repositories_disk_path_limit.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddGroupWikiRepositoriesDiskPathLimit < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :group_wiki_repositories, :disk_path, 80 - end - - def down - remove_text_limit :group_wiki_repositories, :disk_path - end -end diff --git a/db/migrate/20200511130129_remove_deprecated_jenkins_service_records.rb b/db/migrate/20200511130129_remove_deprecated_jenkins_service_records.rb deleted file mode 100644 index 258142f950e..00000000000 --- a/db/migrate/20200511130129_remove_deprecated_jenkins_service_records.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveDeprecatedJenkinsServiceRecords < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute <<~SQL.strip - DELETE FROM services WHERE type = 'JenkinsDeprecatedService'; - SQL - end - - def down - # no-op - - # The records were removed by `up` - end -end diff --git a/db/migrate/20200511181027_create_test_reports.rb b/db/migrate/20200511181027_create_test_reports.rb deleted file mode 100644 index a08e208441d..00000000000 --- a/db/migrate/20200511181027_create_test_reports.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateTestReports < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :requirements_management_test_reports do |t| - t.datetime_with_timezone :created_at, null: false - t.references :requirement, null: false, foreign_key: { on_delete: :cascade } - t.bigint :pipeline_id - t.bigint :author_id - t.integer :state, null: false, limit: 2 - - t.index :pipeline_id - t.index :author_id - end - end -end diff --git a/db/migrate/20200511191027_add_author_foreign_key_to_test_reports.rb b/db/migrate/20200511191027_add_author_foreign_key_to_test_reports.rb deleted file mode 100644 index 532133fe7f9..00000000000 --- a/db/migrate/20200511191027_add_author_foreign_key_to_test_reports.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddAuthorForeignKeyToTestReports < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :requirements_management_test_reports, :users, column: :author_id, on_delete: :nullify - end - end - - def down - with_lock_retries do - remove_foreign_key :requirements_management_test_reports, column: :author_id - end - end -end diff --git a/db/migrate/20200511208012_add_pipeline_foreign_key_to_test_reports.rb b/db/migrate/20200511208012_add_pipeline_foreign_key_to_test_reports.rb deleted file mode 100644 index 46657f9af6d..00000000000 --- a/db/migrate/20200511208012_add_pipeline_foreign_key_to_test_reports.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPipelineForeignKeyToTestReports < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :requirements_management_test_reports, :ci_pipelines, column: :pipeline_id, on_delete: :nullify - end - end - - def down - with_lock_retries do - remove_foreign_key :requirements_management_test_reports, column: :pipeline_id - end - end -end diff --git a/db/migrate/20200512085150_change_default_value_of_protected_ci_variables_of_application_settings_to_true.rb b/db/migrate/20200512085150_change_default_value_of_protected_ci_variables_of_application_settings_to_true.rb deleted file mode 100644 index ca623ccf8b4..00000000000 --- a/db/migrate/20200512085150_change_default_value_of_protected_ci_variables_of_application_settings_to_true.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class ChangeDefaultValueOfProtectedCiVariablesOfApplicationSettingsToTrue < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_column_default :application_settings, :protected_ci_variables, from: false, to: true - end -end diff --git a/db/migrate/20200512160004_add_index_to_ci_job_artifacts_for_terraform_reports.rb b/db/migrate/20200512160004_add_index_to_ci_job_artifacts_for_terraform_reports.rb deleted file mode 100644 index 20eaa549ee5..00000000000 --- a/db/migrate/20200512160004_add_index_to_ci_job_artifacts_for_terraform_reports.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToCiJobArtifactsForTerraformReports < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_ci_job_artifacts_for_terraform_reports' - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_job_artifacts, [:project_id, :id], where: 'file_type = 18', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME - end -end diff --git a/db/migrate/20200512164334_sprint_make_state_enum_not_null_and_default.rb b/db/migrate/20200512164334_sprint_make_state_enum_not_null_and_default.rb deleted file mode 100644 index f0db228e249..00000000000 --- a/db/migrate/20200512164334_sprint_make_state_enum_not_null_and_default.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class SprintMakeStateEnumNotNullAndDefault < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - change_column_default :sprints, :state_enum, from: 0, to: 1 - change_column_null :sprints, :state_enum, false, 1 - end - - def down - change_column_null :sprints, :state_enum, true - change_column_default :sprints, :state_enum, from: 1, to: nil - end -end diff --git a/db/migrate/20200512195442_update_index_on_name_type_eq_ci_build_to_ci_builds.rb b/db/migrate/20200512195442_update_index_on_name_type_eq_ci_build_to_ci_builds.rb deleted file mode 100644 index f1334afb89d..00000000000 --- a/db/migrate/20200512195442_update_index_on_name_type_eq_ci_build_to_ci_builds.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -class UpdateIndexOnNameTypeEqCiBuildToCiBuilds < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - OLD_INDEX_NAME = 'index_ci_builds_on_name_and_security_type_eq_ci_build' - NEW_INDEX_NAME = 'index_security_ci_builds_on_name_and_id' - - OLD_CLAUSE = "((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, - ('dast'::character varying)::text, - ('dependency_scanning'::character varying)::text, - ('license_management'::character varying)::text, - ('sast'::character varying)::text, - ('license_scanning'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text)" - - NEW_CLAUSE = "((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, - ('dast'::character varying)::text, - ('dependency_scanning'::character varying)::text, - ('license_management'::character varying)::text, - ('sast'::character varying)::text, - ('secret_detection'::character varying)::text, - ('license_scanning'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text)" - - def up - add_concurrent_index :ci_builds, [:name, :id], name: NEW_INDEX_NAME, where: NEW_CLAUSE - remove_concurrent_index_by_name :ci_builds, OLD_INDEX_NAME - end - - def down - add_concurrent_index :ci_builds, [:name, :id], name: OLD_INDEX_NAME, where: OLD_CLAUSE - remove_concurrent_index_by_name :ci_builds, NEW_INDEX_NAME - end -end diff --git a/db/migrate/20200513160930_fix_not_null_check_constraint_inconsistency.rb b/db/migrate/20200513160930_fix_not_null_check_constraint_inconsistency.rb deleted file mode 100644 index a8bb91cf6cf..00000000000 --- a/db/migrate/20200513160930_fix_not_null_check_constraint_inconsistency.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class FixNotNullCheckConstraintInconsistency < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - table = :application_settings - - %i(container_registry_vendor container_registry_version).each do |column| - change_column_null table, column, false - remove_not_null_constraint(table, column) if check_not_null_constraint_exists?(table, column) - end - end - - def down - # No-op: for regular systems without the inconsistency, #up is a no-op, too - end -end diff --git a/db/migrate/20200513224143_add_section_to_approval_merge_request_rule.rb b/db/migrate/20200513224143_add_section_to_approval_merge_request_rule.rb deleted file mode 100644 index 98424e9b735..00000000000 --- a/db/migrate/20200513224143_add_section_to_approval_merge_request_rule.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddSectionToApprovalMergeRequestRule < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless column_exists?(:approval_merge_request_rules, :section) - add_column :approval_merge_request_rules, :section, :text - end - - add_text_limit :approval_merge_request_rules, :section, 255 - end - - def down - remove_column :approval_merge_request_rules, :section - end -end diff --git a/db/migrate/20200513234502_fill_file_store_lfs_objects.rb b/db/migrate/20200513234502_fill_file_store_lfs_objects.rb deleted file mode 100644 index 74066afbd83..00000000000 --- a/db/migrate/20200513234502_fill_file_store_lfs_objects.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class FillFileStoreLfsObjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - update_column_in_batches(:lfs_objects, :file_store, 1) do |table, query| - query.where(table[:file_store].eq(nil)) - end - end - - def down - # no-op - end -end diff --git a/db/migrate/20200513235347_fill_store_uploads.rb b/db/migrate/20200513235347_fill_store_uploads.rb deleted file mode 100644 index 42db5e4cc08..00000000000 --- a/db/migrate/20200513235347_fill_store_uploads.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class FillStoreUploads < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - update_column_in_batches(:uploads, :store, 1) do |table, query| - query.where(table[:store].eq(nil)) - end - end - - def down - # no-op - end -end diff --git a/db/migrate/20200513235532_fill_file_store_ci_job_artifacts.rb b/db/migrate/20200513235532_fill_file_store_ci_job_artifacts.rb deleted file mode 100644 index d4c25167535..00000000000 --- a/db/migrate/20200513235532_fill_file_store_ci_job_artifacts.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class FillFileStoreCiJobArtifacts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - # rubocop:disable Migration/UpdateLargeTable - update_column_in_batches(:ci_job_artifacts, :file_store, 1) do |table, query| - query.where(table[:file_store].eq(nil)) - end - # rubocop:enable Migration/UpdateLargeTable - end - - def down - # no-op - end -end diff --git a/db/migrate/20200515152649_enable_btree_gist_extension.rb b/db/migrate/20200515152649_enable_btree_gist_extension.rb deleted file mode 100644 index bd81c921a87..00000000000 --- a/db/migrate/20200515152649_enable_btree_gist_extension.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class EnableBtreeGistExtension < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - create_extension :btree_gist - end - - def down - drop_extension :btree_gist - end -end diff --git a/db/migrate/20200515153633_iteration_date_range_constraint.rb b/db/migrate/20200515153633_iteration_date_range_constraint.rb deleted file mode 100644 index ab197ff8ae7..00000000000 --- a/db/migrate/20200515153633_iteration_date_range_constraint.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -class IterationDateRangeConstraint < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute <<~SQL - ALTER TABLE sprints - ADD CONSTRAINT iteration_start_and_due_daterange_project_id_constraint - EXCLUDE USING gist - ( project_id WITH =, - daterange(start_date, due_date, '[]') WITH && - ) - WHERE (project_id IS NOT NULL) - SQL - - execute <<~SQL - ALTER TABLE sprints - ADD CONSTRAINT iteration_start_and_due_daterange_group_id_constraint - EXCLUDE USING gist - ( group_id WITH =, - daterange(start_date, due_date, '[]') WITH && - ) - WHERE (group_id IS NOT NULL) - SQL - end - - def down - execute <<~SQL - ALTER TABLE sprints - DROP CONSTRAINT IF EXISTS iteration_start_and_due_daterange_project_id_constraint - SQL - - execute <<~SQL - ALTER TABLE sprints - DROP CONSTRAINT IF EXISTS iteration_start_and_due_daterange_group_id_constraint - SQL - end -end diff --git a/db/migrate/20200515155620_add_index_non_requested_project_members_on_source_id_source_type.rb b/db/migrate/20200515155620_add_index_non_requested_project_members_on_source_id_source_type.rb deleted file mode 100644 index 333f4e93e95..00000000000 --- a/db/migrate/20200515155620_add_index_non_requested_project_members_on_source_id_source_type.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexNonRequestedProjectMembersOnSourceIdSourceType < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index(:members, [:source_id, :source_type], where: "requested_at IS NULL and type = 'ProjectMember'", name: 'index_non_requested_project_members_on_source_id_and_type') - end - - def down - remove_concurrent_index_by_name(:members, 'index_non_requested_project_members_on_source_id_and_type') - end -end diff --git a/db/migrate/20200518091745_add_index_to_personal_access_token_impersonation.rb b/db/migrate/20200518091745_add_index_to_personal_access_token_impersonation.rb deleted file mode 100644 index f9681f1a976..00000000000 --- a/db/migrate/20200518091745_add_index_to_personal_access_token_impersonation.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToPersonalAccessTokenImpersonation < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_expired_and_not_notified_personal_access_tokens' - - disable_ddl_transaction! - - def up - add_concurrent_index( - :personal_access_tokens, - [:id, :expires_at], - where: "impersonation = FALSE AND revoked = FALSE AND expire_notification_delivered = FALSE", - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index_by_name( - :personal_access_tokens, - name: INDEX_NAME - ) - end -end diff --git a/db/migrate/20200519074709_update_resource_state_events_constraint_to_support_epic_id.rb b/db/migrate/20200519074709_update_resource_state_events_constraint_to_support_epic_id.rb deleted file mode 100644 index ff60e3bdac1..00000000000 --- a/db/migrate/20200519074709_update_resource_state_events_constraint_to_support_epic_id.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class UpdateResourceStateEventsConstraintToSupportEpicId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - OLD_CONSTRAINT = 'resource_state_events_must_belong_to_issue_or_merge_request' - CONSTRAINT_NAME = 'resource_state_events_must_belong_to_issue_or_merge_request_or_' - - def up - remove_check_constraint :resource_state_events, OLD_CONSTRAINT - add_check_constraint :resource_state_events, "(issue_id != NULL AND merge_request_id IS NULL AND epic_id IS NULL) OR " \ - "(issue_id IS NULL AND merge_request_id != NULL AND epic_id IS NULL) OR" \ - "(issue_id IS NULL AND merge_request_id IS NULL AND epic_id != NULL)", CONSTRAINT_NAME - end - - def down - remove_check_constraint :resource_state_events, CONSTRAINT_NAME - add_check_constraint :resource_state_events, '(issue_id != NULL AND merge_request_id IS NULL) OR (merge_request_id != NULL AND issue_id IS NULL)', OLD_CONSTRAINT - end -end diff --git a/db/migrate/20200519101002_add_error_message_column_to_jira_imports.rb b/db/migrate/20200519101002_add_error_message_column_to_jira_imports.rb deleted file mode 100644 index 478b5358056..00000000000 --- a/db/migrate/20200519101002_add_error_message_column_to_jira_imports.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddErrorMessageColumnToJiraImports < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - unless column_exists?(:jira_imports, :error_message) - add_column :jira_imports, :error_message, :text - end - - add_text_limit :jira_imports, :error_message, 1000 - end - - def down - return unless column_exists?(:jira_imports, :error_message) - - remove_column :jira_imports, :error_message - end -end diff --git a/db/migrate/20200519115908_add_epics_confidential_index.rb b/db/migrate/20200519115908_add_epics_confidential_index.rb deleted file mode 100644 index 68a1715acb4..00000000000 --- a/db/migrate/20200519115908_add_epics_confidential_index.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddEpicsConfidentialIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :epics, :confidential - end - - def down - remove_concurrent_index :epics, :confidential - end -end diff --git a/db/migrate/20200519141534_add_instance_level_variables_column_to_plan_limits.rb b/db/migrate/20200519141534_add_instance_level_variables_column_to_plan_limits.rb deleted file mode 100644 index bf36e74a746..00000000000 --- a/db/migrate/20200519141534_add_instance_level_variables_column_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddInstanceLevelVariablesColumnToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :plan_limits, :ci_instance_level_variables, :integer, default: 25, null: false - end -end diff --git a/db/migrate/20200519194042_update_container_expiration_policies_defaults.rb b/db/migrate/20200519194042_update_container_expiration_policies_defaults.rb deleted file mode 100644 index 071f50d16a0..00000000000 --- a/db/migrate/20200519194042_update_container_expiration_policies_defaults.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class UpdateContainerExpirationPoliciesDefaults < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :container_expiration_policies, :cadence, '1d' - change_column_default :container_expiration_policies, :keep_n, 10 - change_column_default :container_expiration_policies, :older_than, '90d' - end - end - - def down - with_lock_retries do - change_column_default :container_expiration_policies, :cadence, '7d' - change_column_default :container_expiration_policies, :keep_n, nil - change_column_default :container_expiration_policies, :older_than, nil - end - end -end diff --git a/db/migrate/20200520103514_add_todo_resolved_by_action.rb b/db/migrate/20200520103514_add_todo_resolved_by_action.rb deleted file mode 100644 index 0aa91091451..00000000000 --- a/db/migrate/20200520103514_add_todo_resolved_by_action.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTodoResolvedByAction < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :todos, :resolved_by_action, :integer, limit: 2 - end - end - - def down - with_lock_retries do - remove_column :todos, :resolved_by_action - end - end -end diff --git a/db/migrate/20200521022725_add_experience_level_to_user_preferences.rb b/db/migrate/20200521022725_add_experience_level_to_user_preferences.rb deleted file mode 100644 index e70a13599c3..00000000000 --- a/db/migrate/20200521022725_add_experience_level_to_user_preferences.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddExperienceLevelToUserPreferences < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :user_preferences, :experience_level, :integer, limit: 2 - end -end diff --git a/db/migrate/20200521225327_create_alert_management_alert_assignees.rb b/db/migrate/20200521225327_create_alert_management_alert_assignees.rb deleted file mode 100644 index 99de2646b3d..00000000000 --- a/db/migrate/20200521225327_create_alert_management_alert_assignees.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class CreateAlertManagementAlertAssignees < ActiveRecord::Migration[6.0] - DOWNTIME = false - - ALERT_INDEX_NAME = 'index_alert_assignees_on_alert_id' - UNIQUE_INDEX_NAME = 'index_alert_assignees_on_user_id_and_alert_id' - - def up - create_table :alert_management_alert_assignees do |t| - t.bigint :user_id, null: false - t.bigint :alert_id, null: false - - t.index :alert_id, name: ALERT_INDEX_NAME - t.index [:user_id, :alert_id], unique: true, name: UNIQUE_INDEX_NAME - end - end - - def down - drop_table :alert_management_alert_assignees - end -end diff --git a/db/migrate/20200521225337_add_foreign_key_to_user_id_on_alert_management_alert_assignees.rb b/db/migrate/20200521225337_add_foreign_key_to_user_id_on_alert_management_alert_assignees.rb deleted file mode 100644 index 4a6a25a8472..00000000000 --- a/db/migrate/20200521225337_add_foreign_key_to_user_id_on_alert_management_alert_assignees.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToUserIdOnAlertManagementAlertAssignees < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :alert_management_alert_assignees, :users, column: :user_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :alert_management_alert_assignees, column: :user_id - end - end -end diff --git a/db/migrate/20200521225346_add_foreign_key_to_alert_id_on_alert_mangagement_alert_assignees.rb b/db/migrate/20200521225346_add_foreign_key_to_alert_id_on_alert_mangagement_alert_assignees.rb deleted file mode 100644 index 77d374f08fa..00000000000 --- a/db/migrate/20200521225346_add_foreign_key_to_alert_id_on_alert_mangagement_alert_assignees.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToAlertIdOnAlertMangagementAlertAssignees < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :alert_management_alert_assignees, :alert_management_alerts, column: :alert_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :alert_management_alert_assignees, column: :alert_id - end - end -end diff --git a/db/migrate/20200522205606_create_group_deploy_keys_group.rb b/db/migrate/20200522205606_create_group_deploy_keys_group.rb deleted file mode 100644 index 85dbc14b0f5..00000000000 --- a/db/migrate/20200522205606_create_group_deploy_keys_group.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class CreateGroupDeployKeysGroup < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - def up - with_lock_retries do - create_table :group_deploy_keys_groups do |t| - t.timestamps_with_timezone - - t.references :group, index: false, null: false, foreign_key: { to_table: :namespaces, on_delete: :cascade } - t.references :group_deploy_key, null: false, foreign_key: { on_delete: :cascade } - - t.index [:group_id, :group_deploy_key_id], unique: true, name: 'index_group_deploy_keys_group_on_group_deploy_key_and_group_ids' - end - end - end - - def down - with_lock_retries do - drop_table :group_deploy_keys_groups - end - end -end diff --git a/db/migrate/20200522235146_add_index_on_snippet_type_and_id.rb b/db/migrate/20200522235146_add_index_on_snippet_type_and_id.rb deleted file mode 100644 index 0949e8049d1..00000000000 --- a/db/migrate/20200522235146_add_index_on_snippet_type_and_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnSnippetTypeAndId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :snippets, [:id, :type] - end - - def down - remove_concurrent_index :snippets, [:id, :type] - end -end diff --git a/db/migrate/20200524104346_add_source_to_resource_state_event.rb b/db/migrate/20200524104346_add_source_to_resource_state_event.rb deleted file mode 100644 index a1d1575bb02..00000000000 --- a/db/migrate/20200524104346_add_source_to_resource_state_event.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddSourceToResourceStateEvent < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless column_exists?(:resource_state_events, :source_commit) - add_column :resource_state_events, :source_commit, :text - end - - add_text_limit :resource_state_events, :source_commit, 40 - end - - def down - remove_column :resource_state_events, :source_commit - end -end diff --git a/db/migrate/20200525114553_rename_user_type_index.rb b/db/migrate/20200525114553_rename_user_type_index.rb deleted file mode 100644 index 44ce142ffcb..00000000000 --- a/db/migrate/20200525114553_rename_user_type_index.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RenameUserTypeIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :users, [:state, :user_type], name: 'index_users_on_state_and_user_type' - remove_concurrent_index_by_name :users, 'index_users_on_state_and_user_type_internal' - end - - def down - add_concurrent_index :users, [:state, :user_type], where: 'ghost IS NOT TRUE', name: 'index_users_on_state_and_user_type_internal' - remove_concurrent_index_by_name :users, 'index_users_on_state_and_user_type' - end -end diff --git a/db/migrate/20200526013844_add_alert_events_to_services.rb b/db/migrate/20200526013844_add_alert_events_to_services.rb deleted file mode 100644 index 1dba7fcaad4..00000000000 --- a/db/migrate/20200526013844_add_alert_events_to_services.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddAlertEventsToServices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :services, :alert_events, :boolean - end - end - - def down - with_lock_retries do - remove_column :services, :alert_events - end - end -end diff --git a/db/migrate/20200526120714_change_partial_indexes_on_services.rb b/db/migrate/20200526120714_change_partial_indexes_on_services.rb deleted file mode 100644 index a4d58cda105..00000000000 --- a/db/migrate/20200526120714_change_partial_indexes_on_services.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class ChangePartialIndexesOnServices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :services, [:type, :instance], unique: true, where: 'instance = true', name: 'index_services_on_type_and_instance_partial' - remove_concurrent_index_by_name :services, 'index_services_on_type_and_instance' - - add_concurrent_index :services, [:type, :template], unique: true, where: 'template = true', name: 'index_services_on_type_and_template_partial' - remove_concurrent_index_by_name :services, 'index_services_on_type_and_template' - end - - def down - add_concurrent_index :services, [:type, :instance], unique: true, where: 'instance IS TRUE', name: 'index_services_on_type_and_instance' - remove_concurrent_index_by_name :services, 'index_services_on_type_and_instance_partial' - - add_concurrent_index :services, [:type, :template], unique: true, where: 'template IS TRUE', name: 'index_services_on_type_and_template' - remove_concurrent_index_by_name :services, 'index_services_on_type_and_template_partial' - end -end diff --git a/db/migrate/20200526142550_drop_null_constraint_on_group_import_state_jid.rb b/db/migrate/20200526142550_drop_null_constraint_on_group_import_state_jid.rb deleted file mode 100644 index d0dfa126455..00000000000 --- a/db/migrate/20200526142550_drop_null_constraint_on_group_import_state_jid.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class DropNullConstraintOnGroupImportStateJid < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - change_column_null :group_import_states, :jid, true - end - - def down - # No-op -- null values could have been added after this this constraint was removed. - end -end diff --git a/db/migrate/20200526153844_add_issues_last_edited_by_id_index.rb b/db/migrate/20200526153844_add_issues_last_edited_by_id_index.rb deleted file mode 100644 index 85f121a4c02..00000000000 --- a/db/migrate/20200526153844_add_issues_last_edited_by_id_index.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIssuesLastEditedByIdIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :issues, :last_edited_by_id - add_concurrent_index :epics, :last_edited_by_id - end - - def down - remove_concurrent_index :issues, :last_edited_by_id - remove_concurrent_index :epics, :last_edited_by_id - end -end diff --git a/db/migrate/20200526164946_create_operations_feature_flags_issues.rb b/db/migrate/20200526164946_create_operations_feature_flags_issues.rb deleted file mode 100644 index 24876997cfd..00000000000 --- a/db/migrate/20200526164946_create_operations_feature_flags_issues.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class CreateOperationsFeatureFlagsIssues < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :operations_feature_flags_issues do |t| - t.references :feature_flag, index: false, foreign_key: { on_delete: :cascade, to_table: :operations_feature_flags }, null: false - t.bigint :issue_id, null: false - - t.index [:feature_flag_id, :issue_id], unique: true, name: :index_ops_feature_flags_issues_on_feature_flag_id_and_issue_id - t.index :issue_id - end - end -end diff --git a/db/migrate/20200526164947_add_foreign_key_to_ops_feature_flags_issues.rb b/db/migrate/20200526164947_add_foreign_key_to_ops_feature_flags_issues.rb deleted file mode 100644 index a11a8094823..00000000000 --- a/db/migrate/20200526164947_add_foreign_key_to_ops_feature_flags_issues.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToOpsFeatureFlagsIssues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :operations_feature_flags_issues, :issues, column: :issue_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :operations_feature_flags_issues, column: :issue_id - end - end -end diff --git a/db/migrate/20200526193555_add_squash_option_to_project.rb b/db/migrate/20200526193555_add_squash_option_to_project.rb deleted file mode 100644 index 6dd4e1c7c8e..00000000000 --- a/db/migrate/20200526193555_add_squash_option_to_project.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddSquashOptionToProject < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :project_settings, :squash_option, :integer, default: 3, limit: 2 - end -end diff --git a/db/migrate/20200526231421_update_index_approval_rule_name_for_code_owners_rule_type.rb b/db/migrate/20200526231421_update_index_approval_rule_name_for_code_owners_rule_type.rb deleted file mode 100644 index 2483ff7f8fa..00000000000 --- a/db/migrate/20200526231421_update_index_approval_rule_name_for_code_owners_rule_type.rb +++ /dev/null @@ -1,116 +0,0 @@ -# frozen_string_literal: true - -class UpdateIndexApprovalRuleNameForCodeOwnersRuleType < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - LEGACY_INDEX_NAME_RULE_TYPE = "index_approval_rule_name_for_code_owners_rule_type" - LEGACY_INDEX_NAME_CODE_OWNERS = "approval_rule_name_index_for_code_owners" - - SECTIONAL_INDEX_NAME = "index_approval_rule_name_for_sectional_code_owners_rule_type" - - CODE_OWNER_RULE_TYPE = 2 - - def up - unless index_exists_by_name?(:approval_merge_request_rules, SECTIONAL_INDEX_NAME) - # Ensure only 1 code_owner rule with the same name and section per merge_request - # - add_concurrent_index( - :approval_merge_request_rules, - [:merge_request_id, :name, :section], - unique: true, - where: "rule_type = #{CODE_OWNER_RULE_TYPE}", - name: SECTIONAL_INDEX_NAME - ) - end - - remove_concurrent_index_by_name :approval_merge_request_rules, LEGACY_INDEX_NAME_RULE_TYPE - remove_concurrent_index_by_name :approval_merge_request_rules, LEGACY_INDEX_NAME_CODE_OWNERS - - add_concurrent_index( - :approval_merge_request_rules, - [:merge_request_id, :name], - unique: true, - where: "rule_type = #{CODE_OWNER_RULE_TYPE} AND section IS NULL", - name: LEGACY_INDEX_NAME_RULE_TYPE - ) - - add_concurrent_index( - :approval_merge_request_rules, - [:merge_request_id, :code_owner, :name], - unique: true, - where: "code_owner = true AND section IS NULL", - name: LEGACY_INDEX_NAME_CODE_OWNERS - ) - end - - def down - # In a rollback situation, we can't guarantee that there will not be - # records that were allowed under the more specific SECTIONAL_INDEX_NAME - # index but would cause uniqueness violations under both the - # LEGACY_INDEX_NAME_RULE_TYPE and LEGACY_INDEX_NAME_CODE_OWNERS indices. - # Therefore, we need to first find all the MergeRequests with - # ApprovalMergeRequestRules that would violate these "new" indices and - # delete those approval rules, then create the new index, then finally - # recreate the approval rules for those merge requests. - # - - # First, find all MergeRequests with ApprovalMergeRequestRules that will - # violate the new index. - # - if Gitlab.ee? - merge_request_ids = ApprovalMergeRequestRule - .select(:merge_request_id) - .where(rule_type: CODE_OWNER_RULE_TYPE) - .group(:merge_request_id, :rule_type, :name) - .includes(:merge_request) - .having("count(*) > 1") - .collect(&:merge_request_id) - - # Delete ALL their code_owner approval rules - # - merge_request_ids.each_slice(10) do |ids| - ApprovalMergeRequestRule.where(merge_request_id: ids).code_owner.delete_all - end - end - - # Remove legacy partial indices that only apply to `section IS NULL` records - # - remove_concurrent_index_by_name :approval_merge_request_rules, LEGACY_INDEX_NAME_RULE_TYPE - remove_concurrent_index_by_name :approval_merge_request_rules, LEGACY_INDEX_NAME_CODE_OWNERS - - # Reconstruct original "legacy" indices - # - add_concurrent_index( - :approval_merge_request_rules, - [:merge_request_id, :name], - unique: true, - where: "rule_type = #{CODE_OWNER_RULE_TYPE}", - name: LEGACY_INDEX_NAME_RULE_TYPE - ) - - add_concurrent_index( - :approval_merge_request_rules, - [:merge_request_id, :code_owner, :name], - unique: true, - where: "code_owner = true", - name: LEGACY_INDEX_NAME_CODE_OWNERS - ) - - # MergeRequest::SyncCodeOwnerApprovalRules recreates the code_owner rules - # from scratch, adding them to the index. Duplicates will be rejected. - # - if Gitlab.ee? - merge_request_ids.each_slice(10) do |ids| - MergeRequest.where(id: ids).each do |merge_request| - MergeRequests::SyncCodeOwnerApprovalRules.new(merge_request).execute - end - end - end - - remove_concurrent_index_by_name :approval_merge_request_rules, SECTIONAL_INDEX_NAME - end -end diff --git a/db/migrate/20200527092027_add_link_type_to_release_links.rb b/db/migrate/20200527092027_add_link_type_to_release_links.rb deleted file mode 100644 index 5088775f665..00000000000 --- a/db/migrate/20200527092027_add_link_type_to_release_links.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddLinkTypeToReleaseLinks < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :release_links, :link_type, :integer, limit: 2, default: 0 - end - end - - def down - with_lock_retries do - remove_column :release_links, :link_type - end - end -end diff --git a/db/migrate/20200527135313_add_requirements_build_reference.rb b/db/migrate/20200527135313_add_requirements_build_reference.rb deleted file mode 100644 index b492871a19b..00000000000 --- a/db/migrate/20200527135313_add_requirements_build_reference.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddRequirementsBuildReference < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_requirements_management_test_reports_on_build_id' - - def up - add_column :requirements_management_test_reports, :build_id, :bigint - add_index :requirements_management_test_reports, :build_id, name: INDEX_NAME # rubocop:disable Migration/AddIndex - - with_lock_retries do - add_foreign_key :requirements_management_test_reports, :ci_builds, column: :build_id, on_delete: :nullify - end - end - - def down - with_lock_retries do - remove_column :requirements_management_test_reports, :build_id - end - end -end diff --git a/db/migrate/20200527151413_create_ci_build_report_results_table.rb b/db/migrate/20200527151413_create_ci_build_report_results_table.rb deleted file mode 100644 index 7f854dd4891..00000000000 --- a/db/migrate/20200527151413_create_ci_build_report_results_table.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class CreateCiBuildReportResultsTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :ci_build_report_results, id: false do |t| - t.bigint :build_id, null: false, index: false, primary_key: true - t.bigint :project_id, null: false, index: true - t.jsonb :data, null: false, default: {} - end - end -end diff --git a/db/migrate/20200527152116_add_foreign_key_to_build_id_on_build_report_results.rb b/db/migrate/20200527152116_add_foreign_key_to_build_id_on_build_report_results.rb deleted file mode 100644 index 1809fed551a..00000000000 --- a/db/migrate/20200527152116_add_foreign_key_to_build_id_on_build_report_results.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToBuildIdOnBuildReportResults < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :ci_build_report_results, :ci_builds, column: :build_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :ci_build_report_results, column: :build_id - end - end -end diff --git a/db/migrate/20200527152657_add_foreign_key_to_project_id_on_build_report_results.rb b/db/migrate/20200527152657_add_foreign_key_to_project_id_on_build_report_results.rb deleted file mode 100644 index 1857cb07b06..00000000000 --- a/db/migrate/20200527152657_add_foreign_key_to_project_id_on_build_report_results.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToProjectIdOnBuildReportResults < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :ci_build_report_results, :projects, column: :project_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :ci_build_report_results, column: :project_id - end - end -end diff --git a/db/migrate/20200527170649_create_alert_management_alert_user_mentions.rb b/db/migrate/20200527170649_create_alert_management_alert_user_mentions.rb deleted file mode 100644 index 15e4ab2a357..00000000000 --- a/db/migrate/20200527170649_create_alert_management_alert_user_mentions.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class CreateAlertManagementAlertUserMentions < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :alert_management_alert_user_mentions do |t| - t.references :alert_management_alert, type: :bigint, index: false, null: false, foreign_key: { on_delete: :cascade } - t.bigint :note_id, null: true - - t.integer :mentioned_users_ids, array: true - t.integer :mentioned_projects_ids, array: true - t.integer :mentioned_groups_ids, array: true - end - - add_index :alert_management_alert_user_mentions, [:note_id], where: 'note_id IS NOT NULL', unique: true, name: 'index_alert_user_mentions_on_note_id' - add_index :alert_management_alert_user_mentions, [:alert_management_alert_id], where: 'note_id IS NULL', unique: true, name: 'index_alert_user_mentions_on_alert_id' - add_index :alert_management_alert_user_mentions, [:alert_management_alert_id, :note_id], unique: true, name: 'index_alert_user_mentions_on_alert_id_and_note_id' - end -end diff --git a/db/migrate/20200527211000_add_max_import_size.rb b/db/migrate/20200527211000_add_max_import_size.rb deleted file mode 100644 index 2779997dbb2..00000000000 --- a/db/migrate/20200527211000_add_max_import_size.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddMaxImportSize < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - add_column(:application_settings, :max_import_size, :integer, default: 50, null: false) - end - - def down - remove_column(:application_settings, :max_import_size) - end -end diff --git a/db/migrate/20200527211605_add_locked_to_ci_pipelines.rb b/db/migrate/20200527211605_add_locked_to_ci_pipelines.rb deleted file mode 100644 index 3587e6c4a08..00000000000 --- a/db/migrate/20200527211605_add_locked_to_ci_pipelines.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddLockedToCiPipelines < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :ci_pipelines, :locked, :integer, limit: 2, null: false, default: 0 - end - end - - def down - with_lock_retries do - remove_column :ci_pipelines, :locked - end - end -end diff --git a/db/migrate/20200528054112_add_index_to_package_name.rb b/db/migrate/20200528054112_add_index_to_package_name.rb deleted file mode 100644 index fa12088741d..00000000000 --- a/db/migrate/20200528054112_add_index_to_package_name.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToPackageName < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'package_name_index' - - def up - add_concurrent_index(:packages_packages, :name, name: INDEX_NAME) - end - - def down - remove_concurrent_index(:packages_packages, :name, name: INDEX_NAME) - end -end diff --git a/db/migrate/20200528125905_add_project_id_user_id_status_ref_index_to_ci_pipelines.rb b/db/migrate/20200528125905_add_project_id_user_id_status_ref_index_to_ci_pipelines.rb deleted file mode 100644 index 7211490e337..00000000000 --- a/db/migrate/20200528125905_add_project_id_user_id_status_ref_index_to_ci_pipelines.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class AddProjectIdUserIdStatusRefIndexToCiPipelines < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - SOURCE_PARENT_PIPELINE = 12 - - def up - add_concurrent_index( - :ci_pipelines, - [:project_id, :user_id, :status, :ref], - where: "source != #{SOURCE_PARENT_PIPELINE}" - ) - end - - def down - remove_concurrent_index( - :ci_pipelines, - [:project_id, :user_id, :status, :ref], - where: "source != #{SOURCE_PARENT_PIPELINE}" - ) - end -end diff --git a/db/migrate/20200528171933_remove_not_null_from_external_dashboard_url.rb b/db/migrate/20200528171933_remove_not_null_from_external_dashboard_url.rb deleted file mode 100644 index d146c8b487b..00000000000 --- a/db/migrate/20200528171933_remove_not_null_from_external_dashboard_url.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class RemoveNotNullFromExternalDashboardUrl < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_column_null :project_metrics_settings, :external_dashboard_url, true - end -end diff --git a/db/migrate/20200601210148_add_dashboard_timezone_to_project_metrics_setting.rb b/db/migrate/20200601210148_add_dashboard_timezone_to_project_metrics_setting.rb deleted file mode 100644 index 3f74ef28621..00000000000 --- a/db/migrate/20200601210148_add_dashboard_timezone_to_project_metrics_setting.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddDashboardTimezoneToProjectMetricsSetting < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :project_metrics_settings, :dashboard_timezone, :integer, limit: 2, null: false, default: 0 - end -end diff --git a/db/migrate/20200603073101_change_constraint_name_on_resource_state_events.rb b/db/migrate/20200603073101_change_constraint_name_on_resource_state_events.rb deleted file mode 100644 index d37027bf2fb..00000000000 --- a/db/migrate/20200603073101_change_constraint_name_on_resource_state_events.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class ChangeConstraintNameOnResourceStateEvents < ActiveRecord::Migration[6.0] - DOWNTIME = false - - NEW_CONSTRAINT_NAME = 'state_events_must_belong_to_issue_or_merge_request_or_epic' - OLD_CONSTRAINT_NAME = 'resource_state_events_must_belong_to_issue_or_merge_request_or_' - - def up - execute "ALTER TABLE resource_state_events RENAME CONSTRAINT #{OLD_CONSTRAINT_NAME} TO #{NEW_CONSTRAINT_NAME};" - end - - def down - execute "ALTER TABLE resource_state_events RENAME CONSTRAINT #{NEW_CONSTRAINT_NAME} TO #{OLD_CONSTRAINT_NAME};" - end -end diff --git a/db/migrate/20200603180338_add_enforce_pat_expiration_to_application_settings.rb b/db/migrate/20200603180338_add_enforce_pat_expiration_to_application_settings.rb deleted file mode 100644 index ca0abc70b64..00000000000 --- a/db/migrate/20200603180338_add_enforce_pat_expiration_to_application_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddEnforcePatExpirationToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :enforce_pat_expiration, :boolean, default: true, null: false - end -end diff --git a/db/migrate/20200604001128_add_secrets_to_ci_builds_metadata.rb b/db/migrate/20200604001128_add_secrets_to_ci_builds_metadata.rb deleted file mode 100644 index 9a67993cf5c..00000000000 --- a/db/migrate/20200604001128_add_secrets_to_ci_builds_metadata.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddSecretsToCiBuildsMetadata < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :ci_builds_metadata, :secrets, :jsonb, default: {}, null: false - end - end - - def down - with_lock_retries do - remove_column :ci_builds_metadata, :secrets - end - end -end diff --git a/db/migrate/20200604143628_create_project_security_settings.rb b/db/migrate/20200604143628_create_project_security_settings.rb deleted file mode 100644 index f972cb509a7..00000000000 --- a/db/migrate/20200604143628_create_project_security_settings.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class CreateProjectSecuritySettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :project_security_settings, id: false do |t| - t.references :project, primary_key: true, index: false, foreign_key: { on_delete: :cascade } - t.timestamps_with_timezone - - t.boolean :auto_fix_container_scanning, default: true, null: false - t.boolean :auto_fix_dast, default: true, null: false - t.boolean :auto_fix_dependency_scanning, default: true, null: false - t.boolean :auto_fix_sast, default: true, null: false - end - end - end - - def down - with_lock_retries do - drop_table :project_security_settings - end - end -end diff --git a/db/migrate/20200604145731_create_board_user_preferences.rb b/db/migrate/20200604145731_create_board_user_preferences.rb deleted file mode 100644 index e83f467d690..00000000000 --- a/db/migrate/20200604145731_create_board_user_preferences.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class CreateBoardUserPreferences < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - create_table :board_user_preferences do |t| - t.bigint :user_id, null: false, index: true - t.bigint :board_id, null: false, index: true - t.boolean :hide_labels - t.timestamps_with_timezone null: false - end - - add_index :board_user_preferences, [:user_id, :board_id], unique: true - end - - def down - drop_table :board_user_preferences - end -end diff --git a/db/migrate/20200604174544_add_users_foreign_key_to_board_user_preferences.rb b/db/migrate/20200604174544_add_users_foreign_key_to_board_user_preferences.rb deleted file mode 100644 index cc613e0261e..00000000000 --- a/db/migrate/20200604174544_add_users_foreign_key_to_board_user_preferences.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddUsersForeignKeyToBoardUserPreferences < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :board_user_preferences, :users, column: :user_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :board_user_preferences, column: :user_id - end - end -end diff --git a/db/migrate/20200604174558_add_boards_foreign_key_to_board_user_preferences.rb b/db/migrate/20200604174558_add_boards_foreign_key_to_board_user_preferences.rb deleted file mode 100644 index 4ac978d3741..00000000000 --- a/db/migrate/20200604174558_add_boards_foreign_key_to_board_user_preferences.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddBoardsForeignKeyToBoardUserPreferences < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :board_user_preferences, :boards, column: :board_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :board_user_preferences, column: :board_id - end - end -end diff --git a/db/migrate/20200605003204_add_foreign_key_to_alert_management_alert_user_mentions.rb b/db/migrate/20200605003204_add_foreign_key_to_alert_management_alert_user_mentions.rb deleted file mode 100644 index 3198544d3a9..00000000000 --- a/db/migrate/20200605003204_add_foreign_key_to_alert_management_alert_user_mentions.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToAlertManagementAlertUserMentions < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :alert_management_alert_user_mentions, :notes, column: :note_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :alert_management_alert_user_mentions, column: :note_id - end - end -end diff --git a/db/migrate/20200605093113_add_ip_address_to_audit_events.rb b/db/migrate/20200605093113_add_ip_address_to_audit_events.rb deleted file mode 100644 index 9f5694ddce2..00000000000 --- a/db/migrate/20200605093113_add_ip_address_to_audit_events.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddIpAddressToAuditEvents < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :audit_events, :ip_address, :inet - end -end diff --git a/db/migrate/20200605160806_add_index_on_repository_size_and_project_id_to_project_statistics.rb b/db/migrate/20200605160806_add_index_on_repository_size_and_project_id_to_project_statistics.rb deleted file mode 100644 index 2e7b75bcd17..00000000000 --- a/db/migrate/20200605160806_add_index_on_repository_size_and_project_id_to_project_statistics.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnRepositorySizeAndProjectIdToProjectStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :project_statistics, [:repository_size, :project_id] - end - - def down - remove_concurrent_index :project_statistics, [:repository_size, :project_id] - end -end diff --git a/db/migrate/20200605160836_add_index_on_storage_size_and_project_id_to_project_statistics.rb b/db/migrate/20200605160836_add_index_on_storage_size_and_project_id_to_project_statistics.rb deleted file mode 100644 index 22f9dab634b..00000000000 --- a/db/migrate/20200605160836_add_index_on_storage_size_and_project_id_to_project_statistics.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnStorageSizeAndProjectIdToProjectStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :project_statistics, [:storage_size, :project_id] - end - - def down - remove_concurrent_index :project_statistics, [:storage_size, :project_id] - end -end diff --git a/db/migrate/20200605160851_add_index_on_wiki_size_and_project_id_to_project_statistics.rb b/db/migrate/20200605160851_add_index_on_wiki_size_and_project_id_to_project_statistics.rb deleted file mode 100644 index d32994afbfc..00000000000 --- a/db/migrate/20200605160851_add_index_on_wiki_size_and_project_id_to_project_statistics.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnWikiSizeAndProjectIdToProjectStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :project_statistics, [:wiki_size, :project_id] - end - - def down - remove_concurrent_index :project_statistics, [:wiki_size, :project_id] - end -end diff --git a/db/migrate/20200607223047_create_cluster_agents.rb b/db/migrate/20200607223047_create_cluster_agents.rb deleted file mode 100644 index 50dd28562e4..00000000000 --- a/db/migrate/20200607223047_create_cluster_agents.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class CreateClusterAgents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:cluster_agents) - with_lock_retries do - create_table :cluster_agents do |t| - t.timestamps_with_timezone null: false - t.belongs_to(:project, null: false, index: true, foreign_key: { on_delete: :cascade }) - t.text :name, null: false - - t.index [:project_id, :name], unique: true - end - end - end - - add_text_limit :cluster_agents, :name, 255 - end - - def down - with_lock_retries do - drop_table :cluster_agents - end - end -end diff --git a/db/migrate/20200607235435_create_cluster_agent_tokens.rb b/db/migrate/20200607235435_create_cluster_agent_tokens.rb deleted file mode 100644 index 30c3ad30fa5..00000000000 --- a/db/migrate/20200607235435_create_cluster_agent_tokens.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class CreateClusterAgentTokens < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:cluster_agent_tokens) - create_table :cluster_agent_tokens do |t| - t.timestamps_with_timezone null: false - t.belongs_to :agent, null: false, index: true, foreign_key: { to_table: :cluster_agents, on_delete: :cascade } - t.text :token_encrypted, null: false - - t.index :token_encrypted, unique: true - end - end - - add_text_limit :cluster_agent_tokens, :token_encrypted, 255 - end - - def down - drop_table :cluster_agent_tokens - end -end diff --git a/db/migrate/20200608214008_change_column_default_project_incident_management_settings.rb b/db/migrate/20200608214008_change_column_default_project_incident_management_settings.rb deleted file mode 100644 index 1bfafb410c0..00000000000 --- a/db/migrate/20200608214008_change_column_default_project_incident_management_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class ChangeColumnDefaultProjectIncidentManagementSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - change_column_default(:project_incident_management_settings, :create_issue, from: true, to: false) - end - - def down - change_column_default(:project_incident_management_settings, :create_issue, from: false, to: true) - end -end diff --git a/db/migrate/20200609012539_add_traversal_ids_to_namespaces.rb b/db/migrate/20200609012539_add_traversal_ids_to_namespaces.rb deleted file mode 100644 index 3041d7a8e58..00000000000 --- a/db/migrate/20200609012539_add_traversal_ids_to_namespaces.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTraversalIdsToNamespaces < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :namespaces, :traversal_ids, :integer, array: true, default: [], null: false # rubocop:disable Migration/AddColumnsToWideTables - end - end - - def down - with_lock_retries do - remove_column :namespaces, :traversal_ids - end - end -end diff --git a/db/migrate/20200609142506_remove_not_null_constraint_from_weight_events_table.rb b/db/migrate/20200609142506_remove_not_null_constraint_from_weight_events_table.rb deleted file mode 100644 index af4d4dbbf42..00000000000 --- a/db/migrate/20200609142506_remove_not_null_constraint_from_weight_events_table.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class RemoveNotNullConstraintFromWeightEventsTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_column_null :resource_weight_events, :user_id, true - end -end diff --git a/db/migrate/20200609142507_remove_not_null_constraint_from_milestone_events_table.rb b/db/migrate/20200609142507_remove_not_null_constraint_from_milestone_events_table.rb deleted file mode 100644 index 41204afb014..00000000000 --- a/db/migrate/20200609142507_remove_not_null_constraint_from_milestone_events_table.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class RemoveNotNullConstraintFromMilestoneEventsTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_column_null :resource_milestone_events, :user_id, true - end -end diff --git a/db/migrate/20200609142508_remove_not_null_constraint_from_state_events_table.rb b/db/migrate/20200609142508_remove_not_null_constraint_from_state_events_table.rb deleted file mode 100644 index ffa047a78f9..00000000000 --- a/db/migrate/20200609142508_remove_not_null_constraint_from_state_events_table.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class RemoveNotNullConstraintFromStateEventsTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_column_null :resource_state_events, :user_id, true - end -end diff --git a/db/migrate/20200609212701_add_incident_settings_to_all_existing_projects.rb b/db/migrate/20200609212701_add_incident_settings_to_all_existing_projects.rb deleted file mode 100644 index a2931824ef5..00000000000 --- a/db/migrate/20200609212701_add_incident_settings_to_all_existing_projects.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class AddIncidentSettingsToAllExistingProjects < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - # Add records to projects project_incident_management_settings - # to preserve behavior for existing projects that - # are using the create issue functionality with the default setting of true - query = <<-SQL - WITH project_ids AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported}( - SELECT DISTINCT issues.project_id AS id - FROM issues - LEFT OUTER JOIN project_incident_management_settings - ON project_incident_management_settings.project_id = issues.project_id - INNER JOIN label_links - ON label_links.target_type = 'Issue' - AND label_links.target_id = issues.id - INNER JOIN labels - ON labels.id = label_links.label_id - WHERE ( project_incident_management_settings.project_id IS NULL ) - -- Use incident labels even though they could be manually added by users who - -- are not using alert funtionality. - AND labels.title = 'incident' - AND labels.color = '#CC0033' - AND labels.description = 'Denotes a disruption to IT services and the associated issues require immediate attention' - ) - INSERT INTO project_incident_management_settings (project_id, create_issue, send_email, issue_template_key) - SELECT project_ids.id, TRUE, FALSE, NULL - FROM project_ids - ON CONFLICT (project_id) DO NOTHING; - SQL - - execute(query) - end - - def down - # no-op - end -end diff --git a/db/migrate/20200610033228_create_terraform_state_versions.rb b/db/migrate/20200610033228_create_terraform_state_versions.rb deleted file mode 100644 index 10e9faa56ab..00000000000 --- a/db/migrate/20200610033228_create_terraform_state_versions.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class CreateTerraformStateVersions < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :terraform_state_versions, if_not_exists: true do |t| - t.references :terraform_state, index: false, null: false, foreign_key: { on_delete: :cascade } - t.references :created_by_user, foreign_key: false - t.timestamps_with_timezone null: false - t.integer :version, null: false - t.integer :file_store, limit: 2, null: false - t.text :file, null: false - - t.index [:terraform_state_id, :version], unique: true, name: 'index_terraform_state_versions_on_state_id_and_version' - end - - add_text_limit :terraform_state_versions, :file, 255 - end - - def down - drop_table :terraform_state_versions - end -end diff --git a/db/migrate/20200610040615_add_versioning_enabled_to_terraform_states.rb b/db/migrate/20200610040615_add_versioning_enabled_to_terraform_states.rb deleted file mode 100644 index 51a9fd3908b..00000000000 --- a/db/migrate/20200610040615_add_versioning_enabled_to_terraform_states.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddVersioningEnabledToTerraformStates < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :terraform_states, :versioning_enabled, :boolean, null: false, default: false - end -end diff --git a/db/migrate/20200610130002_create_vulnerability_statistics.rb b/db/migrate/20200610130002_create_vulnerability_statistics.rb deleted file mode 100644 index 77fd116230e..00000000000 --- a/db/migrate/20200610130002_create_vulnerability_statistics.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class CreateVulnerabilityStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :vulnerability_statistics do |t| - t.timestamps_with_timezone null: false - t.references :project, null: false, foreign_key: { on_delete: :cascade } - t.integer :total, default: 0, null: false - t.integer :critical, default: 0, null: false - t.integer :high, default: 0, null: false - t.integer :medium, default: 0, null: false - t.integer :low, default: 0, null: false - t.integer :unknown, default: 0, null: false - t.integer :info, default: 0, null: false - t.integer :letter_grade, limit: 1, index: true, null: false - end - end - end - - def down - with_lock_retries do - drop_table :vulnerability_statistics - end - end -end diff --git a/db/migrate/20200611013227_add_users_foreign_key_to_terraform_state_versions.rb b/db/migrate/20200611013227_add_users_foreign_key_to_terraform_state_versions.rb deleted file mode 100644 index b599622c776..00000000000 --- a/db/migrate/20200611013227_add_users_foreign_key_to_terraform_state_versions.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddUsersForeignKeyToTerraformStateVersions < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :terraform_state_versions, :users, column: :created_by_user_id, on_delete: :nullify - end - - def down - with_lock_retries do - remove_foreign_key_if_exists :terraform_state_versions, :users, column: :created_by_user_id - end - end -end diff --git a/db/migrate/20200613104045_add_compliance_frameworks_to_application_settings.rb b/db/migrate/20200613104045_add_compliance_frameworks_to_application_settings.rb deleted file mode 100644 index be6f14692e7..00000000000 --- a/db/migrate/20200613104045_add_compliance_frameworks_to_application_settings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddComplianceFrameworksToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :application_settings, :compliance_frameworks, :integer, limit: 2, array: true, default: [], null: false - end - end - - def down - with_lock_retries do - remove_column :application_settings, :compliance_frameworks - end - end -end diff --git a/db/migrate/20200615083635_add_composer_json_to_metadata.rb b/db/migrate/20200615083635_add_composer_json_to_metadata.rb deleted file mode 100644 index 0240d298d34..00000000000 --- a/db/migrate/20200615083635_add_composer_json_to_metadata.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddComposerJsonToMetadata < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :packages_composer_metadata, :composer_json, :jsonb, default: {}, null: false - end -end diff --git a/db/migrate/20200615121217_add_projects_foreign_key_to_project_access_tokens.rb b/db/migrate/20200615121217_add_projects_foreign_key_to_project_access_tokens.rb deleted file mode 100644 index bc8956ff6df..00000000000 --- a/db/migrate/20200615121217_add_projects_foreign_key_to_project_access_tokens.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddProjectsForeignKeyToProjectAccessTokens < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :project_access_tokens, :projects, column: :project_id - end - - def down - remove_foreign_key_if_exists :project_access_tokens, column: :project_id - end -end diff --git a/db/migrate/20200615123055_add_personal_access_token_foreign_key_to_project_access_tokens.rb b/db/migrate/20200615123055_add_personal_access_token_foreign_key_to_project_access_tokens.rb deleted file mode 100644 index efe3fe13bab..00000000000 --- a/db/migrate/20200615123055_add_personal_access_token_foreign_key_to_project_access_tokens.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddPersonalAccessTokenForeignKeyToProjectAccessTokens < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :project_access_tokens, :personal_access_tokens, column: :personal_access_token_id - end - - def down - remove_foreign_key_if_exists :project_access_tokens, column: :personal_access_token_id - end -end diff --git a/db/migrate/20200615141554_add_closed_by_fields_to_resource_state_events.rb b/db/migrate/20200615141554_add_closed_by_fields_to_resource_state_events.rb deleted file mode 100644 index ba11e64e667..00000000000 --- a/db/migrate/20200615141554_add_closed_by_fields_to_resource_state_events.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddClosedByFieldsToResourceStateEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - add_column :resource_state_events, :close_after_error_tracking_resolve, :boolean, default: false, null: false - add_column :resource_state_events, :close_auto_resolve_prometheus_alert, :boolean, default: false, null: false - end - - def down - remove_column :resource_state_events, :close_auto_resolve_prometheus_alert, :boolean - remove_column :resource_state_events, :close_after_error_tracking_resolve, :boolean - end -end diff --git a/db/migrate/20200615193524_add_verify_known_sign_in_to_application_settings.rb b/db/migrate/20200615193524_add_verify_known_sign_in_to_application_settings.rb deleted file mode 100644 index c50a17968a9..00000000000 --- a/db/migrate/20200615193524_add_verify_known_sign_in_to_application_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddVerifyKnownSignInToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :notify_on_unknown_sign_in, :boolean, default: true, null: false - end -end diff --git a/db/migrate/20200615232735_add_index_to_composer_metadata.rb b/db/migrate/20200615232735_add_index_to_composer_metadata.rb deleted file mode 100644 index 72a490c55d8..00000000000 --- a/db/migrate/20200615232735_add_index_to_composer_metadata.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToComposerMetadata < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index(:packages_composer_metadata, [:package_id, :target_sha], unique: true) - end - - def down - remove_concurrent_index(:packages_composer_metadata, [:package_id, :target_sha]) - end -end diff --git a/db/migrate/20200615234047_create_clusters_applications_cilium.rb b/db/migrate/20200615234047_create_clusters_applications_cilium.rb deleted file mode 100644 index 9f77ee71164..00000000000 --- a/db/migrate/20200615234047_create_clusters_applications_cilium.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class CreateClustersApplicationsCilium < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :clusters_applications_cilium do |t| - t.references :cluster, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade } - t.timestamps_with_timezone null: false - t.integer :status, null: false - t.text :status_reason # rubocop:disable Migration/AddLimitToTextColumns - end - end -end diff --git a/db/migrate/20200616124338_add_plan_limits_for_max_size_per_artifact_type.rb b/db/migrate/20200616124338_add_plan_limits_for_max_size_per_artifact_type.rb deleted file mode 100644 index 28fadb495dd..00000000000 --- a/db/migrate/20200616124338_add_plan_limits_for_max_size_per_artifact_type.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -class AddPlanLimitsForMaxSizePerArtifactType < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - # We need to set the 20mb default for lsif for backward compatibility - # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34767#note_371619075 - add_column :plan_limits, "ci_max_artifact_size_lsif", :integer, default: 20, null: false - - artifact_types.each do |type| - add_column :plan_limits, "ci_max_artifact_size_#{type}", :integer, default: 0, null: false - end - end - - private - - def artifact_types - # The list of artifact types (except lsif) from Ci::JobArtifact file_type enum as of this writing. - # Intentionally duplicated so that the migration won't change behavior - # if ever we remove or add more to the list later on. - %w[ - archive - metadata - trace - junit - sast - dependency_scanning - container_scanning - dast - codequality - license_management - license_scanning - performance - metrics - metrics_referee - network_referee - dotenv - cobertura - terraform - accessibility - cluster_applications - secret_detection - requirements - coverage_fuzzing - ] - end -end diff --git a/db/migrate/20200616145031_add_author_id_index_to_audit_events.rb b/db/migrate/20200616145031_add_author_id_index_to_audit_events.rb deleted file mode 100644 index cb06fbe2b11..00000000000 --- a/db/migrate/20200616145031_add_author_id_index_to_audit_events.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddAuthorIdIndexToAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'index_audit_events_on_entity_id_entity_type_id_desc_author_id' - OLD_INDEX_NAME = 'index_audit_events_on_entity_id_and_entity_type_and_id_desc' - - def up - add_concurrent_index(:audit_events, [:entity_id, :entity_type, :id, :author_id], order: { id: :desc }, name: INDEX_NAME) - remove_concurrent_index_by_name(:audit_events, OLD_INDEX_NAME) - end - - def down - add_concurrent_index(:audit_events, [:entity_id, :entity_type, :id], order: { id: :desc }, name: OLD_INDEX_NAME) - remove_concurrent_index_by_name(:audit_events, INDEX_NAME) - end -end diff --git a/db/migrate/20200617000757_clean_up_file_store_lfs_objects.rb b/db/migrate/20200617000757_clean_up_file_store_lfs_objects.rb deleted file mode 100644 index a1a86355d02..00000000000 --- a/db/migrate/20200617000757_clean_up_file_store_lfs_objects.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class CleanUpFileStoreLfsObjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - # rubocop:disable Migration/UpdateColumnInBatches - update_column_in_batches(:lfs_objects, :file_store, 1) do |table, query| - query.where(table[:file_store].eq(nil)) - end - # rubocop:enable Migration/UpdateColumnInBatches - end - - def down - # no-op - end -end diff --git a/db/migrate/20200617001001_clean_up_store_uploads.rb b/db/migrate/20200617001001_clean_up_store_uploads.rb deleted file mode 100644 index 970d0485b0d..00000000000 --- a/db/migrate/20200617001001_clean_up_store_uploads.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class CleanUpStoreUploads < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - # rubocop:disable Migration/UpdateColumnInBatches - update_column_in_batches(:uploads, :store, 1) do |table, query| - query.where(table[:store].eq(nil)) - end - # rubocop:enable Migration/UpdateColumnInBatches - end - - def down - # no-op - end -end diff --git a/db/migrate/20200617001118_clean_up_file_store_ci_job_artifacts.rb b/db/migrate/20200617001118_clean_up_file_store_ci_job_artifacts.rb deleted file mode 100644 index e30f7e342e5..00000000000 --- a/db/migrate/20200617001118_clean_up_file_store_ci_job_artifacts.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class CleanUpFileStoreCiJobArtifacts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - # rubocop:disable Migration/UpdateColumnInBatches - # rubocop:disable Migration/UpdateLargeTable - update_column_in_batches(:ci_job_artifacts, :file_store, 1) do |table, query| - query.where(table[:file_store].eq(nil)) - end - # rubocop:enable Migration/UpdateColumnInBatches - # rubocop:enable Migration/UpdateLargeTable - end - - def down - # no-op - end -end diff --git a/db/migrate/20200617150041_create_namespace_limits.rb b/db/migrate/20200617150041_create_namespace_limits.rb deleted file mode 100644 index 59a014ff7ca..00000000000 --- a/db/migrate/20200617150041_create_namespace_limits.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class CreateNamespaceLimits < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :namespace_limits, id: false do |t| - t.bigint :additional_purchased_storage_size, default: 0, null: false - t.date :additional_purchased_storage_ends_on, null: true - - t.references :namespace, primary_key: true, default: nil, type: :integer, index: false, foreign_key: { on_delete: :cascade } - end - end - end - - def down - drop_table :namespace_limits - end -end diff --git a/db/migrate/20200617205000_add_deploy_key_id_to_push_access_levels.rb b/db/migrate/20200617205000_add_deploy_key_id_to_push_access_levels.rb deleted file mode 100644 index 11b92c2a321..00000000000 --- a/db/migrate/20200617205000_add_deploy_key_id_to_push_access_levels.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddDeployKeyIdToPushAccessLevels < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless column_exists?(:protected_branch_push_access_levels, :deploy_key_id) - add_column :protected_branch_push_access_levels, :deploy_key_id, :integer - end - - add_concurrent_foreign_key :protected_branch_push_access_levels, :keys, column: :deploy_key_id, on_delete: :cascade - add_concurrent_index :protected_branch_push_access_levels, :deploy_key_id, name: 'index_deploy_key_id_on_protected_branch_push_access_levels' - end - - def down - remove_column :protected_branch_push_access_levels, :deploy_key_id - end -end diff --git a/db/migrate/20200618105638_add_index_on_id_and_created_at_to_snippets.rb b/db/migrate/20200618105638_add_index_on_id_and_created_at_to_snippets.rb deleted file mode 100644 index d9ef3b18e9b..00000000000 --- a/db/migrate/20200618105638_add_index_on_id_and_created_at_to_snippets.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnIdAndCreatedAtToSnippets < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :snippets, [:id, :created_at] - end - - def down - remove_concurrent_index :snippets, [:id, :created_at] - end -end diff --git a/db/migrate/20200618134223_restore_previous_schema_without_lock_version_null_constraint.rb b/db/migrate/20200618134223_restore_previous_schema_without_lock_version_null_constraint.rb deleted file mode 100644 index 85e98d05d02..00000000000 --- a/db/migrate/20200618134223_restore_previous_schema_without_lock_version_null_constraint.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class RestorePreviousSchemaWithoutLockVersionNullConstraint < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - TABLES = %i(epics merge_requests issues ci_stages ci_builds ci_pipelines).freeze - - disable_ddl_transaction! - - def up - TABLES.each do |table| - remove_not_null_constraint table, :lock_version - end - end - - def down - # no-op - end -end diff --git a/db/migrate/20200618134723_restore_previous_schema_with_lock_version_indices.rb b/db/migrate/20200618134723_restore_previous_schema_with_lock_version_indices.rb deleted file mode 100644 index 64fdb373387..00000000000 --- a/db/migrate/20200618134723_restore_previous_schema_with_lock_version_indices.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class RestorePreviousSchemaWithLockVersionIndices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :issues, :lock_version, where: "lock_version IS NULL" - add_concurrent_index :merge_requests, :lock_version, where: "lock_version IS NULL" - add_concurrent_index :epics, :lock_version, where: "lock_version IS NULL" - add_concurrent_index :ci_stages, :id, where: "lock_version IS NULL", name: "tmp_index_ci_stages_lock_version" - add_concurrent_index :ci_builds, :id, where: "lock_version IS NULL", name: "tmp_index_ci_builds_lock_version" - add_concurrent_index :ci_pipelines, :id, where: "lock_version IS NULL", name: "tmp_index_ci_pipelines_lock_version" - end - - def down - # no-op - end -end diff --git a/db/migrate/20200619000316_add_has_confluence_to_project_settings.rb b/db/migrate/20200619000316_add_has_confluence_to_project_settings.rb deleted file mode 100644 index 0f33e0bc47a..00000000000 --- a/db/migrate/20200619000316_add_has_confluence_to_project_settings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddHasConfluenceToProjectSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :project_settings, :has_confluence, :boolean, default: false, null: false - end - end - - def down - with_lock_retries do - remove_column :project_settings, :has_confluence - end - end -end diff --git a/db/migrate/20200619154527_add_project_key_to_jira_tracker_data.rb b/db/migrate/20200619154527_add_project_key_to_jira_tracker_data.rb deleted file mode 100644 index 574eb99a6cc..00000000000 --- a/db/migrate/20200619154527_add_project_key_to_jira_tracker_data.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddProjectKeyToJiraTrackerData < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20200619154528_add_text_limit_to_jira_tracker_data_project_key - def change - add_column :jira_tracker_data, :project_key, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20200619154528_add_text_limit_to_jira_tracker_data_project_key.rb b/db/migrate/20200619154528_add_text_limit_to_jira_tracker_data_project_key.rb deleted file mode 100644 index 6cf8a787381..00000000000 --- a/db/migrate/20200619154528_add_text_limit_to_jira_tracker_data_project_key.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToJiraTrackerDataProjectKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :jira_tracker_data, :project_key, 255 - end - - def down - remove_text_limit :jira_tracker_data, :project_key - end -end diff --git a/db/migrate/20200622040750_add_prometheus_alert_id_to_alert_management_alerts.rb b/db/migrate/20200622040750_add_prometheus_alert_id_to_alert_management_alerts.rb deleted file mode 100644 index e7669db0a28..00000000000 --- a/db/migrate/20200622040750_add_prometheus_alert_id_to_alert_management_alerts.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddPrometheusAlertIdToAlertManagementAlerts < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column :alert_management_alerts, :prometheus_alert_id, :integer - - add_column :alert_management_alerts, :environment_id, :integer - end - - def down - remove_column :alert_management_alerts, :prometheus_alert_id - remove_column :alert_management_alerts, :environment_id - end -end diff --git a/db/migrate/20200622070606_add_vendor_to_vulnerability_scanners.rb b/db/migrate/20200622070606_add_vendor_to_vulnerability_scanners.rb deleted file mode 100644 index 2c9c0a9110d..00000000000 --- a/db/migrate/20200622070606_add_vendor_to_vulnerability_scanners.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddVendorToVulnerabilityScanners < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - DEFAULT_SCANNER_VENDOR = 'GitLab' - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20200622070620_add_limit_to_vulnerability_scanners_vendor - def up - with_lock_retries do - add_column :vulnerability_scanners, :vendor, :text, default: DEFAULT_SCANNER_VENDOR, null: false - end - end - - def down - with_lock_retries do - remove_column :vulnerability_scanners, :vendor - end - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20200622070620_add_limit_to_vulnerability_scanners_vendor.rb b/db/migrate/20200622070620_add_limit_to_vulnerability_scanners_vendor.rb deleted file mode 100644 index efcbbde3e29..00000000000 --- a/db/migrate/20200622070620_add_limit_to_vulnerability_scanners_vendor.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddLimitToVulnerabilityScannersVendor < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :vulnerability_scanners, :vendor, 255, validate: false - end - - def down - remove_text_limit :vulnerability_scanners, :vendor - end -end diff --git a/db/migrate/20200622095419_add_snippets_size_to_project_statistics.rb b/db/migrate/20200622095419_add_snippets_size_to_project_statistics.rb deleted file mode 100644 index 9fe470478b8..00000000000 --- a/db/migrate/20200622095419_add_snippets_size_to_project_statistics.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddSnippetsSizeToProjectStatistics < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :project_statistics, :snippets_size, :bigint - end -end diff --git a/db/migrate/20200622103836_create_snippet_statistics.rb b/db/migrate/20200622103836_create_snippet_statistics.rb deleted file mode 100644 index 691a9acdc04..00000000000 --- a/db/migrate/20200622103836_create_snippet_statistics.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class CreateSnippetStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :snippet_statistics, id: false do |t| - t.references :snippet, primary_key: true, default: nil, index: false, foreign_key: { on_delete: :cascade } - t.bigint :repository_size, default: 0, null: false - t.bigint :file_count, default: 0, null: false - t.bigint :commit_count, default: 0, null: false - end - end - end - - def down - with_lock_retries do - drop_table :snippet_statistics - end - end -end diff --git a/db/migrate/20200622104923_create_ci_pipeline_messages_table.rb b/db/migrate/20200622104923_create_ci_pipeline_messages_table.rb deleted file mode 100644 index 40d63b1189e..00000000000 --- a/db/migrate/20200622104923_create_ci_pipeline_messages_table.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class CreateCiPipelineMessagesTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - ERROR_SEVERITY = 0 - MAX_CONTENT_LENGTH = 10_000 - - disable_ddl_transaction! - - def up - with_lock_retries do - create_table :ci_pipeline_messages do |t| - t.integer :severity, null: false, default: ERROR_SEVERITY, limit: 2 - t.references :pipeline, index: true, null: false, foreign_key: { to_table: :ci_pipelines, on_delete: :cascade }, type: :integer - t.text :content, null: false - end - end - - add_text_limit :ci_pipeline_messages, :content, MAX_CONTENT_LENGTH - end - - def down - drop_table :ci_pipeline_messages - end -end diff --git a/db/migrate/20200622235737_remove_index_ci_job_artifacts_file_store_is_null.rb b/db/migrate/20200622235737_remove_index_ci_job_artifacts_file_store_is_null.rb deleted file mode 100644 index e293bcfa1ce..00000000000 --- a/db/migrate/20200622235737_remove_index_ci_job_artifacts_file_store_is_null.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexCiJobArtifactsFileStoreIsNull < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_ci_job_artifacts_file_store_is_null' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name(:ci_job_artifacts, INDEX_NAME) - end - - def down - add_concurrent_index(:ci_job_artifacts, :id, where: "file_store IS NULL", name: INDEX_NAME) - end -end diff --git a/db/migrate/20200623000148_remove_index_lfs_objects_file_store_is_null.rb b/db/migrate/20200623000148_remove_index_lfs_objects_file_store_is_null.rb deleted file mode 100644 index 76faa5c4cd2..00000000000 --- a/db/migrate/20200623000148_remove_index_lfs_objects_file_store_is_null.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexLfsObjectsFileStoreIsNull < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_lfs_objects_file_store_is_null' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name(:lfs_objects, INDEX_NAME) - end - - def down - add_concurrent_index(:lfs_objects, :id, where: "file_store IS NULL", name: INDEX_NAME) - end -end diff --git a/db/migrate/20200623000320_remove_index_uploads_store_is_null.rb b/db/migrate/20200623000320_remove_index_uploads_store_is_null.rb deleted file mode 100644 index ad84cd5a649..00000000000 --- a/db/migrate/20200623000320_remove_index_uploads_store_is_null.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexUploadsStoreIsNull < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_uploads_store_is_null' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name(:uploads, INDEX_NAME) - end - - def down - add_concurrent_index(:uploads, :id, where: "store IS NULL", name: INDEX_NAME) - end -end diff --git a/db/migrate/20200623073431_add_source_merge_request_id_to_resource_state_events.rb b/db/migrate/20200623073431_add_source_merge_request_id_to_resource_state_events.rb deleted file mode 100644 index 01d0d8ce1d4..00000000000 --- a/db/migrate/20200623073431_add_source_merge_request_id_to_resource_state_events.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class AddSourceMergeRequestIdToResourceStateEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - INDEX_NAME = 'index_resource_state_events_on_source_merge_request_id' - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless column_exists?(:resource_state_events, :source_merge_request_id) - add_column :resource_state_events, :source_merge_request_id, :bigint - end - - unless index_exists?(:resource_state_events, :source_merge_request_id, name: INDEX_NAME) - add_index :resource_state_events, :source_merge_request_id, name: INDEX_NAME # rubocop: disable Migration/AddIndex - end - - unless foreign_key_exists?(:resource_state_events, :merge_requests, column: :source_merge_request_id) - with_lock_retries do - add_foreign_key :resource_state_events, :merge_requests, column: :source_merge_request_id, on_delete: :nullify - end - end - end - - def down - with_lock_retries do - remove_column :resource_state_events, :source_merge_request_id - end - end -end diff --git a/db/migrate/20200623090030_add_author_name_to_audit_event.rb b/db/migrate/20200623090030_add_author_name_to_audit_event.rb deleted file mode 100644 index 8b45503189a..00000000000 --- a/db/migrate/20200623090030_add_author_name_to_audit_event.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddAuthorNameToAuditEvent < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - unless column_exists?(:audit_events, :author_name) - with_lock_retries do - add_column :audit_events, :author_name, :text - end - end - - add_text_limit :audit_events, :author_name, 255 - end - - def down - remove_column :audit_events, :author_name - end -end diff --git a/db/migrate/20200623121135_create_dynamic_partitions_schema.rb b/db/migrate/20200623121135_create_dynamic_partitions_schema.rb deleted file mode 100644 index 931a55ebcf4..00000000000 --- a/db/migrate/20200623121135_create_dynamic_partitions_schema.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CreateDynamicPartitionsSchema < ActiveRecord::Migration[6.0] - include Gitlab::Database::SchemaHelpers - - DOWNTIME = false - - def up - execute 'CREATE SCHEMA gitlab_partitions_dynamic' - - create_comment(:schema, :gitlab_partitions_dynamic, <<~EOS.strip) - Schema to hold partitions managed dynamically from the application, e.g. for time space partitioning. - EOS - end - - def down - execute 'DROP SCHEMA gitlab_partitions_dynamic' - end -end diff --git a/db/migrate/20200623141217_add_view_diffs_file_by_file_to_user_preferences.rb b/db/migrate/20200623141217_add_view_diffs_file_by_file_to_user_preferences.rb deleted file mode 100644 index 9ea38bd4ab4..00000000000 --- a/db/migrate/20200623141217_add_view_diffs_file_by_file_to_user_preferences.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddViewDiffsFileByFileToUserPreferences < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - add_column :user_preferences, :view_diffs_file_by_file, :boolean, default: false, null: false - end - end - - def down - with_lock_retries do - remove_column :user_preferences, :view_diffs_file_by_file, :boolean - end - end -end diff --git a/db/migrate/20200623141544_create_elastic_reindexing_task.rb b/db/migrate/20200623141544_create_elastic_reindexing_task.rb deleted file mode 100644 index 7089df4f1ea..00000000000 --- a/db/migrate/20200623141544_create_elastic_reindexing_task.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class CreateElasticReindexingTask < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :elastic_reindexing_tasks do |t| - t.timestamps_with_timezone null: false - t.integer :documents_count - t.integer :state, null: false, default: 0, limit: 2, index: true - t.boolean :in_progress, null: false, default: true - t.text :index_name_from - t.text :index_name_to - t.text :elastic_task - t.text :error_message - end - - add_text_limit :elastic_reindexing_tasks, :index_name_from, 255 - add_text_limit :elastic_reindexing_tasks, :index_name_to, 255 - add_text_limit :elastic_reindexing_tasks, :elastic_task, 255 - add_text_limit :elastic_reindexing_tasks, :error_message, 255 - - add_index :elastic_reindexing_tasks, :in_progress, unique: true, where: 'in_progress' - end - - def down - drop_table :elastic_reindexing_tasks - end -end diff --git a/db/migrate/20200623170000_create_static_partitions_schema.rb b/db/migrate/20200623170000_create_static_partitions_schema.rb deleted file mode 100644 index d8878d2fe33..00000000000 --- a/db/migrate/20200623170000_create_static_partitions_schema.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CreateStaticPartitionsSchema < ActiveRecord::Migration[6.0] - include Gitlab::Database::SchemaHelpers - - DOWNTIME = false - - def up - execute 'CREATE SCHEMA gitlab_partitions_static' - - create_comment(:schema, :gitlab_partitions_static, <<~EOS.strip) - Schema to hold static partitions, e.g. for hash partitioning - EOS - end - - def down - execute 'DROP SCHEMA gitlab_partitions_static' - end -end diff --git a/db/migrate/20200623185440_add_product_analytics_table.rb b/db/migrate/20200623185440_add_product_analytics_table.rb deleted file mode 100644 index 0a0d438bfb9..00000000000 --- a/db/migrate/20200623185440_add_product_analytics_table.rb +++ /dev/null @@ -1,202 +0,0 @@ -# frozen_string_literal: true - -class AddProductAnalyticsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - include Gitlab::Database::PartitioningMigrationHelpers::TableManagementHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - # Table is based on https://github.com/snowplow/snowplow/blob/master/4-storage/postgres-storage/sql/atomic-def.sql 6e07b1c, with the following differences: - # * app_id varchar -> project_id integer (+ FK) - # * Add `id bigserial` - # * Hash partitioning based on `project_id` - # * Timestamp columns: Change type to timestamp with time zone - # - # This table is part of the "product analytics experiment" and as such marked "experimental". The goal here is to - # explore the product analytics as a MVP feature more. We are explicitly not spending time on relational modeling - # here. - # - # We expect significant changes to the database part of this once the feature has been validated. - # Therefore, we expect to drop the table when feature validation is complete. All data will be lost. - def up - with_lock_retries do - execute <<~SQL - CREATE TABLE "product_analytics_events_experimental" ( - id bigserial NOT NULL, - -- App - "project_id" integer NOT NULL REFERENCES projects(id) ON DELETE CASCADE, - "platform" varchar(255), - -- Date/time - "etl_tstamp" timestamp with time zone, - "collector_tstamp" timestamp with time zone NOT NULL, - "dvce_created_tstamp" timestamp with time zone, - -- Date/time - "event" varchar(128), - "event_id" char(36) NOT NULL, - "txn_id" integer, - -- Versioning - "name_tracker" varchar(128), - "v_tracker" varchar(100), - "v_collector" varchar(100) NOT NULL, - "v_etl" varchar(100) NOT NULL, - -- User and visit - "user_id" varchar(255), - "user_ipaddress" varchar(45), - "user_fingerprint" varchar(50), - "domain_userid" varchar(36), - "domain_sessionidx" smallint, - "network_userid" varchar(38), - -- Location - "geo_country" char(2), - "geo_region" char(3), - "geo_city" varchar(75), - "geo_zipcode" varchar(15), - "geo_latitude" double precision, - "geo_longitude" double precision, - "geo_region_name" varchar(100), - -- IP lookups - "ip_isp" varchar(100), - "ip_organization" varchar(100), - "ip_domain" varchar(100), - "ip_netspeed" varchar(100), - -- Page - "page_url" text, - "page_title" varchar(2000), - "page_referrer" text, - -- Page URL components - "page_urlscheme" varchar(16), - "page_urlhost" varchar(255), - "page_urlport" integer, - "page_urlpath" varchar(3000), - "page_urlquery" varchar(6000), - "page_urlfragment" varchar(3000), - -- Referrer URL components - "refr_urlscheme" varchar(16), - "refr_urlhost" varchar(255), - "refr_urlport" integer, - "refr_urlpath" varchar(6000), - "refr_urlquery" varchar(6000), - "refr_urlfragment" varchar(3000), - -- Referrer details - "refr_medium" varchar(25), - "refr_source" varchar(50), - "refr_term" varchar(255), - -- Marketing - "mkt_medium" varchar(255), - "mkt_source" varchar(255), - "mkt_term" varchar(255), - "mkt_content" varchar(500), - "mkt_campaign" varchar(255), - -- Custom structured event - "se_category" varchar(1000), - "se_action" varchar(1000), - "se_label" varchar(1000), - "se_property" varchar(1000), - "se_value" double precision, - -- Ecommerce - "tr_orderid" varchar(255), - "tr_affiliation" varchar(255), - "tr_total" decimal(18,2), - "tr_tax" decimal(18,2), - "tr_shipping" decimal(18,2), - "tr_city" varchar(255), - "tr_state" varchar(255), - "tr_country" varchar(255), - "ti_orderid" varchar(255), - "ti_sku" varchar(255), - "ti_name" varchar(255), - "ti_category" varchar(255), - "ti_price" decimal(18,2), - "ti_quantity" integer, - -- Page ping - "pp_xoffset_min" integer, - "pp_xoffset_max" integer, - "pp_yoffset_min" integer, - "pp_yoffset_max" integer, - -- User Agent - "useragent" varchar(1000), - -- Browser - "br_name" varchar(50), - "br_family" varchar(50), - "br_version" varchar(50), - "br_type" varchar(50), - "br_renderengine" varchar(50), - "br_lang" varchar(255), - "br_features_pdf" boolean, - "br_features_flash" boolean, - "br_features_java" boolean, - "br_features_director" boolean, - "br_features_quicktime" boolean, - "br_features_realplayer" boolean, - "br_features_windowsmedia" boolean, - "br_features_gears" boolean, - "br_features_silverlight" boolean, - "br_cookies" boolean, - "br_colordepth" varchar(12), - "br_viewwidth" integer, - "br_viewheight" integer, - -- Operating System - "os_name" varchar(50), - "os_family" varchar(50), - "os_manufacturer" varchar(50), - "os_timezone" varchar(50), - -- Device/Hardware - "dvce_type" varchar(50), - "dvce_ismobile" boolean, - "dvce_screenwidth" integer, - "dvce_screenheight" integer, - -- Document - "doc_charset" varchar(128), - "doc_width" integer, - "doc_height" integer, - -- Currency - "tr_currency" char(3), - "tr_total_base" decimal(18, 2), - "tr_tax_base" decimal(18, 2), - "tr_shipping_base" decimal(18, 2), - "ti_currency" char(3), - "ti_price_base" decimal(18, 2), - "base_currency" char(3), - -- Geolocation - "geo_timezone" varchar(64), - -- Click ID - "mkt_clickid" varchar(128), - "mkt_network" varchar(64), - -- ETL tags - "etl_tags" varchar(500), - -- Time event was sent - "dvce_sent_tstamp" timestamp with time zone, - -- Referer - "refr_domain_userid" varchar(36), - "refr_dvce_tstamp" timestamp with time zone, - -- Session ID - "domain_sessionid" char(36), - -- Derived timestamp - "derived_tstamp" timestamp with time zone, - -- Event schema - "event_vendor" varchar(1000), - "event_name" varchar(1000), - "event_format" varchar(128), - "event_version" varchar(128), - -- Event fingerprint - "event_fingerprint" varchar(128), - -- True timestamp - "true_tstamp" timestamp with time zone, - PRIMARY KEY (id, project_id) - ) PARTITION BY HASH (project_id) - WITHOUT OIDS; - - CREATE INDEX index_product_analytics_events_experimental_project_and_time ON product_analytics_events_experimental (project_id, collector_tstamp); - SQL - - create_hash_partitions :product_analytics_events_experimental, 64 - end - end - - def down - with_lock_retries do - execute 'DROP TABLE product_analytics_events_experimental' - end - end -end diff --git a/db/migrate/20200624075411_add_storage_size_limit_to_plan_limit.rb b/db/migrate/20200624075411_add_storage_size_limit_to_plan_limit.rb deleted file mode 100644 index 7d1b081be02..00000000000 --- a/db/migrate/20200624075411_add_storage_size_limit_to_plan_limit.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddStorageSizeLimitToPlanLimit < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :plan_limits, :storage_size_limit, :integer, default: 0, null: false - end -end diff --git a/db/migrate/20200624142107_create_analytics_cycle_analytics_group_value_streams.rb b/db/migrate/20200624142107_create_analytics_cycle_analytics_group_value_streams.rb deleted file mode 100644 index 4b3f5222399..00000000000 --- a/db/migrate/20200624142107_create_analytics_cycle_analytics_group_value_streams.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class CreateAnalyticsCycleAnalyticsGroupValueStreams < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_analytics_ca_group_value_streams_on_group_id_and_name' - - disable_ddl_transaction! - - def up - unless table_exists?(:analytics_cycle_analytics_group_value_streams) - with_lock_retries do - create_table :analytics_cycle_analytics_group_value_streams do |t| - t.timestamps_with_timezone - t.references(:group, - null: false, - index: false, - foreign_key: { to_table: :namespaces, on_delete: :cascade } - ) - t.text :name, null: false - t.index [:group_id, :name], unique: true, name: INDEX_NAME - end - end - end - - add_text_limit :analytics_cycle_analytics_group_value_streams, :name, 100 - end - - def down - drop_table :analytics_cycle_analytics_group_value_streams - end -end diff --git a/db/migrate/20200624142207_add_group_value_stream_to_cycle_analytics_group_stages.rb b/db/migrate/20200624142207_add_group_value_stream_to_cycle_analytics_group_stages.rb deleted file mode 100644 index 3ce912eb440..00000000000 --- a/db/migrate/20200624142207_add_group_value_stream_to_cycle_analytics_group_stages.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddGroupValueStreamToCycleAnalyticsGroupStages < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :analytics_cycle_analytics_group_stages, :group_value_stream_id, :bigint - end - end - - def down - with_lock_retries do - remove_column :analytics_cycle_analytics_group_stages, :group_value_stream_id - end - end -end diff --git a/db/migrate/20200624222443_add_default_branch_name_to_application_settings.rb b/db/migrate/20200624222443_add_default_branch_name_to_application_settings.rb deleted file mode 100644 index 5da9006e9a0..00000000000 --- a/db/migrate/20200624222443_add_default_branch_name_to_application_settings.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultBranchNameToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in db/migrate/20200625190458_add_limit_to_default_branch_name_to_application_settings - def change - add_column :application_settings, :default_branch_name, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20200625045442_add_idx_and_fk_for_prometheus_and_environment_to_alert_management_alerts.rb b/db/migrate/20200625045442_add_idx_and_fk_for_prometheus_and_environment_to_alert_management_alerts.rb deleted file mode 100644 index f4869b15735..00000000000 --- a/db/migrate/20200625045442_add_idx_and_fk_for_prometheus_and_environment_to_alert_management_alerts.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class AddIdxAndFkForPrometheusAndEnvironmentToAlertManagementAlerts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :alert_management_alerts, :prometheus_alert_id, where: 'prometheus_alert_id is not null' - add_concurrent_foreign_key :alert_management_alerts, :prometheus_alerts, column: :prometheus_alert_id, on_delete: :cascade - - add_concurrent_index :alert_management_alerts, :environment_id, where: 'environment_id is not null' - add_concurrent_foreign_key :alert_management_alerts, :environments, column: :environment_id, on_delete: :nullify - end - - def down - remove_concurrent_index :alert_management_alerts, :prometheus_alert_id - remove_foreign_key_without_error :alert_management_alerts, column: :prometheus_alert_id - - remove_concurrent_index :alert_management_alerts, :environment_id - remove_foreign_key_without_error :alert_management_alerts, column: :environment_id - end -end diff --git a/db/migrate/20200625082258_add_snippets_size_to_root_storage_statistics.rb b/db/migrate/20200625082258_add_snippets_size_to_root_storage_statistics.rb deleted file mode 100644 index 7dd0bd94805..00000000000 --- a/db/migrate/20200625082258_add_snippets_size_to_root_storage_statistics.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddSnippetsSizeToRootStorageStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :namespace_root_storage_statistics, :snippets_size, :bigint, default: 0, null: false - end - end - - def down - with_lock_retries do - remove_column :namespace_root_storage_statistics, :snippets_size - end - end -end diff --git a/db/migrate/20200625113337_add_last_used_to_personal_access_tokens.rb b/db/migrate/20200625113337_add_last_used_to_personal_access_tokens.rb deleted file mode 100644 index c9d155eb628..00000000000 --- a/db/migrate/20200625113337_add_last_used_to_personal_access_tokens.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddLastUsedToPersonalAccessTokens < ActiveRecord::Migration[6.0] - DOWNTIME = false - - include Gitlab::Database::MigrationHelpers - - def up - with_lock_retries do - add_column :personal_access_tokens, :last_used_at, :datetime_with_timezone - end - end - - def down - with_lock_retries do - remove_column :personal_access_tokens, :last_used_at, :datetime_with_timezone - end - end -end diff --git a/db/migrate/20200625174052_add_partial_index_to_locked_pipelines.rb b/db/migrate/20200625174052_add_partial_index_to_locked_pipelines.rb deleted file mode 100644 index 85f706f5d31..00000000000 --- a/db/migrate/20200625174052_add_partial_index_to_locked_pipelines.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexToLockedPipelines < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_pipelines, [:ci_ref_id, :id], name: 'idx_ci_pipelines_artifacts_locked', where: 'locked = 1' - end - - def down - remove_concurrent_index :ci_pipelines, 'idx_ci_pipelines_artifacts_locked' - end -end diff --git a/db/migrate/20200625190458_add_limit_to_default_branch_name_to_application_settings.rb b/db/migrate/20200625190458_add_limit_to_default_branch_name_to_application_settings.rb deleted file mode 100644 index b11eb514577..00000000000 --- a/db/migrate/20200625190458_add_limit_to_default_branch_name_to_application_settings.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddLimitToDefaultBranchNameToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :default_branch_name, 255 - end - - def down - remove_text_limit :application_settings, :default_branch_name - end -end diff --git a/db/migrate/20200625193358_increase_size_on_instance_level_variable_values.rb b/db/migrate/20200625193358_increase_size_on_instance_level_variable_values.rb deleted file mode 100644 index ee665287a31..00000000000 --- a/db/migrate/20200625193358_increase_size_on_instance_level_variable_values.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class IncreaseSizeOnInstanceLevelVariableValues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - existing_constraint_name = text_limit_name(:ci_instance_variables, :encrypted_value) - new_constraint_name = check_constraint_name(:ci_instance_variables, :encrypted_value, :char_length_updated) - - add_text_limit(:ci_instance_variables, :encrypted_value, 13_579, constraint_name: new_constraint_name) - remove_check_constraint(:ci_instance_variables, existing_constraint_name) - end - - def down - # no-op - end -end diff --git a/db/migrate/20200626130220_drop_partitions_dynamic_schema_if_exists.rb b/db/migrate/20200626130220_drop_partitions_dynamic_schema_if_exists.rb deleted file mode 100644 index fa31bc8ff0e..00000000000 --- a/db/migrate/20200626130220_drop_partitions_dynamic_schema_if_exists.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class DropPartitionsDynamicSchemaIfExists < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - # This targets GitLab.com only - we deployed a migration to create this schema, but reverted the change - execute 'DROP SCHEMA IF EXISTS partitions_dynamic' - end - - def down - # no-op - end -end diff --git a/db/migrate/20200628210938_add_maintenance_mode_application_to_settings.rb b/db/migrate/20200628210938_add_maintenance_mode_application_to_settings.rb deleted file mode 100644 index 6f1959a128f..00000000000 --- a/db/migrate/20200628210938_add_maintenance_mode_application_to_settings.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class AddMaintenanceModeApplicationToSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless column_exists?(:application_settings, :maintenance_mode) - change_table :application_settings do |t| - t.boolean :maintenance_mode, default: false, null: false - t.text :maintenance_mode_message - end - end - - add_text_limit(:application_settings, :maintenance_mode_message, 255) - end - - def down - if column_exists?(:application_settings, :maintenance_mode) - remove_column :application_settings, :maintenance_mode - end - - if column_exists?(:application_settings, :maintenance_mode_message) - remove_column :application_settings, :maintenance_mode_message - end - end -end diff --git a/db/migrate/20200629134747_add_extra_index_to_label_links.rb b/db/migrate/20200629134747_add_extra_index_to_label_links.rb deleted file mode 100644 index e2066a1db42..00000000000 --- a/db/migrate/20200629134747_add_extra_index_to_label_links.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class AddExtraIndexToLabelLinks < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_COVERING_ALL_COLUMNS = 'index_on_label_links_all_columns' - INDEX_TO_REPLACE = 'index_label_links_on_label_id' - NEW_INDEX = 'index_label_links_on_label_id_and_target_type' - - disable_ddl_transaction! - - def up - add_concurrent_index :label_links, [:target_id, :label_id, :target_type], name: INDEX_COVERING_ALL_COLUMNS - - add_concurrent_index :label_links, [:label_id, :target_type], name: NEW_INDEX - remove_concurrent_index_by_name(:label_links, INDEX_TO_REPLACE) - end - - def down - remove_concurrent_index_by_name(:label_links, INDEX_COVERING_ALL_COLUMNS) - - add_concurrent_index(:label_links, :label_id, name: INDEX_TO_REPLACE) - remove_concurrent_index_by_name(:label_links, NEW_INDEX) - end -end diff --git a/db/migrate/20200629192638_add_uniq_index_on_metric_identifier_and_project_id.rb b/db/migrate/20200629192638_add_uniq_index_on_metric_identifier_and_project_id.rb deleted file mode 100644 index 3e77f80b5e8..00000000000 --- a/db/migrate/20200629192638_add_uniq_index_on_metric_identifier_and_project_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddUniqIndexOnMetricIdentifierAndProjectId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :prometheus_metrics, [:identifier, :project_id], unique: true - end - - def down - remove_concurrent_index :prometheus_metrics, [:identifier, :project_id] - end -end diff --git a/db/migrate/20200630091656_add_bio_html_to_user_details.rb b/db/migrate/20200630091656_add_bio_html_to_user_details.rb deleted file mode 100644 index 6a9df85d6a4..00000000000 --- a/db/migrate/20200630091656_add_bio_html_to_user_details.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddBioHtmlToUserDetails < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - # Note: bio_html is calculated from bio, the bio column is already constrained - add_column :user_details, :bio_html, :text # rubocop:disable Migration/AddLimitToTextColumns - add_column :user_details, :cached_markdown_version, :integer - end - end - - def down - with_lock_retries do - remove_column :user_details, :bio_html - remove_column :user_details, :cached_markdown_version - end - end -end diff --git a/db/migrate/20200630110826_add_documents_count_target_to_elastic_reindexing_tasks.rb b/db/migrate/20200630110826_add_documents_count_target_to_elastic_reindexing_tasks.rb deleted file mode 100644 index dcb4ccc857d..00000000000 --- a/db/migrate/20200630110826_add_documents_count_target_to_elastic_reindexing_tasks.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddDocumentsCountTargetToElasticReindexingTasks < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :elastic_reindexing_tasks, :documents_count_target, :integer - end -end diff --git a/db/migrate/20200701064756_add_not_valid_foreign_key_to_cycle_analytics_group_stages.rb b/db/migrate/20200701064756_add_not_valid_foreign_key_to_cycle_analytics_group_stages.rb deleted file mode 100644 index e54cecc5af8..00000000000 --- a/db/migrate/20200701064756_add_not_valid_foreign_key_to_cycle_analytics_group_stages.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddNotValidForeignKeyToCycleAnalyticsGroupStages < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_analytics_cycle_analytics_group_stages_group_value_stream_id' - INDEX_NAME = 'index_analytics_ca_group_stages_on_value_stream_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :analytics_cycle_analytics_group_stages, :group_value_stream_id, name: INDEX_NAME - add_foreign_key :analytics_cycle_analytics_group_stages, :analytics_cycle_analytics_group_value_streams, - column: :group_value_stream_id, name: CONSTRAINT_NAME, on_delete: :cascade, validate: false - end - - def down - remove_foreign_key_if_exists :analytics_cycle_analytics_group_stages, column: :group_value_stream_id, name: CONSTRAINT_NAME - remove_concurrent_index :analytics_cycle_analytics_group_stages, :group_value_stream_id - end -end diff --git a/db/migrate/20200701093859_add_import_export_limits_to_application_settings.rb b/db/migrate/20200701093859_add_import_export_limits_to_application_settings.rb deleted file mode 100644 index 6f40f439385..00000000000 --- a/db/migrate/20200701093859_add_import_export_limits_to_application_settings.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddImportExportLimitsToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :project_import_limit, :integer, default: 6, null: false - add_column :application_settings, :project_export_limit, :integer, default: 6, null: false - add_column :application_settings, :project_download_export_limit, :integer, default: 1, null: false - - add_column :application_settings, :group_import_limit, :integer, default: 6, null: false - add_column :application_settings, :group_export_limit, :integer, default: 6, null: false - add_column :application_settings, :group_download_export_limit, :integer, default: 1, null: false - end -end diff --git a/db/migrate/20200701190523_add_delayed_project_removal_to_namespaces.rb b/db/migrate/20200701190523_add_delayed_project_removal_to_namespaces.rb deleted file mode 100644 index fcc08723520..00000000000 --- a/db/migrate/20200701190523_add_delayed_project_removal_to_namespaces.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddDelayedProjectRemovalToNamespaces < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :namespaces, :delayed_project_removal, :boolean, default: false, null: false # rubocop:disable Migration/AddColumnsToWideTables - end - end - - def down - with_lock_retries do - remove_column :namespaces, :delayed_project_removal - end - end -end diff --git a/db/migrate/20200701205710_create_background_migration_jobs.rb b/db/migrate/20200701205710_create_background_migration_jobs.rb deleted file mode 100644 index 706b8bd5abe..00000000000 --- a/db/migrate/20200701205710_create_background_migration_jobs.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class CreateBackgroundMigrationJobs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:background_migration_jobs) - create_table :background_migration_jobs do |t| - t.timestamps_with_timezone - t.integer :status, null: false, limit: 2, default: 0 - t.text :class_name, null: false - t.jsonb :arguments, null: false - - t.index [:class_name, :arguments] - t.index [:class_name, :status, :id] - end - end - - add_text_limit :background_migration_jobs, :class_name, 200 - end - - def down - drop_table :background_migration_jobs - end -end diff --git a/db/migrate/20200701221303_change_default_value_of_ci_max_artifact_size_terraform_of_plan_limits_from_0_to_5.rb b/db/migrate/20200701221303_change_default_value_of_ci_max_artifact_size_terraform_of_plan_limits_from_0_to_5.rb deleted file mode 100644 index e295d2f601a..00000000000 --- a/db/migrate/20200701221303_change_default_value_of_ci_max_artifact_size_terraform_of_plan_limits_from_0_to_5.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class ChangeDefaultValueOfCiMaxArtifactSizeTerraformOfPlanLimitsFrom0To5 < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :plan_limits, :ci_max_artifact_size_terraform, 5 - execute('UPDATE plan_limits SET ci_max_artifact_size_terraform = 5 WHERE ci_max_artifact_size_terraform = 0') - end - end - - def down - with_lock_retries do - change_column_default :plan_limits, :ci_max_artifact_size_terraform, 0 - execute('UPDATE plan_limits SET ci_max_artifact_size_terraform = 0 WHERE ci_max_artifact_size_terraform = 5') - end - end -end diff --git a/db/migrate/20200702123805_change_project_id_index_to_be_unique_on_vulnerability_statistics_table.rb b/db/migrate/20200702123805_change_project_id_index_to_be_unique_on_vulnerability_statistics_table.rb deleted file mode 100644 index 7562a32a25e..00000000000 --- a/db/migrate/20200702123805_change_project_id_index_to_be_unique_on_vulnerability_statistics_table.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class ChangeProjectIdIndexToBeUniqueOnVulnerabilityStatisticsTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - INDEX_NAME = 'index_vulnerability_statistics_on_unique_project_id' - - def up - remove_index :vulnerability_statistics, :project_id # rubocop:disable Migration/RemoveIndex (table is empty) - add_index :vulnerability_statistics, :project_id, name: INDEX_NAME, unique: true # rubocop:disable Migration/AddIndex (table is empty) - end - - def down - remove_index :vulnerability_statistics, name: INDEX_NAME # rubocop:disable Migration/RemoveIndex (table is empty) - add_index :vulnerability_statistics, :project_id # rubocop:disable Migration/AddIndex (table is empty) - end -end diff --git a/db/migrate/20200702201039_change_prometheus_metrics_identifier_index.rb b/db/migrate/20200702201039_change_prometheus_metrics_identifier_index.rb deleted file mode 100644 index 248195c8c75..00000000000 --- a/db/migrate/20200702201039_change_prometheus_metrics_identifier_index.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class ChangePrometheusMetricsIdentifierIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - NEW_INDEX = :index_prometheus_metrics_on_identifier_and_null_project - OLD_INDEX = :index_prometheus_metrics_on_identifier - - disable_ddl_transaction! - - def up - add_concurrent_index :prometheus_metrics, :identifier, name: NEW_INDEX, unique: true, where: 'project_id IS NULL' - remove_concurrent_index_by_name :prometheus_metrics, OLD_INDEX - end - - def down - add_concurrent_index :prometheus_metrics, :identifier, name: OLD_INDEX, unique: true - remove_concurrent_index_by_name :prometheus_metrics, NEW_INDEX - end -end diff --git a/db/migrate/20200703035021_add_notes_to_timelogs.rb b/db/migrate/20200703035021_add_notes_to_timelogs.rb deleted file mode 100644 index d711fd0400d..00000000000 --- a/db/migrate/20200703035021_add_notes_to_timelogs.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class AddNotesToTimelogs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - add_column :timelogs, :note_id, :integer - end - add_concurrent_index :timelogs, :note_id - add_concurrent_foreign_key :timelogs, :notes, column: :note_id - end - - def down - remove_foreign_key_if_exists :timelogs, column: :note_id - remove_concurrent_index :timelogs, :note_id - with_lock_retries do - remove_column :timelogs, :note_id - end - end -end diff --git a/db/migrate/20200703121557_remove_f_keys_from_ci_daily_report_results_table.rb b/db/migrate/20200703121557_remove_f_keys_from_ci_daily_report_results_table.rb deleted file mode 100644 index 43b869b007d..00000000000 --- a/db/migrate/20200703121557_remove_f_keys_from_ci_daily_report_results_table.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RemoveFKeysFromCiDailyReportResultsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - remove_foreign_key_if_exists :ci_daily_report_results, :projects - remove_foreign_key_if_exists :ci_daily_report_results, :ci_pipelines - end - end - - def down - add_concurrent_foreign_key :ci_daily_report_results, :projects, column: :project_id, on_delete: :cascade - add_concurrent_foreign_key :ci_daily_report_results, :ci_pipelines, column: :last_pipeline_id, on_delete: :cascade - end -end diff --git a/db/migrate/20200703124823_create_namespace_settings.rb b/db/migrate/20200703124823_create_namespace_settings.rb deleted file mode 100644 index 907b9d2ca8c..00000000000 --- a/db/migrate/20200703124823_create_namespace_settings.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class CreateNamespaceSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - create_table :namespace_settings, id: false do |t| - t.timestamps_with_timezone null: false - t.references :namespace, primary_key: true, default: nil, type: :integer, index: false, foreign_key: { on_delete: :cascade } - end - end - end - - def down - drop_table :namespace_settings - end -end diff --git a/db/migrate/20200703154822_add_issues_enabled_to_jira_tracker_data.rb b/db/migrate/20200703154822_add_issues_enabled_to_jira_tracker_data.rb deleted file mode 100644 index e56f6f6ee11..00000000000 --- a/db/migrate/20200703154822_add_issues_enabled_to_jira_tracker_data.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddIssuesEnabledToJiraTrackerData < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :jira_tracker_data, :issues_enabled, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20200706005325_remove_elastic_batch_project_indexer_worker_queue.rb b/db/migrate/20200706005325_remove_elastic_batch_project_indexer_worker_queue.rb deleted file mode 100644 index 07854096a8b..00000000000 --- a/db/migrate/20200706005325_remove_elastic_batch_project_indexer_worker_queue.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class RemoveElasticBatchProjectIndexerWorkerQueue < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - Sidekiq.redis do |conn| - conn.del "queue:elastic_batch_project_indexer" - end - end -end diff --git a/db/migrate/20200706035141_adjust_unique_index_alert_management_alerts.rb b/db/migrate/20200706035141_adjust_unique_index_alert_management_alerts.rb deleted file mode 100644 index 0a6e614be9a..00000000000 --- a/db/migrate/20200706035141_adjust_unique_index_alert_management_alerts.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class AdjustUniqueIndexAlertManagementAlerts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_alert_management_alerts_on_project_id_and_fingerprint' - NEW_INDEX_NAME = 'index_partial_am_alerts_on_project_id_and_fingerprint' - RESOLVED_STATUS = 2 - - disable_ddl_transaction! - - def up - add_concurrent_index(:alert_management_alerts, %w(project_id fingerprint), where: "status <> #{RESOLVED_STATUS}", name: NEW_INDEX_NAME, unique: true, using: :btree) - remove_concurrent_index_by_name :alert_management_alerts, INDEX_NAME - end - - def down - # Nullify duplicate fingerprints, except for the newest of each match (project_id, fingerprint). - query = <<-SQL - UPDATE alert_management_alerts am - SET fingerprint = NULL - WHERE am.created_at <> - (SELECT MAX(created_at) - FROM alert_management_alerts am2 - WHERE am.fingerprint = am2.fingerprint AND am.project_id = am2.project_id) - AND am.fingerprint IS NOT NULL; - SQL - - execute(query) - - remove_concurrent_index_by_name :alert_management_alerts, NEW_INDEX_NAME - add_concurrent_index(:alert_management_alerts, %w(project_id fingerprint), name: INDEX_NAME, unique: true, using: :btree) - end -end diff --git a/db/migrate/20200706170536_add_temporary_storage_increase_to_namespace_limits.rb b/db/migrate/20200706170536_add_temporary_storage_increase_to_namespace_limits.rb deleted file mode 100644 index 0b6d57831c7..00000000000 --- a/db/migrate/20200706170536_add_temporary_storage_increase_to_namespace_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddTemporaryStorageIncreaseToNamespaceLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :namespace_limits, :temporary_storage_increase_ends_on, :date, null: true - end -end diff --git a/db/migrate/20200707071941_drop_old_non_unique_index_on_mr_metrics.rb b/db/migrate/20200707071941_drop_old_non_unique_index_on_mr_metrics.rb deleted file mode 100644 index aa90a0c5915..00000000000 --- a/db/migrate/20200707071941_drop_old_non_unique_index_on_mr_metrics.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class DropOldNonUniqueIndexOnMrMetrics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_merge_request_metrics' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name(:merge_request_metrics, INDEX_NAME) - end - - def down - add_concurrent_index :merge_request_metrics, :merge_request_id, name: INDEX_NAME - end -end diff --git a/db/migrate/20200707094341_add_browser_performance_to_plan_limits.rb b/db/migrate/20200707094341_add_browser_performance_to_plan_limits.rb deleted file mode 100644 index ef0bea88ead..00000000000 --- a/db/migrate/20200707094341_add_browser_performance_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddBrowserPerformanceToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :plan_limits, "ci_max_artifact_size_browser_performance", :integer, default: 0, null: false - end -end diff --git a/db/migrate/20200707095849_add_load_performance_to_plan_limits.rb b/db/migrate/20200707095849_add_load_performance_to_plan_limits.rb deleted file mode 100644 index df95956f089..00000000000 --- a/db/migrate/20200707095849_add_load_performance_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddLoadPerformanceToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :plan_limits, "ci_max_artifact_size_load_performance", :integer, default: 0, null: false - end -end diff --git a/db/migrate/20200708080631_add_pager_duty_integration_columns_to_project_incident_management_settings.rb b/db/migrate/20200708080631_add_pager_duty_integration_columns_to_project_incident_management_settings.rb deleted file mode 100644 index ab56a863f51..00000000000 --- a/db/migrate/20200708080631_add_pager_duty_integration_columns_to_project_incident_management_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddPagerDutyIntegrationColumnsToProjectIncidentManagementSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # limit constraints added in a separate migration: - # 20200710130234_add_limit_constraints_to_project_incident_management_settings_token.rb - def change - add_column :project_incident_management_settings, :pagerduty_active, :boolean, null: false, default: false - add_column :project_incident_management_settings, :encrypted_pagerduty_token, :binary, null: true - add_column :project_incident_management_settings, :encrypted_pagerduty_token_iv, :binary, null: true - end -end diff --git a/db/migrate/20200710105332_change_issues_create_limit_default.rb b/db/migrate/20200710105332_change_issues_create_limit_default.rb deleted file mode 100644 index 9fbd5375395..00000000000 --- a/db/migrate/20200710105332_change_issues_create_limit_default.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class ChangeIssuesCreateLimitDefault < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :application_settings, :issues_create_limit, from: 300, to: 0 - end - end - - def down - with_lock_retries do - change_column_default :application_settings, :issues_create_limit, from: 0, to: 300 - end - end -end diff --git a/db/migrate/20200710113437_add_container_registry_delete_tags_service_timeout_to_application_settings.rb b/db/migrate/20200710113437_add_container_registry_delete_tags_service_timeout_to_application_settings.rb deleted file mode 100644 index d3865db2e18..00000000000 --- a/db/migrate/20200710113437_add_container_registry_delete_tags_service_timeout_to_application_settings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddContainerRegistryDeleteTagsServiceTimeoutToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column( - :application_settings, - :container_registry_delete_tags_service_timeout, - :integer, - default: 250, - null: false - ) - end - - def down - remove_column(:application_settings, :container_registry_delete_tags_service_timeout) - end -end diff --git a/db/migrate/20200710130234_add_limit_constraints_to_project_incident_management_settings_token.rb b/db/migrate/20200710130234_add_limit_constraints_to_project_incident_management_settings_token.rb deleted file mode 100644 index 8af927d0959..00000000000 --- a/db/migrate/20200710130234_add_limit_constraints_to_project_incident_management_settings_token.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddLimitConstraintsToProjectIncidentManagementSettingsToken < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_check_constraint :project_incident_management_settings, 'octet_length(encrypted_pagerduty_token) <= 255', 'pagerduty_token_length_constraint' - add_check_constraint :project_incident_management_settings, 'octet_length(encrypted_pagerduty_token_iv) <= 12', 'pagerduty_token_iv_length_constraint' - end - - def down - remove_check_constraint :project_incident_management_settings, 'pagerduty_token_length_constraint' - remove_check_constraint :project_incident_management_settings, 'pagerduty_token_iv_length_constraint' - end -end diff --git a/db/migrate/20200710152642_add_verification_state_to_terraform_states.rb b/db/migrate/20200710152642_add_verification_state_to_terraform_states.rb deleted file mode 100644 index 71c14faab0c..00000000000 --- a/db/migrate/20200710152642_add_verification_state_to_terraform_states.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddVerificationStateToTerraformStates < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_table(:terraform_states) do |t| - t.column :verification_retry_at, :datetime_with_timezone - t.column :verified_at, :datetime_with_timezone - t.integer :verification_retry_count, limit: 2 - t.binary :verification_checksum, using: 'verification_checksum::bytea' - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20200710153009_add_verification_failure_limit_and_index_to_terraform_states - t.text :verification_failure - # rubocop:enable Migration/AddLimitToTextColumns - end - end -end diff --git a/db/migrate/20200710153009_add_verification_failure_limit_and_index_to_terraform_states.rb b/db/migrate/20200710153009_add_verification_failure_limit_and_index_to_terraform_states.rb deleted file mode 100644 index 9d36a8faf4f..00000000000 --- a/db/migrate/20200710153009_add_verification_failure_limit_and_index_to_terraform_states.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddVerificationFailureLimitAndIndexToTerraformStates < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :terraform_states, :verification_failure, where: "(verification_failure IS NOT NULL)", name: "terraform_states_verification_failure_partial" - add_concurrent_index :terraform_states, :verification_checksum, where: "(verification_checksum IS NOT NULL)", name: "terraform_states_verification_checksum_partial" - add_text_limit :terraform_states, :verification_failure, 255 - end - - def down - remove_concurrent_index :terraform_states, :verification_failure - remove_concurrent_index :terraform_states, :verification_checksum - remove_text_limit :terraform_states, :verification_failure - end -end diff --git a/db/migrate/20200712084655_create_dast_sites.rb b/db/migrate/20200712084655_create_dast_sites.rb deleted file mode 100644 index fc8d423ffb2..00000000000 --- a/db/migrate/20200712084655_create_dast_sites.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class CreateDastSites < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - create_table :dast_sites do |t| - t.references :project, foreign_key: { on_delete: :cascade }, null: false, index: false - t.timestamps_with_timezone null: false - - t.text :url, null: false - end - end - - add_concurrent_index :dast_sites, [:project_id, :url], unique: true - add_text_limit :dast_sites, :url, 255 - end - - def down - drop_table :dast_sites - end -end diff --git a/db/migrate/20200712235622_create_dast_site_profiles.rb b/db/migrate/20200712235622_create_dast_site_profiles.rb deleted file mode 100644 index 593cccd450a..00000000000 --- a/db/migrate/20200712235622_create_dast_site_profiles.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class CreateDastSiteProfiles < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - create_table :dast_site_profiles do |t| - t.references :project, foreign_key: { on_delete: :cascade }, null: false, index: false - t.references :dast_site, foreign_key: { on_delete: :cascade }, null: false - t.timestamps_with_timezone null: false - - t.text :name, null: false - end - end - - add_concurrent_index :dast_site_profiles, [:project_id, :name], unique: true - add_text_limit :dast_site_profiles, :name, 255 - end - - def down - drop_table :dast_site_profiles - end -end diff --git a/db/migrate/20200713141854_add_wiki_page_max_content_bytes_to_application_settings.rb b/db/migrate/20200713141854_add_wiki_page_max_content_bytes_to_application_settings.rb deleted file mode 100644 index c0763d9816c..00000000000 --- a/db/migrate/20200713141854_add_wiki_page_max_content_bytes_to_application_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddWikiPageMaxContentBytesToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :wiki_page_max_content_bytes, :bigint, default: 50.megabytes, null: false - end -end diff --git a/db/migrate/20200713152443_add_background_migration_job_index_for_partitioning_migrations.rb b/db/migrate/20200713152443_add_background_migration_job_index_for_partitioning_migrations.rb deleted file mode 100644 index 5ca9b6536ee..00000000000 --- a/db/migrate/20200713152443_add_background_migration_job_index_for_partitioning_migrations.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddBackgroundMigrationJobIndexForPartitioningMigrations < ActiveRecord::Migration[6.0] - DOWNTIME = false - - INDEX_NAME = 'index_background_migration_jobs_for_partitioning_migrations' - - def up - # rubocop:disable Migration/AddIndex - add_index :background_migration_jobs, '((arguments ->> 2))', name: INDEX_NAME, - where: "class_name = 'Gitlab::Database::PartitioningMigrationHelpers::BackfillPartitionedTable'" - # rubocop:enable Migration/AddIndex - end - - def down - remove_index :background_migration_jobs, name: INDEX_NAME # rubocop:disable Migration/RemoveIndex - end -end diff --git a/db/migrate/20200715124210_add_target_details_to_audit_event.rb b/db/migrate/20200715124210_add_target_details_to_audit_event.rb deleted file mode 100644 index 65efe24a1e8..00000000000 --- a/db/migrate/20200715124210_add_target_details_to_audit_event.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddTargetDetailsToAuditEvent < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - # rubocop:disable Migration/AddLimitToTextColumns - add_column(:audit_events, :target_details, :text) - # rubocop:enable Migration/AddLimitToTextColumns - end - end - - def down - with_lock_retries do - remove_column(:audit_events, :target_details) - end - end -end diff --git a/db/migrate/20200715135130_create_vulnerability_historical_statistics.rb b/db/migrate/20200715135130_create_vulnerability_historical_statistics.rb deleted file mode 100644 index 6afa123c341..00000000000 --- a/db/migrate/20200715135130_create_vulnerability_historical_statistics.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -class CreateVulnerabilityHistoricalStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - INDEX_NAME = 'index_vuln_historical_statistics_on_project_id_and_date' - - DOWNTIME = false - - def up - with_lock_retries do - create_table :vulnerability_historical_statistics do |t| - t.timestamps_with_timezone null: false - t.references :project, null: false, index: false, foreign_key: { on_delete: :cascade } - t.integer :total, default: 0, null: false - t.integer :critical, default: 0, null: false - t.integer :high, default: 0, null: false - t.integer :medium, default: 0, null: false - t.integer :low, default: 0, null: false - t.integer :unknown, default: 0, null: false - t.integer :info, default: 0, null: false - t.date :date, null: false - t.integer :letter_grade, limit: 1, null: false - t.index [:project_id, :date], unique: true, name: INDEX_NAME - end - end - end - - def down - with_lock_retries do - drop_table :vulnerability_historical_statistics - end - end -end diff --git a/db/migrate/20200715171155_add_deployment_type_to_tracker.rb b/db/migrate/20200715171155_add_deployment_type_to_tracker.rb deleted file mode 100644 index 649331ecb54..00000000000 --- a/db/migrate/20200715171155_add_deployment_type_to_tracker.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddDeploymentTypeToTracker < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :jira_tracker_data, :deployment_type, :smallint, default: 0, null: false - end -end diff --git a/db/migrate/20200715202659_add_index_on_package_files_file_store.rb b/db/migrate/20200715202659_add_index_on_package_files_file_store.rb deleted file mode 100644 index 92e8364d22c..00000000000 --- a/db/migrate/20200715202659_add_index_on_package_files_file_store.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnPackageFilesFileStore < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :packages_package_files, :file_store - end - - def down - remove_concurrent_index :packages_package_files, :file_store - end -end diff --git a/db/migrate/20200716044023_add_entity_path_to_audit_events.rb b/db/migrate/20200716044023_add_entity_path_to_audit_events.rb deleted file mode 100644 index d16bfaa0beb..00000000000 --- a/db/migrate/20200716044023_add_entity_path_to_audit_events.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddEntityPathToAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - # rubocop:disable Migration/AddLimitToTextColumns - add_column(:audit_events, :entity_path, :text) - # rubocop:enable Migration/AddLimitToTextColumns - end - end - - def down - with_lock_retries do - remove_column(:audit_events, :entity_path) - end - end -end diff --git a/db/migrate/20200716120000_partition_audit_events.rb b/db/migrate/20200716120000_partition_audit_events.rb deleted file mode 100644 index aef090339ea..00000000000 --- a/db/migrate/20200716120000_partition_audit_events.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class PartitionAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - include Gitlab::Database::PartitioningMigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - disable_ddl_transaction! - - def up - partition_table_by_date :audit_events, :created_at - end - - def down - drop_partitioned_table_for :audit_events - end -end diff --git a/db/migrate/20200716120419_add_text_limit_on_entity_path_to_audit_events.rb b/db/migrate/20200716120419_add_text_limit_on_entity_path_to_audit_events.rb deleted file mode 100644 index 0dea811f41c..00000000000 --- a/db/migrate/20200716120419_add_text_limit_on_entity_path_to_audit_events.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitOnEntityPathToAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :audit_events, :entity_path, 5_500 - end - - def down - remove_text_limit :audit_events, :entity_path - end -end diff --git a/db/migrate/20200716145156_add_text_limit_to_audit_event_target_details.rb b/db/migrate/20200716145156_add_text_limit_to_audit_event_target_details.rb deleted file mode 100644 index 43ee98b69e0..00000000000 --- a/db/migrate/20200716145156_add_text_limit_to_audit_event_target_details.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToAuditEventTargetDetails < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :audit_events, :target_details, 5_500 - end - - def down - remove_text_limit :audit_events, :target_details - end -end diff --git a/db/migrate/20200717040735_change_aws_roles_role_arn_null.rb b/db/migrate/20200717040735_change_aws_roles_role_arn_null.rb deleted file mode 100644 index 707cfe96a7c..00000000000 --- a/db/migrate/20200717040735_change_aws_roles_role_arn_null.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class ChangeAwsRolesRoleArnNull < ActiveRecord::Migration[6.0] - DOWNTIME = false - EXAMPLE_ARN = 'arn:aws:iam::000000000000:role/example-role' - - def up - change_column_null :aws_roles, :role_arn, true - end - - def down - # Records may now exist with nulls, so we must fill them with a dummy value - change_column_null :aws_roles, :role_arn, false, EXAMPLE_ARN - end -end diff --git a/db/migrate/20200717080257_add_prevent_forking_to_namespace_settings.rb b/db/migrate/20200717080257_add_prevent_forking_to_namespace_settings.rb deleted file mode 100644 index b46daac6a98..00000000000 --- a/db/migrate/20200717080257_add_prevent_forking_to_namespace_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPreventForkingToNamespaceSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :namespace_settings, :prevent_forking_outside_group, :boolean, null: false, default: false - end -end diff --git a/db/migrate/20200717163656_add_moved_project_to_notification_settings.rb b/db/migrate/20200717163656_add_moved_project_to_notification_settings.rb deleted file mode 100644 index 9c60a678c1f..00000000000 --- a/db/migrate/20200717163656_add_moved_project_to_notification_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddMovedProjectToNotificationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :notification_settings, :moved_project, :boolean, default: true, null: false - end -end diff --git a/db/migrate/20200718040100_add_index_on_merge_request_diffs_external_diff_store.rb b/db/migrate/20200718040100_add_index_on_merge_request_diffs_external_diff_store.rb deleted file mode 100644 index 372a9df82a1..00000000000 --- a/db/migrate/20200718040100_add_index_on_merge_request_diffs_external_diff_store.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnMergeRequestDiffsExternalDiffStore < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_request_diffs, :external_diff_store - end - - def down - remove_concurrent_index :merge_request_diffs, :external_diff_store - end -end diff --git a/db/migrate/20200718040200_add_index_on_terraform_states_file_store.rb b/db/migrate/20200718040200_add_index_on_terraform_states_file_store.rb deleted file mode 100644 index 7dddcf1fcea..00000000000 --- a/db/migrate/20200718040200_add_index_on_terraform_states_file_store.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnTerraformStatesFileStore < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :terraform_states, :file_store - end - - def down - remove_concurrent_index :terraform_states, :file_store - end -end diff --git a/db/migrate/20200718040300_add_index_on_vulnerability_exports_file_store.rb b/db/migrate/20200718040300_add_index_on_vulnerability_exports_file_store.rb deleted file mode 100644 index c0d546ae112..00000000000 --- a/db/migrate/20200718040300_add_index_on_vulnerability_exports_file_store.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnVulnerabilityExportsFileStore < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerability_exports, :file_store - end - - def down - remove_concurrent_index :vulnerability_exports, :file_store - end -end diff --git a/db/migrate/20200720053909_add_elasticsearch_indexed_file_size_limit_kb_to_application_settings.rb b/db/migrate/20200720053909_add_elasticsearch_indexed_file_size_limit_kb_to_application_settings.rb deleted file mode 100644 index bab5fe827d0..00000000000 --- a/db/migrate/20200720053909_add_elasticsearch_indexed_file_size_limit_kb_to_application_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddElasticsearchIndexedFileSizeLimitKbToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, - :elasticsearch_indexed_file_size_limit_kb, - :integer, - null: false, - default: 1024 # 1 MiB (units in KiB) - end -end diff --git a/db/migrate/20200720154007_create_vulnerabilities_export_verification_status.rb b/db/migrate/20200720154007_create_vulnerabilities_export_verification_status.rb deleted file mode 100644 index 5cbb5fdd1e5..00000000000 --- a/db/migrate/20200720154007_create_vulnerabilities_export_verification_status.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -class CreateVulnerabilitiesExportVerificationStatus < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:vulnerability_export_verification_status) - with_lock_retries do - create_table :vulnerability_export_verification_status, id: false do |t| - t.references :vulnerability_export, - primary_key: true, - null: false, - foreign_key: { on_delete: :cascade }, - index: - { name: 'index_vulnerability_export_verification_status_on_export_id' } - t.datetime_with_timezone :verification_retry_at - t.datetime_with_timezone :verified_at - t.integer :verification_retry_count, limit: 2 - t.binary :verification_checksum, using: 'verification_checksum::bytea' - t.text :verification_failure - - t.index :verification_failure, where: "(verification_failure IS NOT NULL)", name: "vulnerability_exports_verification_failure_partial" - t.index :verification_checksum, where: "(verification_checksum IS NOT NULL)", name: "vulnerability_exports_verification_checksum_partial" - end - end - end - - add_text_limit :vulnerability_export_verification_status, :verification_failure, 255 - end - - def down - return unless table_exists?(:vulnerability_export_verification_status) - - with_lock_retries do - drop_table :vulnerability_export_verification_status - end - end -end diff --git a/db/migrate/20200720154123_add_external_to_custom_emoji.rb b/db/migrate/20200720154123_add_external_to_custom_emoji.rb deleted file mode 100644 index 2a97235eec4..00000000000 --- a/db/migrate/20200720154123_add_external_to_custom_emoji.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddExternalToCustomEmoji < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :custom_emoji, :external, :boolean, default: true, null: false - end -end diff --git a/db/migrate/20200720191134_add_blocking_issues_count_to_issues.rb b/db/migrate/20200720191134_add_blocking_issues_count_to_issues.rb deleted file mode 100644 index dbb43541ad6..00000000000 --- a/db/migrate/20200720191134_add_blocking_issues_count_to_issues.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class AddBlockingIssuesCountToIssues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_issue_on_project_id_state_id_and_blocking_issues_count' - - disable_ddl_transaction! - - def up - unless column_exists?(:issues, :blocking_issues_count) - with_lock_retries do - add_column :issues, :blocking_issues_count, :integer, default: 0, null: false - end - end - - add_concurrent_index :issues, [:project_id, :state_id, :blocking_issues_count], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :issues, INDEX_NAME - - with_lock_retries do - remove_column :issues, :blocking_issues_count - end - end -end diff --git a/db/migrate/20200721034536_add_issue_type_to_issues.rb b/db/migrate/20200721034536_add_issue_type_to_issues.rb deleted file mode 100644 index 96ae8c421da..00000000000 --- a/db/migrate/20200721034536_add_issue_type_to_issues.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddIssueTypeToIssues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - # Set default to issue type - add_column :issues, :issue_type, :integer, limit: 2, default: 0, null: false - end - end - - def down - with_lock_retries do - remove_column :issues, :issue_type - end - end -end diff --git a/db/migrate/20200721043502_add_issue_type_index_to_issues.rb b/db/migrate/20200721043502_add_issue_type_index_to_issues.rb deleted file mode 100644 index 2faad98d032..00000000000 --- a/db/migrate/20200721043502_add_issue_type_index_to_issues.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIssueTypeIndexToIssues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - INCIDENT_TYPE = 1 - INDEX_NAME = 'index_issues_on_incident_issue_type' - - def up - add_concurrent_index :issues, - :issue_type, where: "issue_type = #{INCIDENT_TYPE}", - name: INDEX_NAME - end - - def down - remove_concurrent_index :issues, :issue_type - end -end diff --git a/db/migrate/20200721052853_create_dast_scanner_profile.rb b/db/migrate/20200721052853_create_dast_scanner_profile.rb deleted file mode 100644 index 0dc0012d837..00000000000 --- a/db/migrate/20200721052853_create_dast_scanner_profile.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class CreateDastScannerProfile < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:dast_scanner_profiles) - with_lock_retries do - create_table :dast_scanner_profiles do |t| - t.timestamps_with_timezone null: false - t.references :project, null: false, index: false, foreign_key: { on_delete: :cascade }, type: :integer - t.integer :spider_timeout, limit: 2 - t.integer :target_timeout, limit: 2 - t.text :name, null: false - t.index [:project_id, :name], unique: true - end - end - end - - add_text_limit(:dast_scanner_profiles, :name, 255) - end - - def down - with_lock_retries do - drop_table :dast_scanner_profiles - end - end -end diff --git a/db/migrate/20200721230558_add_index_to_projects_aimed_for_deletion.rb b/db/migrate/20200721230558_add_index_to_projects_aimed_for_deletion.rb deleted file mode 100644 index 44dfe2ff3e1..00000000000 --- a/db/migrate/20200721230558_add_index_to_projects_aimed_for_deletion.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToProjectsAimedForDeletion < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - PROJECTS_AIMED_FOR_DELETION_INDEX_NAME = "index_projects_aimed_for_deletion" - MARKED_FOR_DELETION_PROJECTS_INDEX_NAME = "index_projects_on_marked_for_deletion_at" - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, - :marked_for_deletion_at, - where: "marked_for_deletion_at IS NOT NULL AND pending_delete = false", - name: PROJECTS_AIMED_FOR_DELETION_INDEX_NAME - - remove_concurrent_index_by_name :projects, MARKED_FOR_DELETION_PROJECTS_INDEX_NAME - end - - def down - remove_concurrent_index_by_name :projects, PROJECTS_AIMED_FOR_DELETION_INDEX_NAME - - add_concurrent_index :projects, :marked_for_deletion_at, where: 'marked_for_deletion_at IS NOT NULL' - end -end diff --git a/db/migrate/20200722075411_add_ci_needs_size_limit_to_plan_limit.rb b/db/migrate/20200722075411_add_ci_needs_size_limit_to_plan_limit.rb deleted file mode 100644 index b615a09a61b..00000000000 --- a/db/migrate/20200722075411_add_ci_needs_size_limit_to_plan_limit.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddCiNeedsSizeLimitToPlanLimit < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :plan_limits, :ci_needs_size_limit, :integer, default: 50, null: false - end -end diff --git a/db/migrate/20200722084623_add_default_membership_role_to_saml_provider.rb b/db/migrate/20200722084623_add_default_membership_role_to_saml_provider.rb deleted file mode 100644 index bd82aab1aae..00000000000 --- a/db/migrate/20200722084623_add_default_membership_role_to_saml_provider.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultMembershipRoleToSamlProvider < ActiveRecord::Migration[6.0] - DOWNTIME = false - - GUEST_USER_ROLE = 10 - - def change - add_column :saml_providers, :default_membership_role, :smallint, default: GUEST_USER_ROLE, null: false - end -end diff --git a/db/migrate/20200722091435_add_relative_position_to_design_management_designs.rb b/db/migrate/20200722091435_add_relative_position_to_design_management_designs.rb deleted file mode 100644 index 42b7a1d3898..00000000000 --- a/db/migrate/20200722091435_add_relative_position_to_design_management_designs.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddRelativePositionToDesignManagementDesigns < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :design_management_designs, :relative_position, :integer - end -end diff --git a/db/migrate/20200722131241_create_resource_iteration_events_table.rb b/db/migrate/20200722131241_create_resource_iteration_events_table.rb deleted file mode 100644 index 619faeaaadf..00000000000 --- a/db/migrate/20200722131241_create_resource_iteration_events_table.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class CreateResourceIterationEventsTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :resource_iteration_events do |t| - t.bigint :user_id, null: false, index: { name: 'index_resource_iteration_events_on_user_id' } - t.bigint :issue_id, null: true, index: { name: 'index_resource_iteration_events_on_issue_id' } - t.bigint :merge_request_id, null: true, index: { name: 'index_resource_iteration_events_on_merge_request_id' } - t.bigint :iteration_id, index: { name: 'index_resource_iteration_events_on_iteration_id' } - t.datetime_with_timezone :created_at, null: false - t.integer :action, limit: 2, null: false - end - end -end diff --git a/db/migrate/20200722132040_add_users_fk_to_resource_iteration_events_table.rb b/db/migrate/20200722132040_add_users_fk_to_resource_iteration_events_table.rb deleted file mode 100644 index c3d95c9dfc2..00000000000 --- a/db/migrate/20200722132040_add_users_fk_to_resource_iteration_events_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddUsersFkToResourceIterationEventsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :resource_iteration_events, :users, column: :user_id, on_delete: :nullify - end - end - - def down - with_lock_retries do - remove_foreign_key :resource_iteration_events, column: :user_id - end - end -end diff --git a/db/migrate/20200722132540_add_issues_fk_to_resource_iteration_events_table.rb b/db/migrate/20200722132540_add_issues_fk_to_resource_iteration_events_table.rb deleted file mode 100644 index b603f14f62b..00000000000 --- a/db/migrate/20200722132540_add_issues_fk_to_resource_iteration_events_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIssuesFkToResourceIterationEventsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :resource_iteration_events, :issues, column: :issue_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :resource_iteration_events, column: :issue_id - end - end -end diff --git a/db/migrate/20200722133040_add_merge_requests_fk_to_resource_iteration_events_table.rb b/db/migrate/20200722133040_add_merge_requests_fk_to_resource_iteration_events_table.rb deleted file mode 100644 index e047b157a53..00000000000 --- a/db/migrate/20200722133040_add_merge_requests_fk_to_resource_iteration_events_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddMergeRequestsFkToResourceIterationEventsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :resource_iteration_events, :merge_requests, column: :merge_request_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :resource_iteration_events, column: :merge_request_id - end - end -end diff --git a/db/migrate/20200722133540_add_iterations_fk_to_resource_iteration_events_table.rb b/db/migrate/20200722133540_add_iterations_fk_to_resource_iteration_events_table.rb deleted file mode 100644 index 1bb3ac7c8bd..00000000000 --- a/db/migrate/20200722133540_add_iterations_fk_to_resource_iteration_events_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIterationsFkToResourceIterationEventsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :resource_iteration_events, :sprints, column: :iteration_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :resource_iteration_events, column: :iteration_id - end - end -end diff --git a/db/migrate/20200723125205_add_target_project_id_to_mr_metrics.rb b/db/migrate/20200723125205_add_target_project_id_to_mr_metrics.rb deleted file mode 100644 index fb01b3fe046..00000000000 --- a/db/migrate/20200723125205_add_target_project_id_to_mr_metrics.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTargetProjectIdToMrMetrics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :merge_request_metrics, :target_project_id, :integer - end - end - - def down - with_lock_retries do - remove_column :merge_request_metrics, :target_project_id, :integer - end - end -end diff --git a/db/migrate/20200723128332_add_fk_to_metrics_target_project_id.rb b/db/migrate/20200723128332_add_fk_to_metrics_target_project_id.rb deleted file mode 100644 index 6536b20b9c1..00000000000 --- a/db/migrate/20200723128332_add_fk_to_metrics_target_project_id.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddFkToMetricsTargetProjectId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index(:merge_request_metrics, :target_project_id) - add_concurrent_foreign_key(:merge_request_metrics, :projects, column: :target_project_id, on_delete: :cascade) - end - - def down - remove_foreign_key(:merge_request_metrics, column: :target_project_id) - remove_concurrent_index(:merge_request_metrics, :target_project_id) - end -end diff --git a/db/migrate/20200724100123_add_index_on_vulnerability_historical_statistics_date.rb b/db/migrate/20200724100123_add_index_on_vulnerability_historical_statistics_date.rb deleted file mode 100644 index 696f98b40f6..00000000000 --- a/db/migrate/20200724100123_add_index_on_vulnerability_historical_statistics_date.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnVulnerabilityHistoricalStatisticsDate < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerability_historical_statistics, [:date, :id] - end - - def down - remove_concurrent_index :vulnerability_historical_statistics, [:date, :id] - end -end diff --git a/db/migrate/20200727082309_remove_index_chat_name_service_id.rb b/db/migrate/20200727082309_remove_index_chat_name_service_id.rb deleted file mode 100644 index 49cda2dd41f..00000000000 --- a/db/migrate/20200727082309_remove_index_chat_name_service_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexChatNameServiceId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index :chat_names, :service_id - end - - def down - add_concurrent_index :chat_names, :service_id - end -end diff --git a/db/migrate/20200727142337_update_defaults_for_sca_artifacts.rb b/db/migrate/20200727142337_update_defaults_for_sca_artifacts.rb deleted file mode 100644 index d745943a7d3..00000000000 --- a/db/migrate/20200727142337_update_defaults_for_sca_artifacts.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class UpdateDefaultsForScaArtifacts < ActiveRecord::Migration[6.0] - DOWNTIME = false - - DEPENDENCY_SCANNING_LIMIT_MB = 350 - CONTAINER_SCANNING_LIMIT_MB = 150 - LICENSE_SCANNING_LIMIT_MB = 100 - - def up - change_column_default :plan_limits, :ci_max_artifact_size_dependency_scanning, DEPENDENCY_SCANNING_LIMIT_MB - change_column_default :plan_limits, :ci_max_artifact_size_container_scanning, CONTAINER_SCANNING_LIMIT_MB - change_column_default :plan_limits, :ci_max_artifact_size_license_scanning, LICENSE_SCANNING_LIMIT_MB - end - - def down - change_column_default :plan_limits, :ci_max_artifact_size_dependency_scanning, 0 - change_column_default :plan_limits, :ci_max_artifact_size_container_scanning, 0 - change_column_default :plan_limits, :ci_max_artifact_size_license_scanning, 0 - end -end diff --git a/db/migrate/20200728080250_replace_unique_index_on_cycle_analytics_stages.rb b/db/migrate/20200728080250_replace_unique_index_on_cycle_analytics_stages.rb deleted file mode 100644 index 0e562ae27e2..00000000000 --- a/db/migrate/20200728080250_replace_unique_index_on_cycle_analytics_stages.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -class ReplaceUniqueIndexOnCycleAnalyticsStages < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - OLD_INDEX_NAME = 'index_analytics_ca_group_stages_on_group_id_and_name' - NEW_INDEX_NAME = 'index_group_stages_on_group_id_group_value_stream_id_and_name' - - disable_ddl_transaction! - - def up - add_concurrent_index(:analytics_cycle_analytics_group_stages, - [:group_id, :group_value_stream_id, :name], - unique: true, - name: NEW_INDEX_NAME) - - remove_concurrent_index_by_name :analytics_cycle_analytics_group_stages, OLD_INDEX_NAME - end - - def down - # Removing duplicated records (group_id, name) that would prevent re-creating the old index. - execute <<-SQL - DELETE FROM analytics_cycle_analytics_group_stages - USING ( - SELECT group_id, name, MIN(id) as min_id - FROM analytics_cycle_analytics_group_stages - GROUP BY group_id, name - HAVING COUNT(id) > 1 - ) as analytics_cycle_analytics_group_stages_name_duplicates - WHERE analytics_cycle_analytics_group_stages_name_duplicates.group_id = analytics_cycle_analytics_group_stages.group_id - AND analytics_cycle_analytics_group_stages_name_duplicates.name = analytics_cycle_analytics_group_stages.name - AND analytics_cycle_analytics_group_stages_name_duplicates.min_id <> analytics_cycle_analytics_group_stages.id - SQL - - add_concurrent_index(:analytics_cycle_analytics_group_stages, - [:group_id, :name], - unique: true, - name: OLD_INDEX_NAME) - - remove_concurrent_index_by_name :analytics_cycle_analytics_group_stages, NEW_INDEX_NAME - end -end diff --git a/db/migrate/20200728163009_add_deployment_events_to_web_hooks.rb b/db/migrate/20200728163009_add_deployment_events_to_web_hooks.rb deleted file mode 100644 index b1bf9560bcc..00000000000 --- a/db/migrate/20200728163009_add_deployment_events_to_web_hooks.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddDeploymentEventsToWebHooks < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :web_hooks, :deployment_events, :boolean, null: false, default: false - end -end diff --git a/db/migrate/20200728174137_add_index_on_design_management_designs_issue_id_and_relative_position_and_id.rb b/db/migrate/20200728174137_add_index_on_design_management_designs_issue_id_and_relative_position_and_id.rb deleted file mode 100644 index 140c344e837..00000000000 --- a/db/migrate/20200728174137_add_index_on_design_management_designs_issue_id_and_relative_position_and_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnDesignManagementDesignsIssueIdAndRelativePositionAndId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_design_management_designs_issue_id_relative_position_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :design_management_designs, [:issue_id, :relative_position, :id], name: INDEX_NAME - end - - def down - remove_concurrent_index :design_management_designs, [:issue_id, :relative_position, :id], name: INDEX_NAME - end -end diff --git a/db/migrate/20200728175710_add_enforce_namespace_storage_limit_to_application_settings.rb b/db/migrate/20200728175710_add_enforce_namespace_storage_limit_to_application_settings.rb deleted file mode 100644 index adbc86ec621..00000000000 --- a/db/migrate/20200728175710_add_enforce_namespace_storage_limit_to_application_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddEnforceNamespaceStorageLimitToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :enforce_namespace_storage_limit, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20200728182311_add_o_auth_paths_to_protected_paths.rb b/db/migrate/20200728182311_add_o_auth_paths_to_protected_paths.rb deleted file mode 100644 index 7a5af0135fa..00000000000 --- a/db/migrate/20200728182311_add_o_auth_paths_to_protected_paths.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -class AddOAuthPathsToProtectedPaths < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - ADD_PROTECTED_PATHS = [ - '/oauth/authorize', - '/oauth/token' - ].freeze - - EXISTING_DEFAULT_PROTECTED_PATHS = [ - '/users/password', - '/users/sign_in', - '/api/v3/session.json', - '/api/v3/session', - '/api/v4/session.json', - '/api/v4/session', - '/users', - '/users/confirmation', - '/unsubscribes/', - '/import/github/personal_access_token', - '/admin/session' - ].freeze - - NEW_DEFAULT_PROTECTED_PATHS = (EXISTING_DEFAULT_PROTECTED_PATHS + ADD_PROTECTED_PATHS).freeze - - class ApplicationSetting < ActiveRecord::Base - self.table_name = 'application_settings' - end - - def up - change_column_default :application_settings, :protected_paths, NEW_DEFAULT_PROTECTED_PATHS - - ApplicationSetting.reset_column_information - - ApplicationSetting.where.not(protected_paths: nil).each do |application_setting| - missing_paths = ADD_PROTECTED_PATHS - application_setting.protected_paths - - next if missing_paths.empty? - - updated_protected_paths = application_setting.protected_paths + missing_paths - application_setting.update!(protected_paths: updated_protected_paths) - end - end - - def down - change_column_default :application_settings, :protected_paths, EXISTING_DEFAULT_PROTECTED_PATHS - - ApplicationSetting.reset_column_information - - ApplicationSetting.where.not(protected_paths: nil).each do |application_setting| - paths_to_remove = application_setting.protected_paths - EXISTING_DEFAULT_PROTECTED_PATHS - - next if paths_to_remove.empty? - - updated_protected_paths = application_setting.protected_paths - paths_to_remove - application_setting.update!(protected_paths: updated_protected_paths) - end - end -end diff --git a/db/migrate/20200729151021_add_after_expiry_notification_delivered_to_personal_access_tokens.rb b/db/migrate/20200729151021_add_after_expiry_notification_delivered_to_personal_access_tokens.rb deleted file mode 100644 index 001436b7285..00000000000 --- a/db/migrate/20200729151021_add_after_expiry_notification_delivered_to_personal_access_tokens.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddAfterExpiryNotificationDeliveredToPersonalAccessTokens < ActiveRecord::Migration[6.0] - DOWNTIME = false - - disable_ddl_transaction! - - def change - add_column :personal_access_tokens, :after_expiry_notification_delivered, :boolean, null: false, default: false - end -end diff --git a/db/migrate/20200729175935_add_dashboard_path_to_prometheus_metrics.rb b/db/migrate/20200729175935_add_dashboard_path_to_prometheus_metrics.rb deleted file mode 100644 index 0562e8d1c14..00000000000 --- a/db/migrate/20200729175935_add_dashboard_path_to_prometheus_metrics.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class AddDashboardPathToPrometheusMetrics < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - # Text limit is added in 20200730210506_add_text_limit_to_dashboard_path - add_column :prometheus_metrics, :dashboard_path, :text # rubocop:disable Migration/AddLimitToTextColumns - end - - def down - remove_column :prometheus_metrics, :dashboard_path - end -end diff --git a/db/migrate/20200729180539_add_can_push_to_group_deploy_keys_groups.rb b/db/migrate/20200729180539_add_can_push_to_group_deploy_keys_groups.rb deleted file mode 100644 index 3412790c20c..00000000000 --- a/db/migrate/20200729180539_add_can_push_to_group_deploy_keys_groups.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddCanPushToGroupDeployKeysGroups < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :group_deploy_keys_groups, :can_push, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20200729181641_add_index_to_resource_milestone_events_add_events.rb b/db/migrate/20200729181641_add_index_to_resource_milestone_events_add_events.rb deleted file mode 100644 index 438f9c6bfa3..00000000000 --- a/db/migrate/20200729181641_add_index_to_resource_milestone_events_add_events.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToResourceMilestoneEventsAddEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'index_resource_milestone_events_on_milestone_id_and_add_action' - ADD_ACTION = '1' - - def up - # Index add milestone events - add_concurrent_index :resource_milestone_events, :milestone_id, where: "action = #{ADD_ACTION}", name: INDEX_NAME - end - - def down - remove_concurrent_index :resource_milestone_events, :milestone_id, name: INDEX_NAME - end -end diff --git a/db/migrate/20200729191227_add_runbook_to_prometheus_alert.rb b/db/migrate/20200729191227_add_runbook_to_prometheus_alert.rb deleted file mode 100644 index a45b6eab1ee..00000000000 --- a/db/migrate/20200729191227_add_runbook_to_prometheus_alert.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class AddRunbookToPrometheusAlert < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - # limit is added in 20200501000002_add_text_limit_to_sprints_extended_title - add_column :prometheus_alerts, :runbook_url, :text # rubocop:disable Migration/AddLimitToTextColumns - end - - def down - remove_column :prometheus_alerts, :runbook_url - end -end diff --git a/db/migrate/20200729200808_add_text_limit_to_runbook_on_prometheus_alerts.rb b/db/migrate/20200729200808_add_text_limit_to_runbook_on_prometheus_alerts.rb deleted file mode 100644 index 010b53ab35e..00000000000 --- a/db/migrate/20200729200808_add_text_limit_to_runbook_on_prometheus_alerts.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToRunbookOnPrometheusAlerts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :prometheus_alerts, :runbook_url, 255 - end - - def down - remove_text_limit :prometheus_alerts, :runbook_url - end -end diff --git a/db/migrate/20200729202222_add_index_to_ci_pipeline_project_id_created_at.rb b/db/migrate/20200729202222_add_index_to_ci_pipeline_project_id_created_at.rb deleted file mode 100644 index d1ee9c49d30..00000000000 --- a/db/migrate/20200729202222_add_index_to_ci_pipeline_project_id_created_at.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToCiPipelineProjectIdCreatedAt < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_pipelines, [:project_id, :created_at] - end - - def down - remove_concurrent_index :ci_pipelines, [:project_id, :created_at] - end -end diff --git a/db/migrate/20200730044810_add_indexes_to_resource_label_events_to_support_vsa.rb b/db/migrate/20200730044810_add_indexes_to_resource_label_events_to_support_vsa.rb deleted file mode 100644 index ba114e81618..00000000000 --- a/db/migrate/20200730044810_add_indexes_to_resource_label_events_to_support_vsa.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class AddIndexesToResourceLabelEventsToSupportVsa < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - NEW_INDEX_NAME_ON_ISSUE_ID = 'index_resource_label_events_issue_id_label_id_action' - OLD_INDEX_NAME_ON_ISSUE_ID = 'index_resource_label_events_on_issue_id' - - NEW_INDEX_NAME_ON_MERGE_REQUEST_ID = 'index_resource_label_events_on_merge_request_id_label_id_action' - OLD_INDEX_NAME_ON_MERGE_REQUEST_ID = 'index_resource_label_events_on_merge_request_id' - - def up - add_concurrent_index :resource_label_events, [:issue_id, :label_id, :action], name: NEW_INDEX_NAME_ON_ISSUE_ID - remove_concurrent_index_by_name :resource_label_events, OLD_INDEX_NAME_ON_ISSUE_ID - - add_concurrent_index :resource_label_events, [:merge_request_id, :label_id, :action], name: NEW_INDEX_NAME_ON_MERGE_REQUEST_ID - remove_concurrent_index_by_name :resource_label_events, OLD_INDEX_NAME_ON_MERGE_REQUEST_ID - end - - def down - add_concurrent_index :resource_label_events, :issue_id, name: OLD_INDEX_NAME_ON_ISSUE_ID - remove_concurrent_index_by_name(:resource_label_events, NEW_INDEX_NAME_ON_ISSUE_ID) - - add_concurrent_index :resource_label_events, :merge_request_id, name: OLD_INDEX_NAME_ON_MERGE_REQUEST_ID - remove_concurrent_index_by_name(:resource_label_events, NEW_INDEX_NAME_ON_MERGE_REQUEST_ID) - end -end diff --git a/db/migrate/20200730083043_replace_index_for_service_usage_data.rb b/db/migrate/20200730083043_replace_index_for_service_usage_data.rb deleted file mode 100644 index 0d3012c319d..00000000000 --- a/db/migrate/20200730083043_replace_index_for_service_usage_data.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class ReplaceIndexForServiceUsageData < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - OLD_INDEX_NAME = 'index_services_on_type_and_id_and_template_when_active' - NEW_INDEX_NAME = 'index_services_on_type_id_when_active_not_instance_not_template' - - disable_ddl_transaction! - - def up - add_concurrent_index :services, [:type, :id], where: 'active = TRUE AND instance = FALSE AND template = FALSE', name: NEW_INDEX_NAME - - remove_concurrent_index_by_name :services, OLD_INDEX_NAME - end - - def down - add_concurrent_index :services, [:type, :id, :template], where: 'active = TRUE', name: OLD_INDEX_NAME - - remove_concurrent_index :services, NEW_INDEX_NAME - end -end diff --git a/db/migrate/20200730131946_add_hide_lists_to_boards.rb b/db/migrate/20200730131946_add_hide_lists_to_boards.rb deleted file mode 100644 index e431ea852a7..00000000000 --- a/db/migrate/20200730131946_add_hide_lists_to_boards.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddHideListsToBoards < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :boards, :hide_backlog_list, :boolean, default: false, null: false - add_column :boards, :hide_closed_list, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20200730210506_add_text_limit_to_dashboard_path.rb b/db/migrate/20200730210506_add_text_limit_to_dashboard_path.rb deleted file mode 100644 index a236cc68988..00000000000 --- a/db/migrate/20200730210506_add_text_limit_to_dashboard_path.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToDashboardPath < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit(:prometheus_metrics, :dashboard_path, 2048) - end - - def down - remove_text_limit(:prometheus_metrics, :dashboard_path) - end -end diff --git a/db/migrate/20200731085019_create_experiment.rb b/db/migrate/20200731085019_create_experiment.rb deleted file mode 100644 index cd326e0958f..00000000000 --- a/db/migrate/20200731085019_create_experiment.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class CreateExperiment < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:experiments) - create_table :experiments do |t| - t.text :name, null: false - - t.index :name, unique: true - end - end - - add_text_limit :experiments, :name, 255 - end - - def down - drop_table :experiments - end -end diff --git a/db/migrate/20200731090553_create_experiment_user.rb b/db/migrate/20200731090553_create_experiment_user.rb deleted file mode 100644 index 9080429dfd3..00000000000 --- a/db/migrate/20200731090553_create_experiment_user.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class CreateExperimentUser < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - create_table :experiment_users do |t| - t.bigint :experiment_id, null: false - t.bigint :user_id, null: false - t.integer :group_type, limit: 2, null: false, default: 0 - t.timestamps_with_timezone null: false - end - - add_index :experiment_users, :experiment_id - add_index :experiment_users, :user_id - end - - def down - drop_table :experiment_users - end -end diff --git a/db/migrate/20200731201408_add_foreign_key_to_experiment_on_experiment_users.rb b/db/migrate/20200731201408_add_foreign_key_to_experiment_on_experiment_users.rb deleted file mode 100644 index c1a6dae242b..00000000000 --- a/db/migrate/20200731201408_add_foreign_key_to_experiment_on_experiment_users.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToExperimentOnExperimentUsers < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - # There is no need to use add_concurrent_foreign_key since it's an empty table - add_foreign_key :experiment_users, :experiments, column: :experiment_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :experiment_users, column: :experiment_id - end - end -end diff --git a/db/migrate/20200731201834_add_foreign_key_to_user_on_experiment_users.rb b/db/migrate/20200731201834_add_foreign_key_to_user_on_experiment_users.rb deleted file mode 100644 index 673a0bde0b1..00000000000 --- a/db/migrate/20200731201834_add_foreign_key_to_user_on_experiment_users.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToUserOnExperimentUsers < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - # There is no need to use add_concurrent_foreign_key since it's an empty table - add_foreign_key :experiment_users, :users, column: :user_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :experiment_users, column: :user_id - end - end -end diff --git a/db/migrate/20200803111512_add_group_id_to_services.rb b/db/migrate/20200803111512_add_group_id_to_services.rb deleted file mode 100644 index 7d4a0ef4dd5..00000000000 --- a/db/migrate/20200803111512_add_group_id_to_services.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddGroupIdToServices < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :services, :group_id, :bigint - end -end diff --git a/db/migrate/20200803112806_add_index_group_id_to_services.rb b/db/migrate/20200803112806_add_index_group_id_to_services.rb deleted file mode 100644 index 145009672ef..00000000000 --- a/db/migrate/20200803112806_add_index_group_id_to_services.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddIndexGroupIdToServices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_services_on_unique_group_id_and_type' - - disable_ddl_transaction! - - def up - add_concurrent_index :services, [:group_id, :type], unique: true, name: INDEX_NAME - - add_concurrent_foreign_key :services, :namespaces, column: :group_id - end - - def down - remove_foreign_key_if_exists :services, column: :group_id - - remove_concurrent_index_by_name :services, INDEX_NAME - end -end diff --git a/db/migrate/20200803125340_create_raw_usage_data.rb b/db/migrate/20200803125340_create_raw_usage_data.rb deleted file mode 100644 index f1c23a7b0f5..00000000000 --- a/db/migrate/20200803125340_create_raw_usage_data.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class CreateRawUsageData < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - unless table_exists?(:raw_usage_data) - create_table :raw_usage_data do |t| - t.timestamps_with_timezone - t.datetime_with_timezone :recorded_at, null: false - t.datetime_with_timezone :sent_at - t.jsonb :payload, null: false - - t.index [:recorded_at], unique: true - end - end - end - - def down - drop_table :raw_usage_data - end -end diff --git a/db/migrate/20200804041018_add_default_value_for_external_diff_store_to_merge_request_diffs.rb b/db/migrate/20200804041018_add_default_value_for_external_diff_store_to_merge_request_diffs.rb deleted file mode 100644 index 1a565fef125..00000000000 --- a/db/migrate/20200804041018_add_default_value_for_external_diff_store_to_merge_request_diffs.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultValueForExternalDiffStoreToMergeRequestDiffs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :merge_request_diffs, :external_diff_store, 1 - end - end - - def down - with_lock_retries do - change_column_default :merge_request_diffs, :external_diff_store, nil - end - end -end diff --git a/db/migrate/20200804222543_add_resolved_on_default_branch_into_vulnerabilities_table.rb b/db/migrate/20200804222543_add_resolved_on_default_branch_into_vulnerabilities_table.rb deleted file mode 100644 index afb97871575..00000000000 --- a/db/migrate/20200804222543_add_resolved_on_default_branch_into_vulnerabilities_table.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddResolvedOnDefaultBranchIntoVulnerabilitiesTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_table :vulnerabilities do |t| - t.boolean :resolved_on_default_branch, default: false, null: false - end - end -end diff --git a/db/migrate/20200805071842_add_index_on_end_date_and_namespace_id_to_gitlab_subscriptions.rb b/db/migrate/20200805071842_add_index_on_end_date_and_namespace_id_to_gitlab_subscriptions.rb deleted file mode 100644 index 266b0a50318..00000000000 --- a/db/migrate/20200805071842_add_index_on_end_date_and_namespace_id_to_gitlab_subscriptions.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnEndDateAndNamespaceIdToGitlabSubscriptions < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :gitlab_subscriptions, [:end_date, :namespace_id] - end - - def down - remove_concurrent_index :gitlab_subscriptions, [:end_date, :namespace_id], - name: 'index_gitlab_subscriptions_on_end_date_and_namespace_id' - end -end diff --git a/db/migrate/20200805150316_create_ci_pipeline_artifact.rb b/db/migrate/20200805150316_create_ci_pipeline_artifact.rb deleted file mode 100644 index 01995972011..00000000000 --- a/db/migrate/20200805150316_create_ci_pipeline_artifact.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class CreateCiPipelineArtifact < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:ci_pipeline_artifacts) - create_table :ci_pipeline_artifacts do |t| - t.timestamps_with_timezone - t.bigint :pipeline_id, null: false, index: true - t.bigint :project_id, null: false, index: true - t.integer :size, null: false - t.integer :file_store, null: false, limit: 2 - t.integer :file_type, null: false, limit: 2 - t.integer :file_format, null: false, limit: 2 - t.text :file - - t.index [:pipeline_id, :file_type], unique: true - end - end - - add_text_limit :ci_pipeline_artifacts, :file, 255 - end - - def down - drop_table :ci_pipeline_artifacts - end -end diff --git a/db/migrate/20200805151001_add_foreign_key_to_pipeline_id_on_pipeline_artifact.rb b/db/migrate/20200805151001_add_foreign_key_to_pipeline_id_on_pipeline_artifact.rb deleted file mode 100644 index 5cfe0496b8d..00000000000 --- a/db/migrate/20200805151001_add_foreign_key_to_pipeline_id_on_pipeline_artifact.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToPipelineIdOnPipelineArtifact < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :ci_pipeline_artifacts, :ci_pipelines, column: :pipeline_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :ci_pipeline_artifacts, column: :pipeline_id - end - end -end diff --git a/db/migrate/20200805151726_add_foreign_key_to_project_id_on_pipeline_artifact.rb b/db/migrate/20200805151726_add_foreign_key_to_project_id_on_pipeline_artifact.rb deleted file mode 100644 index fe418f4c5af..00000000000 --- a/db/migrate/20200805151726_add_foreign_key_to_project_id_on_pipeline_artifact.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToProjectIdOnPipelineArtifact < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :ci_pipeline_artifacts, :projects, column: :project_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :ci_pipeline_artifacts, column: :project_id - end - end -end diff --git a/db/migrate/20200806004232_add_default_value_for_file_store_to_package_files.rb b/db/migrate/20200806004232_add_default_value_for_file_store_to_package_files.rb deleted file mode 100644 index 06f033891fc..00000000000 --- a/db/migrate/20200806004232_add_default_value_for_file_store_to_package_files.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultValueForFileStoreToPackageFiles < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :packages_package_files, :file_store, 1 - end - end - - def down - with_lock_retries do - change_column_default :packages_package_files, :file_store, nil - end - end -end diff --git a/db/migrate/20200807070820_add_index_for_compliance_merged_merge_request_to_events.rb b/db/migrate/20200807070820_add_index_for_compliance_merged_merge_request_to_events.rb deleted file mode 100644 index 4650437056e..00000000000 --- a/db/migrate/20200807070820_add_index_for_compliance_merged_merge_request_to_events.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForComplianceMergedMergeRequestToEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_events_on_project_id_and_id_desc_on_merged_action' - - disable_ddl_transaction! - - def up - add_concurrent_index :events, [:project_id, :id], - order: { id: :desc }, - where: "action = 7", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :events, INDEX_NAME - end -end diff --git a/db/migrate/20200807132726_add_delete_original_index_at_to_reindexing_tasks.rb b/db/migrate/20200807132726_add_delete_original_index_at_to_reindexing_tasks.rb deleted file mode 100644 index 435b2a45e85..00000000000 --- a/db/migrate/20200807132726_add_delete_original_index_at_to_reindexing_tasks.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddDeleteOriginalIndexAtToReindexingTasks < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :elastic_reindexing_tasks, :delete_original_index_at, :datetime_with_timezone - end - end - - def down - with_lock_retries do - remove_column :elastic_reindexing_tasks, :delete_original_index_at - end - end -end diff --git a/db/migrate/20200807150937_add_file_count_to_merge_request_diffs.rb b/db/migrate/20200807150937_add_file_count_to_merge_request_diffs.rb deleted file mode 100644 index 3afc246d698..00000000000 --- a/db/migrate/20200807150937_add_file_count_to_merge_request_diffs.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddFileCountToMergeRequestDiffs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - add_column :merge_request_diffs, :files_count, :smallint - end - end - - def down - with_lock_retries do - remove_column :merge_request_diffs, :files_count, :smallint - end - end -end diff --git a/db/migrate/20200810152043_add_expire_at_to_ci_pipeline_artifact.rb b/db/migrate/20200810152043_add_expire_at_to_ci_pipeline_artifact.rb deleted file mode 100644 index 1aaa0f36f16..00000000000 --- a/db/migrate/20200810152043_add_expire_at_to_ci_pipeline_artifact.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddExpireAtToCiPipelineArtifact < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :ci_pipeline_artifacts, :expire_at, :datetime_with_timezone - end -end diff --git a/db/migrate/20200811055018_remove_not_null_constraint_on_type_from_audit_events.rb b/db/migrate/20200811055018_remove_not_null_constraint_on_type_from_audit_events.rb deleted file mode 100644 index 25c3ef71655..00000000000 --- a/db/migrate/20200811055018_remove_not_null_constraint_on_type_from_audit_events.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class RemoveNotNullConstraintOnTypeFromAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - # To avoid deadlock on audit_event and audit_event_part... since there is a trigger to insert record from audit_events - # to audit_events_part..., we need to ensure each ALTER TABLE command run in its own transaction. - def up - with_lock_retries do - change_column_null :audit_events_part_5fc467ac26, :type, true - end - - with_lock_retries do - change_column_null :audit_events, :type, true - end - end - - def down - # no-op -- null values might be added after this constraint is removed. - end -end diff --git a/db/migrate/20200811154630_add_gitpod_application_settings.rb b/db/migrate/20200811154630_add_gitpod_application_settings.rb deleted file mode 100644 index e4211d25d0b..00000000000 --- a/db/migrate/20200811154630_add_gitpod_application_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddGitpodApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20200727154631_add_gitpod_application_settings_text_limit - def change - add_column :application_settings, :gitpod_enabled, :boolean, default: false, null: false - add_column :application_settings, :gitpod_url, :text, default: 'https://gitpod.io/', null: true - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20200811154631_add_gitpod_application_settings_text_limit.rb b/db/migrate/20200811154631_add_gitpod_application_settings_text_limit.rb deleted file mode 100644 index 1f43b5d88d5..00000000000 --- a/db/migrate/20200811154631_add_gitpod_application_settings_text_limit.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddGitpodApplicationSettingsTextLimit < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :gitpod_url, 255 - end - - def down - remove_text_limit :application_settings, :gitpod_url - end -end diff --git a/db/migrate/20200811154632_add_gitpod_user_preferences.rb b/db/migrate/20200811154632_add_gitpod_user_preferences.rb deleted file mode 100644 index 0392c80d39c..00000000000 --- a/db/migrate/20200811154632_add_gitpod_user_preferences.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddGitpodUserPreferences < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :user_preferences, :gitpod_enabled, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20200811194848_add_default_value_for_file_store_to_pipeline_artifact.rb b/db/migrate/20200811194848_add_default_value_for_file_store_to_pipeline_artifact.rb deleted file mode 100644 index f689a505809..00000000000 --- a/db/migrate/20200811194848_add_default_value_for_file_store_to_pipeline_artifact.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultValueForFileStoreToPipelineArtifact < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - PIPELINE_ARTIFACT_LOCAL_FILE_STORE = 1 - - def up - with_lock_retries do - change_column_default :ci_pipeline_artifacts, :file_store, PIPELINE_ARTIFACT_LOCAL_FILE_STORE - end - end - - def down - with_lock_retries do - change_column_default :ci_pipeline_artifacts, :file_store, nil - end - end -end diff --git a/db/migrate/20200812112204_add_index_to_mr_metrics_target_project_id.rb b/db/migrate/20200812112204_add_index_to_mr_metrics_target_project_id.rb deleted file mode 100644 index da483e7222c..00000000000 --- a/db/migrate/20200812112204_add_index_to_mr_metrics_target_project_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToMrMetricsTargetProjectId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_merge_request_metrics_on_target_project_id_merged_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_request_metrics, [:target_project_id, :merged_at], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name(:merge_request_metrics, INDEX_NAME) - end -end diff --git a/db/migrate/20200812150810_add_verification_state_to_snippet_repository.rb b/db/migrate/20200812150810_add_verification_state_to_snippet_repository.rb deleted file mode 100644 index 3fdf0b4adf4..00000000000 --- a/db/migrate/20200812150810_add_verification_state_to_snippet_repository.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddVerificationStateToSnippetRepository < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_table(:snippet_repositories) do |t| - t.integer :verification_retry_count, limit: 2 - t.column :verification_retry_at, :datetime_with_timezone - t.column :verified_at, :datetime_with_timezone - t.binary :verification_checksum, using: 'verification_checksum::bytea' - - # rubocop:disable Migration/AddLimitToTextColumns - t.text :verification_failure - # rubocop:enable Migration/AddLimitToTextColumns - end - end -end diff --git a/db/migrate/20200812150811_add_verification_failure_to_snippet_repository.rb b/db/migrate/20200812150811_add_verification_failure_to_snippet_repository.rb deleted file mode 100644 index 64cd094acf0..00000000000 --- a/db/migrate/20200812150811_add_verification_failure_to_snippet_repository.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddVerificationFailureToSnippetRepository < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - CONSTRAINT_NAME = 'snippet_repositories_verification_failure_text_limit' - - def up - add_text_limit :snippet_repositories, :verification_failure, 255, constraint_name: CONSTRAINT_NAME - end - - def down - remove_check_constraint(:snippet_repositories, CONSTRAINT_NAME) - end -end diff --git a/db/migrate/20200812150812_add_verification_failure_index_to_snippet_repository.rb b/db/migrate/20200812150812_add_verification_failure_index_to_snippet_repository.rb deleted file mode 100644 index 3c1d2dc988d..00000000000 --- a/db/migrate/20200812150812_add_verification_failure_index_to_snippet_repository.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddVerificationFailureIndexToSnippetRepository < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :snippet_repositories, :verification_failure, where: "(verification_failure IS NOT NULL)", name: 'snippet_repositories_verification_failure_partial' - add_concurrent_index :snippet_repositories, :verification_checksum, where: "(verification_checksum IS NOT NULL)", name: 'snippet_repositories_verification_checksum_partial' - end - - def down - remove_concurrent_index_by_name :snippet_repositories, 'snippet_repositories_verification_failure_partial' - remove_concurrent_index_by_name :snippet_repositories, 'snippet_repositories_verification_checksum_partial' - end -end diff --git a/db/migrate/20200813135558_create_ci_deleted_objects.rb b/db/migrate/20200813135558_create_ci_deleted_objects.rb deleted file mode 100644 index 5364b7fc0ce..00000000000 --- a/db/migrate/20200813135558_create_ci_deleted_objects.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class CreateCiDeletedObjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :ci_deleted_objects, if_not_exists: true do |t| - t.integer :file_store, limit: 2, default: 1, null: false - t.datetime_with_timezone :pick_up_at, null: false, default: -> { 'now()' }, index: true - t.text :store_dir, null: false - - # rubocop:disable Migration/AddLimitToTextColumns - # This column depends on the `file` column from `ci_job_artifacts` table - # which doesn't have a constraint limit on it. - t.text :file, null: false - # rubocop:enable Migration/AddLimitToTextColumns - end - - add_text_limit(:ci_deleted_objects, :store_dir, 1024) - end - - def down - drop_table :ci_deleted_objects - end -end diff --git a/db/migrate/20200813143304_add_new_external_diff_migration_index.rb b/db/migrate/20200813143304_add_new_external_diff_migration_index.rb deleted file mode 100644 index 64611e4f50a..00000000000 --- a/db/migrate/20200813143304_add_new_external_diff_migration_index.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddNewExternalDiffMigrationIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_merge_request_diffs_by_id_partial' - - disable_ddl_transaction! - - def up - add_concurrent_index( - :merge_request_diffs, - :id, - name: INDEX_NAME, - where: 'files_count > 0 AND ((NOT stored_externally) OR (stored_externally IS NULL))' - ) - end - - def down - remove_concurrent_index_by_name(:merge_request_diffs, INDEX_NAME) - end -end diff --git a/db/migrate/20200813143356_remove_old_external_diff_migration_index.rb b/db/migrate/20200813143356_remove_old_external_diff_migration_index.rb deleted file mode 100644 index a3730247f10..00000000000 --- a/db/migrate/20200813143356_remove_old_external_diff_migration_index.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class RemoveOldExternalDiffMigrationIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name( - :merge_request_diffs, - 'index_merge_request_diffs_on_merge_request_id_and_id_partial' - ) - end - - def down - add_concurrent_index( - :merge_request_diffs, - [:merge_request_id, :id], - where: 'NOT stored_externally OR stored_externally IS NULL', - name: 'index_merge_request_diffs_on_merge_request_id_and_id_partial' - ) - end -end diff --git a/db/migrate/20200816133024_add_cve_id_request_project_setting.rb b/db/migrate/20200816133024_add_cve_id_request_project_setting.rb deleted file mode 100644 index c4fe86845eb..00000000000 --- a/db/migrate/20200816133024_add_cve_id_request_project_setting.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddCveIdRequestProjectSetting < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column :project_settings, :cve_id_request_enabled, :boolean, default: true, null: false - end - - def down - remove_column :project_settings, :cve_id_request_enabled - end -end diff --git a/db/migrate/20200817142800_add_pipeline_artifacts_size_to_project_statistics.rb b/db/migrate/20200817142800_add_pipeline_artifacts_size_to_project_statistics.rb deleted file mode 100644 index a15d94a41b7..00000000000 --- a/db/migrate/20200817142800_add_pipeline_artifacts_size_to_project_statistics.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPipelineArtifactsSizeToProjectStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :project_statistics, :pipeline_artifacts_size, :bigint, default: 0, null: false - end - end - - def down - with_lock_retries do - remove_column :project_statistics, :pipeline_artifacts_size, :bigint, default: 0, null: false - end - end -end diff --git a/db/migrate/20200817195628_add_modified_to_approval_merge_request_rule.rb b/db/migrate/20200817195628_add_modified_to_approval_merge_request_rule.rb deleted file mode 100644 index 71a29ae9bc5..00000000000 --- a/db/migrate/20200817195628_add_modified_to_approval_merge_request_rule.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddModifiedToApprovalMergeRequestRule < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :approval_merge_request_rules, :modified_from_project_rule, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20200818052219_add_kubernetes_version_to_cluster_providers_aws.rb b/db/migrate/20200818052219_add_kubernetes_version_to_cluster_providers_aws.rb deleted file mode 100644 index fa3d5210e91..00000000000 --- a/db/migrate/20200818052219_add_kubernetes_version_to_cluster_providers_aws.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddKubernetesVersionToClusterProvidersAws < ActiveRecord::Migration[6.0] - # Uncomment the following include if you require helper functions: - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless column_exists?(:cluster_providers_aws, :kubernetes_version) - add_column :cluster_providers_aws, :kubernetes_version, :text, null: false, default: '1.14' - end - - add_text_limit :cluster_providers_aws, :kubernetes_version, 30 - end - - def down - if column_exists?(:cluster_providers_aws, :kubernetes_version) - remove_column :cluster_providers_aws, :kubernetes_version - end - end -end diff --git a/db/migrate/20200818092401_add_checksum_to_build_chunk.rb b/db/migrate/20200818092401_add_checksum_to_build_chunk.rb deleted file mode 100644 index c1c968571a2..00000000000 --- a/db/migrate/20200818092401_add_checksum_to_build_chunk.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddChecksumToBuildChunk < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :ci_build_trace_chunks, :checksum, :binary - end -end diff --git a/db/migrate/20200818171229_add_package_max_file_size_to_plan_limits.rb b/db/migrate/20200818171229_add_package_max_file_size_to_plan_limits.rb deleted file mode 100644 index 5343da6ed5e..00000000000 --- a/db/migrate/20200818171229_add_package_max_file_size_to_plan_limits.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddPackageMaxFileSizeToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column(:plan_limits, :conan_max_file_size, :bigint, default: 50.megabytes, null: false) - add_column(:plan_limits, :maven_max_file_size, :bigint, default: 50.megabytes, null: false) - add_column(:plan_limits, :npm_max_file_size, :bigint, default: 50.megabytes, null: false) - add_column(:plan_limits, :nuget_max_file_size, :bigint, default: 50.megabytes, null: false) - add_column(:plan_limits, :pypi_max_file_size, :bigint, default: 50.megabytes, null: false) - end -end diff --git a/db/migrate/20200819192143_add_emails_user_id_foreign_key.rb b/db/migrate/20200819192143_add_emails_user_id_foreign_key.rb deleted file mode 100644 index 7f00aa6341b..00000000000 --- a/db/migrate/20200819192143_add_emails_user_id_foreign_key.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddEmailsUserIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_emails_user_id' - - def up - with_lock_retries do - add_foreign_key :emails, :users, on_delete: :cascade, validate: false, name: CONSTRAINT_NAME - end - end - - def down - with_lock_retries do - remove_foreign_key_if_exists :emails, column: :user_id, name: CONSTRAINT_NAME - end - end -end diff --git a/db/migrate/20200820105408_add_index_to_container_scanning_findings.rb b/db/migrate/20200820105408_add_index_to_container_scanning_findings.rb deleted file mode 100644 index dd474b57602..00000000000 --- a/db/migrate/20200820105408_add_index_to_container_scanning_findings.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToContainerScanningFindings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'idx_container_scanning_findings' - - disable_ddl_transaction! - - def up - add_concurrent_index(:vulnerability_occurrences, :id, - where: "report_type = 2", - name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(:vulnerability_occurrences, INDEX_NAME) - end -end diff --git a/db/migrate/20200820130839_add_auto_close_incident_to_project_incident_management_settings.rb b/db/migrate/20200820130839_add_auto_close_incident_to_project_incident_management_settings.rb deleted file mode 100644 index 01aafa6d988..00000000000 --- a/db/migrate/20200820130839_add_auto_close_incident_to_project_incident_management_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddAutoCloseIncidentToProjectIncidentManagementSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column :project_incident_management_settings, :auto_close_incident, :boolean, default: true, null: false - end - - def down - remove_column :project_incident_management_settings, :auto_close_incident - end -end diff --git a/db/migrate/20200820204041_create_ci_platform_metrics.rb b/db/migrate/20200820204041_create_ci_platform_metrics.rb deleted file mode 100644 index 27a5a3dc8eb..00000000000 --- a/db/migrate/20200820204041_create_ci_platform_metrics.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class CreateCiPlatformMetrics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CI_VARIABLES_KEY_INDEX_NAME = "index_ci_variables_on_key" - - disable_ddl_transaction! - - def up - unless table_exists?(:ci_platform_metrics) - create_table :ci_platform_metrics do |t| - t.datetime_with_timezone :recorded_at, null: false - t.text :platform_target, null: false - t.integer :count, null: false - end - end - - add_text_limit :ci_platform_metrics, :platform_target, 255 - add_concurrent_index :ci_variables, :key, name: CI_VARIABLES_KEY_INDEX_NAME - end - - def down - if table_exists?(:ci_platform_metrics) - drop_table :ci_platform_metrics - end - - remove_concurrent_index :ci_variables, :key, name: CI_VARIABLES_KEY_INDEX_NAME - end -end diff --git a/db/migrate/20200821034419_add_unique_index_for_generic_packages.rb b/db/migrate/20200821034419_add_unique_index_for_generic_packages.rb deleted file mode 100644 index f0e4749bbb5..00000000000 --- a/db/migrate/20200821034419_add_unique_index_for_generic_packages.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueIndexForGenericPackages < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = 'index_packages_on_project_id_name_version_unique_when_generic' - PACKAGE_TYPE_GENERIC = 7 - - disable_ddl_transaction! - - def up - add_concurrent_index :packages_packages, [:project_id, :name, :version], unique: true, where: "package_type = #{PACKAGE_TYPE_GENERIC}", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name(:packages_packages, INDEX_NAME) - end -end diff --git a/db/migrate/20200821194920_create_atlassian_identities.rb b/db/migrate/20200821194920_create_atlassian_identities.rb deleted file mode 100644 index 1aab9ed6381..00000000000 --- a/db/migrate/20200821194920_create_atlassian_identities.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -class CreateAtlassianIdentities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:atlassian_identities) - with_lock_retries do - create_table :atlassian_identities, id: false do |t| - t.references :user, index: false, foreign_key: { on_delete: :cascade }, null: false, primary_key: true - t.timestamps_with_timezone - t.datetime_with_timezone :expires_at - t.text :extern_uid, null: false, index: { unique: true } - t.binary :encrypted_token - t.binary :encrypted_token_iv - t.binary :encrypted_refresh_token - t.binary :encrypted_refresh_token_iv - end - end - end - - add_text_limit :atlassian_identities, :extern_uid, 255 - - add_check_constraint :atlassian_identities, 'octet_length(encrypted_token) <= 2048', 'atlassian_identities_token_length_constraint' - add_check_constraint :atlassian_identities, 'octet_length(encrypted_token_iv) <= 12', 'atlassian_identities_token_iv_length_constraint' - add_check_constraint :atlassian_identities, 'octet_length(encrypted_refresh_token) <= 512', 'atlassian_identities_refresh_token_length_constraint' - add_check_constraint :atlassian_identities, 'octet_length(encrypted_refresh_token_iv) <= 12', 'atlassian_identities_refresh_token_iv_length_constraint' - end - - def down - with_lock_retries do - drop_table :atlassian_identities - end - end -end diff --git a/db/migrate/20200824045812_add_generic_package_max_file_size_to_plan_limits.rb b/db/migrate/20200824045812_add_generic_package_max_file_size_to_plan_limits.rb deleted file mode 100644 index eea4f8de7bf..00000000000 --- a/db/migrate/20200824045812_add_generic_package_max_file_size_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddGenericPackageMaxFileSizeToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column(:plan_limits, :generic_packages_max_file_size, :bigint, default: 5.gigabytes, null: false) - end -end diff --git a/db/migrate/20200824124623_create_issuable_severities.rb b/db/migrate/20200824124623_create_issuable_severities.rb deleted file mode 100644 index 674a54fc16d..00000000000 --- a/db/migrate/20200824124623_create_issuable_severities.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class CreateIssuableSeverities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :issuable_severities do |t| - t.references :issue, index: { unique: true }, null: false, foreign_key: { on_delete: :cascade } - t.integer :severity, null: false, default: 0, limit: 2 # 0 - will stand for unknown - end - end - end - - def down - with_lock_retries do - drop_table :issuable_severities - end - end -end diff --git a/db/migrate/20200825071735_create_merge_request_reviewers.rb b/db/migrate/20200825071735_create_merge_request_reviewers.rb deleted file mode 100644 index 45451476bb0..00000000000 --- a/db/migrate/20200825071735_create_merge_request_reviewers.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class CreateMergeRequestReviewers < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - create_table :merge_request_reviewers do |t| - t.bigint :user_id, null: false - t.bigint :merge_request_id, null: false - t.datetime_with_timezone :created_at, null: false - end - - add_index :merge_request_reviewers, [:merge_request_id, :user_id], unique: true - add_index :merge_request_reviewers, :user_id - end - - def down - drop_table :merge_request_reviewers - end -end diff --git a/db/migrate/20200825081025_boards_epic_user_preferences.rb b/db/migrate/20200825081025_boards_epic_user_preferences.rb deleted file mode 100644 index fc7454a6a9a..00000000000 --- a/db/migrate/20200825081025_boards_epic_user_preferences.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class BoardsEpicUserPreferences < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - create_table :boards_epic_user_preferences do |t| - t.bigint :board_id, null: false - t.bigint :user_id, null: false - t.bigint :epic_id, null: false - t.boolean :collapsed, default: false, null: false - end - - add_index :boards_epic_user_preferences, :board_id - add_index :boards_epic_user_preferences, :user_id - add_index :boards_epic_user_preferences, :epic_id - add_index :boards_epic_user_preferences, [:board_id, :user_id, :epic_id], unique: true, name: 'index_boards_epic_user_preferences_on_board_user_epic_unique' - end - - def down - drop_table :boards_epic_user_preferences - end -end diff --git a/db/migrate/20200825081035_boards_epic_user_preferences_fk_board.rb b/db/migrate/20200825081035_boards_epic_user_preferences_fk_board.rb deleted file mode 100644 index 1c014573fb4..00000000000 --- a/db/migrate/20200825081035_boards_epic_user_preferences_fk_board.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class BoardsEpicUserPreferencesFkBoard < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :boards_epic_user_preferences, :boards, column: :board_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :boards_epic_user_preferences, column: :board_id - end - end -end diff --git a/db/migrate/20200825081045_boards_epic_user_preferences_fk_user.rb b/db/migrate/20200825081045_boards_epic_user_preferences_fk_user.rb deleted file mode 100644 index 3edc3bc0ded..00000000000 --- a/db/migrate/20200825081045_boards_epic_user_preferences_fk_user.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class BoardsEpicUserPreferencesFkUser < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :boards_epic_user_preferences, :users, column: :user_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :boards_epic_user_preferences, column: :user_id - end - end -end diff --git a/db/migrate/20200825081055_boards_epic_user_preferences_fk_epic.rb b/db/migrate/20200825081055_boards_epic_user_preferences_fk_epic.rb deleted file mode 100644 index 0354060b7c1..00000000000 --- a/db/migrate/20200825081055_boards_epic_user_preferences_fk_epic.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class BoardsEpicUserPreferencesFkEpic < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :boards_epic_user_preferences, :epics, column: :epic_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :boards_epic_user_preferences, column: :epic_id - end - end -end diff --git a/db/migrate/20200825084819_create_security_findings_table.rb b/db/migrate/20200825084819_create_security_findings_table.rb deleted file mode 100644 index d44b4671e2f..00000000000 --- a/db/migrate/20200825084819_create_security_findings_table.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class CreateSecurityFindingsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:security_findings) - create_table :security_findings do |t| - t.references :scan, null: false - t.references :scanner, null: false - t.integer :severity, limit: 2, index: true, null: false - t.integer :confidence, limit: 2, index: true, null: false - t.text :project_fingerprint, index: true, null: false - end - end - - add_text_limit :security_findings, :project_fingerprint, 40 - end - - def down - drop_table :security_findings - end -end diff --git a/db/migrate/20200825154237_update_package_file_size_plan_limits_defaults.rb b/db/migrate/20200825154237_update_package_file_size_plan_limits_defaults.rb deleted file mode 100644 index b71e2a86f4a..00000000000 --- a/db/migrate/20200825154237_update_package_file_size_plan_limits_defaults.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class UpdatePackageFileSizePlanLimitsDefaults < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_column_default(:plan_limits, :maven_max_file_size, from: 50.megabytes, to: 3.gigabytes) - change_column_default(:plan_limits, :conan_max_file_size, from: 50.megabytes, to: 3.gigabytes) - change_column_default(:plan_limits, :nuget_max_file_size, from: 50.megabytes, to: 500.megabytes) - change_column_default(:plan_limits, :npm_max_file_size, from: 50.megabytes, to: 500.megabytes) - change_column_default(:plan_limits, :pypi_max_file_size, from: 50.megabytes, to: 3.gigabytes) - end -end diff --git a/db/migrate/20200825180050_add_pipeline_artifacts_size_to_root_storage_statistics.rb b/db/migrate/20200825180050_add_pipeline_artifacts_size_to_root_storage_statistics.rb deleted file mode 100644 index 069480c6887..00000000000 --- a/db/migrate/20200825180050_add_pipeline_artifacts_size_to_root_storage_statistics.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPipelineArtifactsSizeToRootStorageStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :namespace_root_storage_statistics, :pipeline_artifacts_size, :bigint, default: 0, null: false - end - end - - def down - with_lock_retries do - remove_column :namespace_root_storage_statistics, :pipeline_artifacts_size, :bigint, default: 0, null: false - end - end -end diff --git a/db/migrate/20200826073745_add_default_to_ci_pipeline_locked.rb b/db/migrate/20200826073745_add_default_to_ci_pipeline_locked.rb deleted file mode 100644 index e73963043d5..00000000000 --- a/db/migrate/20200826073745_add_default_to_ci_pipeline_locked.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultToCiPipelineLocked < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - ARTIFACTS_LOCKED = 1 - UNLOCKED = 0 - - def up - with_lock_retries do - change_column_default :ci_pipelines, :locked, ARTIFACTS_LOCKED - end - end - - def down - with_lock_retries do - change_column_default :ci_pipelines, :locked, UNLOCKED - end - end -end diff --git a/db/migrate/20200826092324_add_projects_index_on_import_type_creator_id_created_at.rb b/db/migrate/20200826092324_add_projects_index_on_import_type_creator_id_created_at.rb deleted file mode 100644 index 5938d3c8d3a..00000000000 --- a/db/migrate/20200826092324_add_projects_index_on_import_type_creator_id_created_at.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddProjectsIndexOnImportTypeCreatorIdCreatedAt < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_imported_projects_on_import_type_creator_id_created_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, - [:import_type, :creator_id, :created_at], - where: 'import_type IS NOT NULL', - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :projects, INDEX_NAME - end -end diff --git a/db/migrate/20200826212800_add_index_on_merge_request_id_and_rule_type_to_approval_merge_request_rule.rb b/db/migrate/20200826212800_add_index_on_merge_request_id_and_rule_type_to_approval_merge_request_rule.rb deleted file mode 100644 index a40e09648ef..00000000000 --- a/db/migrate/20200826212800_add_index_on_merge_request_id_and_rule_type_to_approval_merge_request_rule.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnMergeRequestIdAndRuleTypeToApprovalMergeRequestRule < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = "approval_mr_rule_index_merge_request_id" - - def up - add_concurrent_index( - :approval_merge_request_rules, - :merge_request_id, - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index_by_name :approval_merge_request_rules, INDEX_NAME - end -end diff --git a/db/migrate/20200827005322_add_creator_id_to_packages.rb b/db/migrate/20200827005322_add_creator_id_to_packages.rb deleted file mode 100644 index ecd73ff8785..00000000000 --- a/db/migrate/20200827005322_add_creator_id_to_packages.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddCreatorIdToPackages < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column(:packages_packages, :creator_id, :integer) - end -end diff --git a/db/migrate/20200827060911_add_merge_request_foreign_key_to_merge_request_reviewers.rb b/db/migrate/20200827060911_add_merge_request_foreign_key_to_merge_request_reviewers.rb deleted file mode 100644 index 73d0eea9819..00000000000 --- a/db/migrate/20200827060911_add_merge_request_foreign_key_to_merge_request_reviewers.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddMergeRequestForeignKeyToMergeRequestReviewers < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :merge_request_reviewers, :merge_requests, column: :merge_request_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :merge_request_reviewers, column: :merge_request_id - end - end -end diff --git a/db/migrate/20200827060932_add_user_foreign_key_to_merge_request_reviewers.rb b/db/migrate/20200827060932_add_user_foreign_key_to_merge_request_reviewers.rb deleted file mode 100644 index 5463c3d9846..00000000000 --- a/db/migrate/20200827060932_add_user_foreign_key_to_merge_request_reviewers.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddUserForeignKeyToMergeRequestReviewers < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :merge_request_reviewers, :users, column: :user_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :merge_request_reviewers, column: :user_id - end - end -end diff --git a/db/migrate/20200827085101_add_seats_currently_in_use_in_gitlab_subscriptions.rb b/db/migrate/20200827085101_add_seats_currently_in_use_in_gitlab_subscriptions.rb deleted file mode 100644 index 83f2d573b6d..00000000000 --- a/db/migrate/20200827085101_add_seats_currently_in_use_in_gitlab_subscriptions.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddSeatsCurrentlyInUseInGitlabSubscriptions < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :gitlab_subscriptions, :seats_in_use, :integer, default: 0, null: false - add_column :gitlab_subscriptions, :seats_owed, :integer, default: 0, null: false - end - end - - def down - with_lock_retries do - remove_column :gitlab_subscriptions, :seats_in_use - remove_column :gitlab_subscriptions, :seats_owed - end - end -end diff --git a/db/migrate/20200827102234_add_ci_job_artifact_id_to_pages_metadata.rb b/db/migrate/20200827102234_add_ci_job_artifact_id_to_pages_metadata.rb deleted file mode 100644 index 4109c512f14..00000000000 --- a/db/migrate/20200827102234_add_ci_job_artifact_id_to_pages_metadata.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddCiJobArtifactIdToPagesMetadata < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column(:project_pages_metadata, :artifacts_archive_id, :bigint) - end -end diff --git a/db/migrate/20200827104432_add_foreign_key_to_artifacts_archive_id_in_pages_metadata.rb b/db/migrate/20200827104432_add_foreign_key_to_artifacts_archive_id_in_pages_metadata.rb deleted file mode 100644 index 90451ad597a..00000000000 --- a/db/migrate/20200827104432_add_foreign_key_to_artifacts_archive_id_in_pages_metadata.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToArtifactsArchiveIdInPagesMetadata < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = "index_project_pages_metadata_on_artifacts_archive_id" - - disable_ddl_transaction! - - def up - add_concurrent_index(:project_pages_metadata, :artifacts_archive_id, name: INDEX_NAME) - add_concurrent_foreign_key(:project_pages_metadata, :ci_job_artifacts, column: :artifacts_archive_id, on_delete: :nullify) - end - - def down - remove_foreign_key_if_exists(:project_pages_metadata, :ci_job_artifacts, column: :artifacts_archive_id) - remove_concurrent_index_by_name(:project_pages_metadata, INDEX_NAME) - end -end diff --git a/db/migrate/20200827114902_create_analytics_instance_statistics_measurements.rb b/db/migrate/20200827114902_create_analytics_instance_statistics_measurements.rb deleted file mode 100644 index f8584d4b9f6..00000000000 --- a/db/migrate/20200827114902_create_analytics_instance_statistics_measurements.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class CreateAnalyticsInstanceStatisticsMeasurements < ActiveRecord::Migration[6.0] - DOWNTIME = false - UNIQUE_INDEX_NAME = 'index_on_instance_statistics_recorded_at_and_identifier' - - def change - create_table :analytics_instance_statistics_measurements do |t| - t.bigint :count, null: false - t.datetime_with_timezone :recorded_at, null: false - t.integer :identifier, limit: 2, null: false - end - - add_index :analytics_instance_statistics_measurements, [:identifier, :recorded_at], unique: true, name: UNIQUE_INDEX_NAME - end -end diff --git a/db/migrate/20200827142811_create_merge_request_diff_details.rb b/db/migrate/20200827142811_create_merge_request_diff_details.rb deleted file mode 100644 index 29b070bc675..00000000000 --- a/db/migrate/20200827142811_create_merge_request_diff_details.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class CreateMergeRequestDiffDetails < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:merge_request_diff_details) - with_lock_retries do - create_table :merge_request_diff_details, id: false do |t| - t.references :merge_request_diff, primary_key: true, null: false, foreign_key: { on_delete: :cascade } - t.datetime_with_timezone :verification_retry_at - t.datetime_with_timezone :verified_at - t.integer :verification_retry_count, limit: 2 - t.binary :verification_checksum, using: 'verification_checksum::bytea' - t.text :verification_failure - end - end - end - - add_text_limit :merge_request_diff_details, :verification_failure, 255 - end - - def down - drop_table :merge_request_diff_details - end -end diff --git a/db/migrate/20200827150057_add_index_expire_at_to_pipeline_artifacts.rb b/db/migrate/20200827150057_add_index_expire_at_to_pipeline_artifacts.rb deleted file mode 100644 index 0a1943aa58b..00000000000 --- a/db/migrate/20200827150057_add_index_expire_at_to_pipeline_artifacts.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexExpireAtToPipelineArtifacts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_ci_pipeline_artifacts_on_expire_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_pipeline_artifacts, :expire_at, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name(:ci_pipeline_artifacts, INDEX_NAME) - end -end diff --git a/db/migrate/20200828155134_add_foreign_key_on_scan_id_to_security_scans.rb b/db/migrate/20200828155134_add_foreign_key_on_scan_id_to_security_scans.rb deleted file mode 100644 index 9d815cc75dc..00000000000 --- a/db/migrate/20200828155134_add_foreign_key_on_scan_id_to_security_scans.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyOnScanIdToSecurityScans < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :security_findings, :security_scans, column: :scan_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :security_findings, column: :scan_id - end - end -end diff --git a/db/migrate/20200828155205_add_foreign_key_on_scanner_id_to_vulnerability_scanners.rb b/db/migrate/20200828155205_add_foreign_key_on_scanner_id_to_vulnerability_scanners.rb deleted file mode 100644 index 015e83b59b1..00000000000 --- a/db/migrate/20200828155205_add_foreign_key_on_scanner_id_to_vulnerability_scanners.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyOnScannerIdToVulnerabilityScanners < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :security_findings, :vulnerability_scanners, column: :scanner_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :security_findings, column: :scanner_id - end - end -end diff --git a/db/migrate/20200830201204_add_index_to_package_creator.rb b/db/migrate/20200830201204_add_index_to_package_creator.rb deleted file mode 100644 index fbc8bbade94..00000000000 --- a/db/migrate/20200830201204_add_index_to_package_creator.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToPackageCreator < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'index_packages_packages_on_creator_id' - - def up - add_concurrent_index :packages_packages, :creator_id, name: INDEX_NAME - add_concurrent_foreign_key(:packages_packages, :users, column: :creator_id, on_delete: :nullify) - end - - def down - remove_foreign_key_if_exists(:packages_packages, :users, column: :creator_id) - remove_concurrent_index_by_name(:packages_packages, INDEX_NAME) - end -end diff --git a/db/migrate/20200831204646_add_project_feature_flags_to_plan_limits.rb b/db/migrate/20200831204646_add_project_feature_flags_to_plan_limits.rb deleted file mode 100644 index d4bd2431d9c..00000000000 --- a/db/migrate/20200831204646_add_project_feature_flags_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddProjectFeatureFlagsToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column(:plan_limits, :project_feature_flags, :integer, default: 200, null: false) - end -end diff --git a/db/migrate/20200831222347_insert_project_feature_flags_plan_limits.rb b/db/migrate/20200831222347_insert_project_feature_flags_plan_limits.rb deleted file mode 100644 index 2c91016d9dd..00000000000 --- a/db/migrate/20200831222347_insert_project_feature_flags_plan_limits.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class InsertProjectFeatureFlagsPlanLimits < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - return unless Gitlab.com? - - create_or_update_plan_limit('project_feature_flags', 'free', 50) - create_or_update_plan_limit('project_feature_flags', 'bronze', 100) - create_or_update_plan_limit('project_feature_flags', 'silver', 150) - create_or_update_plan_limit('project_feature_flags', 'gold', 200) - end - - def down - return unless Gitlab.com? - - create_or_update_plan_limit('project_feature_flags', 'free', 0) - create_or_update_plan_limit('project_feature_flags', 'bronze', 0) - create_or_update_plan_limit('project_feature_flags', 'silver', 0) - create_or_update_plan_limit('project_feature_flags', 'gold', 0) - end -end diff --git a/db/migrate/20200901203055_add_id_created_at_index_to_packages.rb b/db/migrate/20200901203055_add_id_created_at_index_to_packages.rb deleted file mode 100644 index d92309e3fef..00000000000 --- a/db/migrate/20200901203055_add_id_created_at_index_to_packages.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIdCreatedAtIndexToPackages < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'index_packages_packages_on_id_and_created_at' - - def up - add_concurrent_index :packages_packages, [:id, :created_at], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name(:packages_packages, INDEX_NAME) - end -end diff --git a/db/migrate/20200901214416_change_pypi_python_version_type.rb b/db/migrate/20200901214416_change_pypi_python_version_type.rb deleted file mode 100644 index b670b2129c2..00000000000 --- a/db/migrate/20200901214416_change_pypi_python_version_type.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class ChangePypiPythonVersionType < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - change_column_type_concurrently :packages_pypi_metadata, :required_python, :text, batch_column_name: :package_id # rubocop:disable Migration/AddLimitToTextColumns - end - - def down - cleanup_concurrent_column_type_change(:packages_pypi_metadata, :required_python) - change_column_null :packages_pypi_metadata, :required_python, false - end -end diff --git a/db/migrate/20200902135542_update_package_max_file_size_plan_limits.rb b/db/migrate/20200902135542_update_package_max_file_size_plan_limits.rb deleted file mode 100644 index 0ba8f12f89e..00000000000 --- a/db/migrate/20200902135542_update_package_max_file_size_plan_limits.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -class UpdatePackageMaxFileSizePlanLimits < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - # this is intended to be a no-op for GitLab.com - # 5GB is the value for these columns as of 2020-09-02 - if Gitlab.com? - update_all_plan_limits('conan_max_file_size', 5.gigabytes) - update_all_plan_limits('maven_max_file_size', 5.gigabytes) - update_all_plan_limits('npm_max_file_size', 5.gigabytes) - update_all_plan_limits('nuget_max_file_size', 5.gigabytes) - update_all_plan_limits('pypi_max_file_size', 5.gigabytes) - else - update_all_plan_limits('conan_max_file_size', 3.gigabytes) - update_all_plan_limits('maven_max_file_size', 3.gigabytes) - update_all_plan_limits('npm_max_file_size', 500.megabytes) - update_all_plan_limits('nuget_max_file_size', 500.megabytes) - update_all_plan_limits('pypi_max_file_size', 3.gigabytes) - end - end - - def down - update_all_plan_limits('conan_max_file_size', 50.megabytes) - update_all_plan_limits('maven_max_file_size', 50.megabytes) - update_all_plan_limits('npm_max_file_size', 50.megabytes) - update_all_plan_limits('nuget_max_file_size', 50.megabytes) - update_all_plan_limits('pypi_max_file_size', 50.megabytes) - end - - private - - def update_all_plan_limits(limit_name, limit_value) - limit_name_quoted = quote_column_name(limit_name) - limit_value_quoted = quote(limit_value) - - execute <<~SQL - UPDATE plan_limits - SET #{limit_name_quoted} = #{limit_value_quoted}; - SQL - end -end diff --git a/db/migrate/20200903054946_add_elasticsearch_client_timeout.rb b/db/migrate/20200903054946_add_elasticsearch_client_timeout.rb deleted file mode 100644 index 93e70461641..00000000000 --- a/db/migrate/20200903054946_add_elasticsearch_client_timeout.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddElasticsearchClientTimeout < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :elasticsearch_client_request_timeout, :integer, null: false, default: 0 - end -end diff --git a/db/migrate/20200903092241_add_index_to_resource_iteration_events_add_events.rb b/db/migrate/20200903092241_add_index_to_resource_iteration_events_add_events.rb deleted file mode 100644 index be530f1f9b5..00000000000 --- a/db/migrate/20200903092241_add_index_to_resource_iteration_events_add_events.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToResourceIterationEventsAddEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'index_resource_iteration_events_on_iteration_id_and_add_action' - ADD_ACTION = '1' - - def up - # Index add iteration events - add_concurrent_index :resource_iteration_events, :iteration_id, where: "action = #{ADD_ACTION}", name: INDEX_NAME - end - - def down - remove_concurrent_index :resource_iteration_events, :iteration_id, name: INDEX_NAME - end -end diff --git a/db/migrate/20200904092131_add_merge_ref_sha_to_merge_requests.rb b/db/migrate/20200904092131_add_merge_ref_sha_to_merge_requests.rb deleted file mode 100644 index a490bc8fe07..00000000000 --- a/db/migrate/20200904092131_add_merge_ref_sha_to_merge_requests.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddMergeRefShaToMergeRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :merge_requests, :merge_ref_sha, :binary - end - end - - def down - with_lock_retries do - remove_column :merge_requests, :merge_ref_sha - end - end -end diff --git a/db/migrate/20200904131544_create_ci_build_pending_states.rb b/db/migrate/20200904131544_create_ci_build_pending_states.rb deleted file mode 100644 index 2c21ce3ce32..00000000000 --- a/db/migrate/20200904131544_create_ci_build_pending_states.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class CreateCiBuildPendingStates < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :ci_build_pending_states do |t| - t.timestamps_with_timezone - t.references :build, index: { unique: true }, null: false, foreign_key: { to_table: :ci_builds, on_delete: :cascade }, type: :bigint - t.integer :state - t.integer :failure_reason - t.binary :trace_checksum - end - end - end - - def down - with_lock_retries do - drop_table :ci_build_pending_states - end - end -end diff --git a/db/migrate/20200905013247_add_golang_package_max_file_size_to_plan_limits.rb b/db/migrate/20200905013247_add_golang_package_max_file_size_to_plan_limits.rb deleted file mode 100644 index 0a6d0ce7339..00000000000 --- a/db/migrate/20200905013247_add_golang_package_max_file_size_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddGolangPackageMaxFileSizeToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column(:plan_limits, :golang_max_file_size, :bigint, default: 100.megabytes, null: false) - end -end diff --git a/db/migrate/20200907021256_create_dast_site_tokens.rb b/db/migrate/20200907021256_create_dast_site_tokens.rb deleted file mode 100644 index a8e221aef69..00000000000 --- a/db/migrate/20200907021256_create_dast_site_tokens.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -class CreateDastSiteTokens < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:dast_site_tokens) - with_lock_retries do - create_table :dast_site_tokens do |t| - t.references :project, foreign_key: { on_delete: :cascade }, null: false, index: true - - t.timestamps_with_timezone null: false - t.datetime_with_timezone :expired_at - - t.text :token, null: false, unique: true - t.text :url, null: false - end - end - end - - add_text_limit :dast_site_tokens, :token, 255 - add_text_limit :dast_site_tokens, :url, 255 - end - - def down - with_lock_retries do - drop_table :dast_site_tokens - end - end -end diff --git a/db/migrate/20200907062101_create_dast_site_validations.rb b/db/migrate/20200907062101_create_dast_site_validations.rb deleted file mode 100644 index 5ff2084d693..00000000000 --- a/db/migrate/20200907062101_create_dast_site_validations.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class CreateDastSiteValidations < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:dast_site_validations) - with_lock_retries do - create_table :dast_site_validations do |t| - t.references :dast_site_token, foreign_key: { on_delete: :cascade }, null: false, index: true - - t.timestamps_with_timezone null: false - t.datetime_with_timezone :validation_started_at - t.datetime_with_timezone :validation_passed_at - t.datetime_with_timezone :validation_failed_at - t.datetime_with_timezone :validation_last_retried_at - - t.integer :validation_strategy, null: false, limit: 2 - - t.text :url_base, null: false - t.text :url_path, null: false - end - end - end - - add_concurrent_index :dast_site_validations, :url_base - add_text_limit :dast_site_validations, :url_base, 255 - add_text_limit :dast_site_validations, :url_path, 255 - end - - def down - with_lock_retries do - drop_table :dast_site_validations - end - end -end diff --git a/db/migrate/20200907092610_add_user_id_to_group_import_states.rb b/db/migrate/20200907092610_add_user_id_to_group_import_states.rb deleted file mode 100644 index 231bafeabdb..00000000000 --- a/db/migrate/20200907092610_add_user_id_to_group_import_states.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class AddUserIdToGroupImportStates < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless column_exists?(:group_import_states, :user_id) - with_lock_retries do - add_column :group_import_states, :user_id, :bigint - end - end - - add_concurrent_foreign_key :group_import_states, :users, column: :user_id, on_delete: :cascade - add_concurrent_index :group_import_states, :user_id, where: 'user_id IS NOT NULL', name: 'index_group_import_states_on_user_id' - end - - def down - with_lock_retries do - remove_column :group_import_states, :user_id - end - end -end diff --git a/db/migrate/20200908033805_add_dast_site_validation_id_to_dast_site.rb b/db/migrate/20200908033805_add_dast_site_validation_id_to_dast_site.rb deleted file mode 100644 index 3ac86fb1d9e..00000000000 --- a/db/migrate/20200908033805_add_dast_site_validation_id_to_dast_site.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class AddDastSiteValidationIdToDastSite < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - TABLE_NAME = :dast_sites - RELATION_NAME = :dast_site_validations - FK_NAME = :dast_site_validation_id - INDEX_NAME = "index_dast_sites_on_#{FK_NAME}" - - disable_ddl_transaction! - - def up - unless column_exists?(TABLE_NAME, FK_NAME) - with_lock_retries do - add_column TABLE_NAME, FK_NAME, :bigint - end - end - - add_concurrent_index TABLE_NAME, FK_NAME, name: INDEX_NAME - add_concurrent_foreign_key TABLE_NAME, RELATION_NAME, column: FK_NAME, on_delete: :nullify - end - - def down - remove_foreign_key_if_exists TABLE_NAME, RELATION_NAME - remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME - - with_lock_retries do - remove_column TABLE_NAME, FK_NAME - end - end -end diff --git a/db/migrate/20200908094810_add_new_setting_to_namespace_setting.rb b/db/migrate/20200908094810_add_new_setting_to_namespace_setting.rb deleted file mode 100644 index 27fc93a2c53..00000000000 --- a/db/migrate/20200908094810_add_new_setting_to_namespace_setting.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddNewSettingToNamespaceSetting < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :namespace_settings, :allow_mfa_for_subgroups, :boolean, default: true, null: false - end - end - - def down - with_lock_retries do - remove_column :namespace_settings, :allow_mfa_for_subgroups - end - end -end diff --git a/db/migrate/20200908100053_create_authentication_events.rb b/db/migrate/20200908100053_create_authentication_events.rb deleted file mode 100644 index 2ea9f4e24af..00000000000 --- a/db/migrate/20200908100053_create_authentication_events.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class CreateAuthenticationEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:authentication_events) - with_lock_retries do - create_table :authentication_events do |t| - t.datetime_with_timezone :created_at, null: false - t.references :user, foreign_key: { on_delete: :nullify }, index: true - t.integer :result, limit: 2, null: false - t.inet :ip_address - t.text :provider, null: false, index: true - t.text :user_name, null: false - end - end - end - - add_text_limit :authentication_events, :provider, 64 - add_text_limit :authentication_events, :user_name, 255 - end - - def down - with_lock_retries do - drop_table :authentication_events - end - end -end diff --git a/db/migrate/20200908183231_add_check_positive_constraint_to_ci_platform_metrics.rb b/db/migrate/20200908183231_add_check_positive_constraint_to_ci_platform_metrics.rb deleted file mode 100644 index 8593e03b5d8..00000000000 --- a/db/migrate/20200908183231_add_check_positive_constraint_to_ci_platform_metrics.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddCheckPositiveConstraintToCiPlatformMetrics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - CONSTRAINT_NAME = 'ci_platform_metrics_check_count_positive' - - def up - add_check_constraint :ci_platform_metrics, 'count > 0', CONSTRAINT_NAME - end - - def down - remove_check_constraint :ci_platform_metrics, CONSTRAINT_NAME - end -end diff --git a/db/migrate/20200908212414_add_feature_flag_events_to_web_hooks.rb b/db/migrate/20200908212414_add_feature_flag_events_to_web_hooks.rb deleted file mode 100644 index 40e2b37b390..00000000000 --- a/db/migrate/20200908212414_add_feature_flag_events_to_web_hooks.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddFeatureFlagEventsToWebHooks < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :web_hooks, :feature_flag_events, :boolean, null: false, default: false - end -end diff --git a/db/migrate/20200909040555_create_package_events.rb b/db/migrate/20200909040555_create_package_events.rb deleted file mode 100644 index 000ff051a7c..00000000000 --- a/db/migrate/20200909040555_create_package_events.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CreatePackageEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def change - create_table :packages_events do |t| - t.integer :event_type, null: false, limit: 2 - t.integer :event_scope, null: false, limit: 2 - t.integer :originator_type, null: false, limit: 2 - t.bigint :originator - t.datetime_with_timezone :created_at, null: false - - t.references :package, primary_key: false, default: nil, index: true, foreign_key: { to_table: :packages_packages, on_delete: :nullify }, type: :bigint - end - end -end diff --git a/db/migrate/20200909083339_add_change_reviewer_merge_request_to_notification_settings.rb b/db/migrate/20200909083339_add_change_reviewer_merge_request_to_notification_settings.rb deleted file mode 100644 index 7024cc4a263..00000000000 --- a/db/migrate/20200909083339_add_change_reviewer_merge_request_to_notification_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddChangeReviewerMergeRequestToNotificationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :notification_settings, :change_reviewer_merge_request, :boolean - end -end diff --git a/db/migrate/20200911120132_create_pages_deployments.rb b/db/migrate/20200911120132_create_pages_deployments.rb deleted file mode 100644 index 25327a76900..00000000000 --- a/db/migrate/20200911120132_create_pages_deployments.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class CreatePagesDeployments < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :pages_deployments, if_not_exists: true do |t| - t.timestamps_with_timezone - - t.bigint :project_id, index: true, null: false - t.bigint :ci_build_id, index: true - - t.integer :file_store, null: false, limit: 2 - t.integer :size, null: false - t.text :file, null: false - end - - add_text_limit :pages_deployments, :file, 255 - end - - def down - drop_table :pages_deployments - end -end diff --git a/db/migrate/20200911121027_add_pages_deployment_project_foreign_key.rb b/db/migrate/20200911121027_add_pages_deployment_project_foreign_key.rb deleted file mode 100644 index 665b9de9230..00000000000 --- a/db/migrate/20200911121027_add_pages_deployment_project_foreign_key.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPagesDeploymentProjectForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :pages_deployments, :projects, column: :project_id, on_delete: :cascade - end - end - - def down - with_lock_retries do - remove_foreign_key :pages_deployments, column: :project_id - end - end -end diff --git a/db/migrate/20200911121048_add_pages_deployment_ci_build_foreign_key.rb b/db/migrate/20200911121048_add_pages_deployment_ci_build_foreign_key.rb deleted file mode 100644 index 83f38b2fae3..00000000000 --- a/db/migrate/20200911121048_add_pages_deployment_ci_build_foreign_key.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPagesDeploymentCiBuildForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :pages_deployments, :ci_builds, column: :ci_build_id, on_delete: :nullify - end - end - - def down - with_lock_retries do - remove_foreign_key :pages_deployments, column: :ci_build_id - end - end -end diff --git a/db/migrate/20200912152943_rename_admin_notification_email_application_setting.rb b/db/migrate/20200912152943_rename_admin_notification_email_application_setting.rb deleted file mode 100644 index b469099014d..00000000000 --- a/db/migrate/20200912152943_rename_admin_notification_email_application_setting.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RenameAdminNotificationEmailApplicationSetting < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - rename_column_concurrently :application_settings, :admin_notification_email, :abuse_notification_email - end - - def down - undo_rename_column_concurrently :application_settings, :admin_notification_email, :abuse_notification_email - end -end diff --git a/db/migrate/20200912193210_add_scheduling_issues_temp_indexes.rb b/db/migrate/20200912193210_add_scheduling_issues_temp_indexes.rb deleted file mode 100644 index bc2b8d4ce97..00000000000 --- a/db/migrate/20200912193210_add_scheduling_issues_temp_indexes.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddSchedulingIssuesTempIndexes < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :issue_links, [:source_id], where: 'link_type = 1', name: 'tmp_idx_blocking_type_links' - add_concurrent_index :issue_links, [:target_id], where: 'link_type = 2', name: 'tmp_idx_blocked_by_type_links' - add_concurrent_index :issues, :id, where: '(state_id = 1 AND blocking_issues_count = 0)', name: 'tmp_idx_index_issues_with_outdate_blocking_count' - end - - def down - remove_concurrent_index_by_name(:issue_links, 'tmp_idx_blocking_type_links') - remove_concurrent_index_by_name(:issue_links, 'tmp_idx_blocked_by_type_links') - remove_concurrent_index_by_name(:issues, 'tmp_idx_index_issues_with_outdate_blocking_count') - end -end diff --git a/db/migrate/20200913115700_add_kroki_application_settings.rb b/db/migrate/20200913115700_add_kroki_application_settings.rb deleted file mode 100644 index 84d490c2980..00000000000 --- a/db/migrate/20200913115700_add_kroki_application_settings.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddKrokiApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20201011005400_add_text_limit_to_application_settings_kroki_url.rb - # - def change - add_column :application_settings, :kroki_url, :text - add_column :application_settings, :kroki_enabled, :boolean, default: false, null: false - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20200914070140_add_expiration_policy_started_at_to_container_repositories.rb b/db/migrate/20200914070140_add_expiration_policy_started_at_to_container_repositories.rb deleted file mode 100644 index fa787fe98b0..00000000000 --- a/db/migrate/20200914070140_add_expiration_policy_started_at_to_container_repositories.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddExpirationPolicyStartedAtToContainerRepositories < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column(:container_repositories, :expiration_policy_started_at, :datetime_with_timezone) - end - - def down - remove_column(:container_repositories, :expiration_policy_started_at) - end -end diff --git a/db/migrate/20200914091326_change_build_pending_state_enums.rb b/db/migrate/20200914091326_change_build_pending_state_enums.rb deleted file mode 100644 index dadb15e8844..00000000000 --- a/db/migrate/20200914091326_change_build_pending_state_enums.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class ChangeBuildPendingStateEnums < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - change_column :ci_build_pending_states, :state, :integer, limit: 2 - change_column :ci_build_pending_states, :failure_reason, :integer, limit: 2 - end - - def down - change_column :ci_build_pending_states, :state, :integer - change_column :ci_build_pending_states, :failure_reason, :integer - end -end diff --git a/db/migrate/20200914104642_modify_merge_request_api_index.rb b/db/migrate/20200914104642_modify_merge_request_api_index.rb deleted file mode 100644 index c21404a10c2..00000000000 --- a/db/migrate/20200914104642_modify_merge_request_api_index.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class ModifyMergeRequestApiIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_requests, [:target_project_id, :created_at, :id], name: :index_merge_requests_on_target_project_id_and_created_at_and_id - end - - def down - remove_concurrent_index :merge_requests, [:target_project_id, :created_at, :id], name: :index_merge_requests_on_target_project_id_and_created_at_and_id - end -end diff --git a/db/migrate/20200914105202_remove_old_merge_request_api_index.rb b/db/migrate/20200914105202_remove_old_merge_request_api_index.rb deleted file mode 100644 index 826833dbfb2..00000000000 --- a/db/migrate/20200914105202_remove_old_merge_request_api_index.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveOldMergeRequestApiIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index :merge_requests, [:target_project_id, :created_at], name: :index_merge_requests_target_project_id_created_at - end - - def down - add_concurrent_index :merge_requests, [:target_project_id, :created_at], name: :index_merge_requests_target_project_id_created_at - end -end diff --git a/db/migrate/20200914155135_add_deduplicated_flag_into_security_findings_table.rb b/db/migrate/20200914155135_add_deduplicated_flag_into_security_findings_table.rb deleted file mode 100644 index f403c2d9a07..00000000000 --- a/db/migrate/20200914155135_add_deduplicated_flag_into_security_findings_table.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddDeduplicatedFlagIntoSecurityFindingsTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :security_findings, :deduplicated, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20200914183227_add_index_on_deduplicated_column_of_security_findings.rb b/db/migrate/20200914183227_add_index_on_deduplicated_column_of_security_findings.rb deleted file mode 100644 index 1d0f656df4d..00000000000 --- a/db/migrate/20200914183227_add_index_on_deduplicated_column_of_security_findings.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnDeduplicatedColumnOfSecurityFindings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_security_findings_on_scan_id_and_deduplicated' - - disable_ddl_transaction! - - def up - add_concurrent_index :security_findings, [:scan_id, :deduplicated], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :security_findings, INDEX_NAME - end -end diff --git a/db/migrate/20200914184212_remove_index_on_security_findings_scan_id.rb b/db/migrate/20200914184212_remove_index_on_security_findings_scan_id.rb deleted file mode 100644 index 342dba537d5..00000000000 --- a/db/migrate/20200914184212_remove_index_on_security_findings_scan_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexOnSecurityFindingsScanId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_security_findings_on_scan_id' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :security_findings, INDEX_NAME - end - - def down - add_concurrent_index :security_findings, :scan_id, name: INDEX_NAME - end -end diff --git a/db/migrate/20200915134004_add_indices_to_approval_project_rules.rb b/db/migrate/20200915134004_add_indices_to_approval_project_rules.rb deleted file mode 100644 index b7b0e1da2cb..00000000000 --- a/db/migrate/20200915134004_add_indices_to_approval_project_rules.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddIndicesToApprovalProjectRules < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - RULE_TYPE_INDEX_NAME = 'index_approval_project_rules_on_id_with_regular_type' - RULE_ID_INDEX_NAME = 'index_approval_project_rules_users_on_approval_project_rule_id' - - def up - add_concurrent_index :approval_project_rules, :id, where: 'rule_type = 0', name: RULE_TYPE_INDEX_NAME - add_concurrent_index :approval_project_rules_users, :approval_project_rule_id, name: RULE_ID_INDEX_NAME - end - - def down - remove_concurrent_index :approval_project_rules, :id, where: 'rule_type = 0', name: RULE_TYPE_INDEX_NAME - remove_concurrent_index :approval_project_rules_users, :approval_project_rule_id, name: RULE_ID_INDEX_NAME - end -end diff --git a/db/migrate/20200915152641_add_verification_state_to_terraform_state_version.rb b/db/migrate/20200915152641_add_verification_state_to_terraform_state_version.rb deleted file mode 100644 index 9cc9a702397..00000000000 --- a/db/migrate/20200915152641_add_verification_state_to_terraform_state_version.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddVerificationStateToTerraformStateVersion < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_table(:terraform_state_versions) do |t| - t.integer :verification_retry_count, limit: 2 - t.column :verification_retry_at, :datetime_with_timezone - t.column :verified_at, :datetime_with_timezone - t.binary :verification_checksum, using: 'verification_checksum::bytea' - - # rubocop:disable Migration/AddLimitToTextColumns - t.text :verification_failure - # rubocop:enable Migration/AddLimitToTextColumns - end - end -end diff --git a/db/migrate/20200915164448_add_verification_failure_limit_to_terraform_state_version.rb b/db/migrate/20200915164448_add_verification_failure_limit_to_terraform_state_version.rb deleted file mode 100644 index 810057a5f54..00000000000 --- a/db/migrate/20200915164448_add_verification_failure_limit_to_terraform_state_version.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddVerificationFailureLimitToTerraformStateVersion < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - CONSTRAINT_NAME = 'tf_state_versions_verification_failure_text_limit' - - def up - add_text_limit :terraform_state_versions, :verification_failure, 255, constraint_name: CONSTRAINT_NAME - end - - def down - remove_check_constraint(:terraform_state_versions, CONSTRAINT_NAME) - end -end diff --git a/db/migrate/20200915164844_add_verification_failure_index_to_terraform_state_version.rb b/db/migrate/20200915164844_add_verification_failure_index_to_terraform_state_version.rb deleted file mode 100644 index 423484e74bb..00000000000 --- a/db/migrate/20200915164844_add_verification_failure_index_to_terraform_state_version.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class AddVerificationFailureIndexToTerraformStateVersion < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - FAILURE_INDEX_NAME = 'terraform_state_versions_verification_failure_partial' - CHECKSUM_INDEX_NAME = 'terraform_state_versions_verification_checksum_partial' - - disable_ddl_transaction! - - def up - add_concurrent_index :terraform_state_versions, :verification_failure, - where: "(verification_failure IS NOT NULL)", - name: FAILURE_INDEX_NAME - add_concurrent_index :terraform_state_versions, :verification_checksum, - where: "(verification_checksum IS NOT NULL)", - name: CHECKSUM_INDEX_NAME - end - - def down - remove_concurrent_index_by_name :terraform_state_versions, FAILURE_INDEX_NAME - remove_concurrent_index_by_name :terraform_state_versions, CHECKSUM_INDEX_NAME - end -end diff --git a/db/migrate/20200916120837_add_index_to_members_for_unaccepted_invitations.rb b/db/migrate/20200916120837_add_index_to_members_for_unaccepted_invitations.rb deleted file mode 100644 index 3b0e4b99eb5..00000000000 --- a/db/migrate/20200916120837_add_index_to_members_for_unaccepted_invitations.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToMembersForUnacceptedInvitations < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = 'idx_members_created_at_user_id_invite_token' - INDEX_SCOPE = 'invite_token IS NOT NULL AND user_id IS NULL' - - disable_ddl_transaction! - - def up - add_concurrent_index(:members, :created_at, where: INDEX_SCOPE, name: INDEX_NAME) - end - - def down - remove_concurrent_index(:members, :created_at, where: INDEX_SCOPE, name: INDEX_NAME) - end -end diff --git a/db/migrate/20200916135044_add_state_id_index_to_merge_requests.rb b/db/migrate/20200916135044_add_state_id_index_to_merge_requests.rb deleted file mode 100644 index bec162ff888..00000000000 --- a/db/migrate/20200916135044_add_state_id_index_to_merge_requests.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddStateIdIndexToMergeRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_requests, [:target_project_id, :iid, :state_id], name: :index_merge_requests_on_target_project_id_and_iid_and_state_id - end - - def down - remove_concurrent_index :merge_requests, [:target_project_id, :iid, :state_id], name: :index_merge_requests_on_target_project_id_and_iid_and_state_id - end -end diff --git a/db/migrate/20200916151442_add_result_index_to_authentication_events.rb b/db/migrate/20200916151442_add_result_index_to_authentication_events.rb deleted file mode 100644 index 13b0521038e..00000000000 --- a/db/migrate/20200916151442_add_result_index_to_authentication_events.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddResultIndexToAuthenticationEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_authentication_events_on_provider_user_id_created_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :authentication_events, [:provider, :user_id, :created_at], where: 'result = 1', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :authentication_events, INDEX_NAME - end -end diff --git a/db/migrate/20200916165232_add_debian_max_file_size_to_plan_limits.rb b/db/migrate/20200916165232_add_debian_max_file_size_to_plan_limits.rb deleted file mode 100644 index 9a91a5d2195..00000000000 --- a/db/migrate/20200916165232_add_debian_max_file_size_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddDebianMaxFileSizeToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :plan_limits, :debian_max_file_size, :bigint, default: 3.gigabytes, null: false - end -end diff --git a/db/migrate/20200917121650_add_help_page_documentation_url_to_application_settings.rb b/db/migrate/20200917121650_add_help_page_documentation_url_to_application_settings.rb deleted file mode 100644 index 21259b633b1..00000000000 --- a/db/migrate/20200917121650_add_help_page_documentation_url_to_application_settings.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddHelpPageDocumentationUrlToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20200921113722_add_text_limit_to_help_page_documentation_url.rb - def change - add_column :application_settings, :help_page_documentation_base_url, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20200919200318_add_default_branch_name_to_namespace_settings.rb b/db/migrate/20200919200318_add_default_branch_name_to_namespace_settings.rb deleted file mode 100644 index c8c856c7533..00000000000 --- a/db/migrate/20200919200318_add_default_branch_name_to_namespace_settings.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultBranchNameToNamespaceSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - - # limit is added in 20200919204155_add_text_limit_to_namespace_settings_default_branch_name - # - def change - add_column :namespace_settings, :default_branch_name, :text - end - - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20200919204155_add_text_limit_to_namespace_settings_default_branch_name.rb b/db/migrate/20200919204155_add_text_limit_to_namespace_settings_default_branch_name.rb deleted file mode 100644 index 174a1a9c556..00000000000 --- a/db/migrate/20200919204155_add_text_limit_to_namespace_settings_default_branch_name.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToNamespaceSettingsDefaultBranchName < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :namespace_settings, :default_branch_name, 255 - end - - def down - # Down is required as `add_text_limit` is not reversible - # - remove_text_limit :namespace_settings, :default_branch_name - end -end diff --git a/db/migrate/20200920130356_add_container_expiration_policy_worker_settings_to_application_settings.rb b/db/migrate/20200920130356_add_container_expiration_policy_worker_settings_to_application_settings.rb deleted file mode 100644 index 7501f150283..00000000000 --- a/db/migrate/20200920130356_add_container_expiration_policy_worker_settings_to_application_settings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddContainerExpirationPolicyWorkerSettingsToApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - unless column_exists?(:application_settings, :container_registry_expiration_policies_worker_capacity) - add_column(:application_settings, :container_registry_expiration_policies_worker_capacity, :integer, default: 0, null: false) - end - end - - def down - if column_exists?(:application_settings, :container_registry_expiration_policies_worker_capacity) - remove_column(:application_settings, :container_registry_expiration_policies_worker_capacity) - end - end -end diff --git a/db/migrate/20200921093826_add_index_to_user_preferences.rb b/db/migrate/20200921093826_add_index_to_user_preferences.rb deleted file mode 100644 index 78b04eb7a83..00000000000 --- a/db/migrate/20200921093826_add_index_to_user_preferences.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToUserPreferences < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :user_preferences, :gitpod_enabled, name: :index_user_preferences_on_gitpod_enabled - end - - def down - remove_concurrent_index :user_preferences, :gitpod_enabled, name: :index_user_preferences_on_gitpod_enabled - end -end diff --git a/db/migrate/20200921113722_add_text_limit_to_help_page_documentation_url.rb b/db/migrate/20200921113722_add_text_limit_to_help_page_documentation_url.rb deleted file mode 100644 index a262ea559a5..00000000000 --- a/db/migrate/20200921113722_add_text_limit_to_help_page_documentation_url.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToHelpPageDocumentationUrl < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :help_page_documentation_base_url, 255 - end - - def down - remove_text_limit :application_settings, :help_page_documentation_base_url - end -end diff --git a/db/migrate/20200921130028_add_pages_deployment_id_to_pages_metadata.rb b/db/migrate/20200921130028_add_pages_deployment_id_to_pages_metadata.rb deleted file mode 100644 index 395ce43d8ac..00000000000 --- a/db/migrate/20200921130028_add_pages_deployment_id_to_pages_metadata.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPagesDeploymentIdToPagesMetadata < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :project_pages_metadata, :pages_deployment_id, :bigint - end -end diff --git a/db/migrate/20200921131313_add_foreign_key_to_pages_deployment_id_in_project_pages_metadata.rb b/db/migrate/20200921131313_add_foreign_key_to_pages_deployment_id_in_project_pages_metadata.rb deleted file mode 100644 index 8611f3ab943..00000000000 --- a/db/migrate/20200921131313_add_foreign_key_to_pages_deployment_id_in_project_pages_metadata.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToPagesDeploymentIdInProjectPagesMetadata < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_project_pages_metadata_on_pages_deployment_id' - - disable_ddl_transaction! - - def up - add_concurrent_index(:project_pages_metadata, :pages_deployment_id, name: INDEX_NAME) - add_concurrent_foreign_key :project_pages_metadata, :pages_deployments, column: :pages_deployment_id, on_delete: :nullify - end - - def down - remove_foreign_key_if_exists :project_pages_metadata, column: :pages_deployment_id - remove_concurrent_index_by_name(:project_pages_metadata, INDEX_NAME) - end -end diff --git a/db/migrate/20200921203231_remove_duplicate_cluster_agents_index.rb b/db/migrate/20200921203231_remove_duplicate_cluster_agents_index.rb deleted file mode 100644 index 3f073e32d84..00000000000 --- a/db/migrate/20200921203231_remove_duplicate_cluster_agents_index.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveDuplicateClusterAgentsIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX = 'index_cluster_agents_on_project_id' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :cluster_agents, INDEX - end - - def down - add_concurrent_index :cluster_agents, :project_id, name: INDEX - end -end diff --git a/db/migrate/20200922052316_create_issue_email_participants.rb b/db/migrate/20200922052316_create_issue_email_participants.rb deleted file mode 100644 index a8aeb9d9a5a..00000000000 --- a/db/migrate/20200922052316_create_issue_email_participants.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class CreateIssueEmailParticipants < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:issue_email_participants) - with_lock_retries do - create_table :issue_email_participants do |t| - t.references :issue, index: false, null: false, foreign_key: { on_delete: :cascade } - t.datetime_with_timezone :created_at, null: false - t.datetime_with_timezone :updated_at, null: false - t.text :email, null: false - - t.index [:issue_id, :email], unique: true - end - end - - add_text_limit(:issue_email_participants, :email, 255) - end - end - - def down - with_lock_retries do - drop_table :issue_email_participants - end - end -end diff --git a/db/migrate/20200922075244_add_compliance_framework_model.rb b/db/migrate/20200922075244_add_compliance_framework_model.rb deleted file mode 100644 index 376482d9005..00000000000 --- a/db/migrate/20200922075244_add_compliance_framework_model.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class AddComplianceFrameworkModel < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:compliance_management_frameworks) - with_lock_retries do - create_table :compliance_management_frameworks do |t| - t.references :group, foreign_key: { to_table: :namespaces, on_delete: :cascade }, null: false, index: false - t.text :name, null: false - t.text :description, null: false - t.text :color, null: false - t.index [:group_id, :name], unique: true - end - end - end - - add_text_limit :compliance_management_frameworks, :name, 255 - add_text_limit :compliance_management_frameworks, :description, 255 - add_text_limit :compliance_management_frameworks, :color, 10 - end - - def down - with_lock_retries do - drop_table :compliance_management_frameworks - end - end -end diff --git a/db/migrate/20200922093004_add_postgres_index_view.rb b/db/migrate/20200922093004_add_postgres_index_view.rb deleted file mode 100644 index c16eae4dd0b..00000000000 --- a/db/migrate/20200922093004_add_postgres_index_view.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class AddPostgresIndexView < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute(<<~SQL) - CREATE VIEW postgres_indexes AS - SELECT - pg_namespace.nspname || '.' || pg_class.relname as identifier, - pg_index.indexrelid, - pg_namespace.nspname as schema, - pg_class.relname as name, - pg_index.indisunique as unique, - pg_index.indisvalid as valid_index, - pg_class.relispartition as partitioned, - pg_index.indisexclusion as exclusion, - pg_indexes.indexdef as definition, - pg_relation_size(pg_class.oid) as ondisk_size_bytes - FROM pg_index - INNER JOIN pg_class ON pg_class.oid = pg_index.indexrelid - INNER JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid - INNER JOIN pg_indexes ON pg_class.relname = pg_indexes.indexname - WHERE pg_namespace.nspname <> 'pg_catalog' - SQL - end - - def down - execute(<<~SQL) - DROP VIEW postgres_indexes - SQL - end -end diff --git a/db/migrate/20200922133949_create_bulk_import.rb b/db/migrate/20200922133949_create_bulk_import.rb deleted file mode 100644 index 29d770d13ff..00000000000 --- a/db/migrate/20200922133949_create_bulk_import.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class CreateBulkImport < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :bulk_imports do |t| - t.references :user, type: :integer, index: true, null: false, foreign_key: { on_delete: :cascade } - - t.integer :source_type, null: false, limit: 2 - t.integer :status, null: false, limit: 2 - - t.timestamps_with_timezone - end - end - end - - def down - with_lock_retries do - drop_table :bulk_imports - end - end -end diff --git a/db/migrate/20200923071622_add_description_to_requirements.rb b/db/migrate/20200923071622_add_description_to_requirements.rb deleted file mode 100644 index b4b1250c10a..00000000000 --- a/db/migrate/20200923071622_add_description_to_requirements.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddDescriptionToRequirements < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # limit for description is added in 20200923071644_add_text_limit_to_requirements_description - # for description_html limit is not set because it's for caching purposes and - # its value is generated from `description` - def change - add_column :requirements, :description, :text - add_column :requirements, :description_html, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20200923071644_add_text_limit_to_requirements_description.rb b/db/migrate/20200923071644_add_text_limit_to_requirements_description.rb deleted file mode 100644 index 0172d6bbba3..00000000000 --- a/db/migrate/20200923071644_add_text_limit_to_requirements_description.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToRequirementsDescription < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :requirements, :description, 10_000 - end - - def down - remove_text_limit :requirements, :description - end -end diff --git a/db/migrate/20200923102312_update_programming_language_colors.rb b/db/migrate/20200923102312_update_programming_language_colors.rb deleted file mode 100644 index 37233bd3148..00000000000 --- a/db/migrate/20200923102312_update_programming_language_colors.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -require 'yaml' - -class UpdateProgrammingLanguageColors < ActiveRecord::Migration[6.0] - DOWNTIME = false - - class ProgrammingLanguage < ActiveRecord::Base; end - - def up - YAML.load_file("vendor/languages.yml").each do |name, metadata| - color = metadata["color"] - next unless color.present? - - ProgrammingLanguage.where(name: name).update(color: color) - end - end - - def down - # noop - end -end diff --git a/db/migrate/20200923130057_remove_tmp_container_scanning_index.rb b/db/migrate/20200923130057_remove_tmp_container_scanning_index.rb deleted file mode 100644 index e9ab6f9ff15..00000000000 --- a/db/migrate/20200923130057_remove_tmp_container_scanning_index.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class RemoveTmpContainerScanningIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'tmp_index_for_fixing_inconsistent_vulnerability_occurrences' - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name(:vulnerability_occurrences, INDEX_NAME) - end - - def down - # report_type: 2 container scanning - add_concurrent_index(:vulnerability_occurrences, :id, - where: "LENGTH(location_fingerprint) = 40 AND report_type = 2", - name: INDEX_NAME) - end -end diff --git a/db/migrate/20200923140404_add_postgres_reindex_actions_table.rb b/db/migrate/20200923140404_add_postgres_reindex_actions_table.rb deleted file mode 100644 index ed37e44e201..00000000000 --- a/db/migrate/20200923140404_add_postgres_reindex_actions_table.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class AddPostgresReindexActionsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :postgres_reindex_actions, if_not_exists: true do |t| - t.datetime_with_timezone :action_start, null: false - t.datetime_with_timezone :action_end - t.bigint :ondisk_size_bytes_start, null: false - t.bigint :ondisk_size_bytes_end - t.integer :state, limit: 2, null: false, default: 0 - t.text :index_identifier, null: false, index: true - end - - add_text_limit(:postgres_reindex_actions, :index_identifier, 255) - end - - def down - drop_table :postgres_reindex_actions - end -end diff --git a/db/migrate/20200924035825_add_options_to_dast_scanner_profile.rb b/db/migrate/20200924035825_add_options_to_dast_scanner_profile.rb deleted file mode 100644 index 588ce8fada7..00000000000 --- a/db/migrate/20200924035825_add_options_to_dast_scanner_profile.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddOptionsToDastScannerProfile < ActiveRecord::Migration[6.0] - DOWNTIME = false - - PASSIVE_SCAN_ENUM_VALUE = 1 - - def change - add_column :dast_scanner_profiles, :scan_type, :integer, limit: 2, default: PASSIVE_SCAN_ENUM_VALUE, null: false - add_column :dast_scanner_profiles, :use_ajax_spider, :boolean, default: false, null: false - add_column :dast_scanner_profiles, :show_debug_messages, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20200925112104_create_bulk_import_configurations.rb b/db/migrate/20200925112104_create_bulk_import_configurations.rb deleted file mode 100644 index b894cdeefbc..00000000000 --- a/db/migrate/20200925112104_create_bulk_import_configurations.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class CreateBulkImportConfigurations < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :bulk_import_configurations, if_not_exists: true do |t| - t.references :bulk_import, type: :integer, index: true, null: false, foreign_key: { on_delete: :cascade } - - t.text :encrypted_url # rubocop: disable Migration/AddLimitToTextColumns - t.text :encrypted_url_iv # rubocop: disable Migration/AddLimitToTextColumns - - t.text :encrypted_access_token # rubocop: disable Migration/AddLimitToTextColumns - t.text :encrypted_access_token_iv # rubocop: disable Migration/AddLimitToTextColumns - - t.timestamps_with_timezone - end - end - - def down - drop_table :bulk_import_configurations - end -end diff --git a/db/migrate/20200925114522_create_bulk_import_entities.rb b/db/migrate/20200925114522_create_bulk_import_entities.rb deleted file mode 100644 index c78c4aee9ae..00000000000 --- a/db/migrate/20200925114522_create_bulk_import_entities.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -class CreateBulkImportEntities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :bulk_import_entities, if_not_exists: true do |t| - t.bigint :bulk_import_id, index: true, null: false - t.bigint :parent_id, index: true - t.bigint :namespace_id, index: true - t.bigint :project_id, index: true - - t.integer :source_type, null: false, limit: 2 - t.text :source_full_path, null: false - - t.text :destination_name, null: false - t.text :destination_namespace, null: false - - t.integer :status, null: false, limit: 2 - t.text :jid - - t.timestamps_with_timezone - end - - add_text_limit(:bulk_import_entities, :source_full_path, 255) - add_text_limit(:bulk_import_entities, :destination_name, 255) - add_text_limit(:bulk_import_entities, :destination_namespace, 255) - add_text_limit(:bulk_import_entities, :jid, 255) - end - - def down - drop_table :bulk_import_entities - end -end diff --git a/db/migrate/20200925125321_add_u2f_id_to_webauthn_registration.rb b/db/migrate/20200925125321_add_u2f_id_to_webauthn_registration.rb deleted file mode 100644 index 8a352fc6e9f..00000000000 --- a/db/migrate/20200925125321_add_u2f_id_to_webauthn_registration.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddU2fIdToWebauthnRegistration < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def change - add_column :webauthn_registrations, :u2f_registration_id, :integer - end -end diff --git a/db/migrate/20200925153423_add_bulk_import_foreign_key_to_bulk_import_entities.rb b/db/migrate/20200925153423_add_bulk_import_foreign_key_to_bulk_import_entities.rb deleted file mode 100644 index fca4070d990..00000000000 --- a/db/migrate/20200925153423_add_bulk_import_foreign_key_to_bulk_import_entities.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddBulkImportForeignKeyToBulkImportEntities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :bulk_import_entities, :bulk_imports, column: :bulk_import_id, on_delete: :cascade - end - - def down - remove_foreign_key :bulk_import_entities, column: :bulk_import_id - end -end diff --git a/db/migrate/20200925193815_add_parent_foreign_key_to_bulk_import_entities.rb b/db/migrate/20200925193815_add_parent_foreign_key_to_bulk_import_entities.rb deleted file mode 100644 index 37e38c384b8..00000000000 --- a/db/migrate/20200925193815_add_parent_foreign_key_to_bulk_import_entities.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddParentForeignKeyToBulkImportEntities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :bulk_import_entities, :bulk_import_entities, column: :parent_id, on_delete: :cascade - end - - def down - remove_foreign_key :bulk_import_entities, column: :parent_id - end -end diff --git a/db/migrate/20200925193906_add_namespace_foreign_key_to_bulk_import_entities.rb b/db/migrate/20200925193906_add_namespace_foreign_key_to_bulk_import_entities.rb deleted file mode 100644 index 13212395488..00000000000 --- a/db/migrate/20200925193906_add_namespace_foreign_key_to_bulk_import_entities.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddNamespaceForeignKeyToBulkImportEntities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :bulk_import_entities, :namespaces, column: :namespace_id - end - - def down - with_lock_retries do - remove_foreign_key :bulk_import_entities, column: :namespace_id - end - end -end diff --git a/db/migrate/20200925194006_add_project_foreign_key_to_bulk_import_entities.rb b/db/migrate/20200925194006_add_project_foreign_key_to_bulk_import_entities.rb deleted file mode 100644 index 975f2b1ef4a..00000000000 --- a/db/migrate/20200925194006_add_project_foreign_key_to_bulk_import_entities.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddProjectForeignKeyToBulkImportEntities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :bulk_import_entities, :projects, column: :project_id - end - - def down - with_lock_retries do - remove_foreign_key :bulk_import_entities, column: :project_id - end - end -end diff --git a/db/migrate/20200927224750_add_incident_issue_type_index_to_issues.rb b/db/migrate/20200927224750_add_incident_issue_type_index_to_issues.rb deleted file mode 100644 index ed4dd5b9cc1..00000000000 --- a/db/migrate/20200927224750_add_incident_issue_type_index_to_issues.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddIncidentIssueTypeIndexToIssues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INCIDENT_ISSUE_TYPE = 1 - INDEX_NAME = 'index_issues_project_id_issue_type_incident' - - def up - add_concurrent_index :issues, :project_id, where: "issue_type = #{INCIDENT_ISSUE_TYPE}", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name(:issues, INDEX_NAME) - end -end diff --git a/db/migrate/20200928095732_add_state_to_dast_site_validation.rb b/db/migrate/20200928095732_add_state_to_dast_site_validation.rb deleted file mode 100644 index 7adeef54d71..00000000000 --- a/db/migrate/20200928095732_add_state_to_dast_site_validation.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddStateToDastSiteValidation < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20200928100408_add_text_limit_to_dast_site_validation_state.rb - def change - add_column :dast_site_validations, :state, :text, default: :pending, null: false - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20200928100408_add_text_limit_to_dast_site_validation_state.rb b/db/migrate/20200928100408_add_text_limit_to_dast_site_validation_state.rb deleted file mode 100644 index 18bf7ee4bdc..00000000000 --- a/db/migrate/20200928100408_add_text_limit_to_dast_site_validation_state.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToDastSiteValidationState < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :dast_site_validations, :state, 255 - end - - def down - remove_text_limit :dast_site_validations, :state - end -end diff --git a/db/migrate/20200928123510_add_expiration_policy_cleanup_status_to_container_repositories.rb b/db/migrate/20200928123510_add_expiration_policy_cleanup_status_to_container_repositories.rb deleted file mode 100644 index 4d611a56e9c..00000000000 --- a/db/migrate/20200928123510_add_expiration_policy_cleanup_status_to_container_repositories.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class AddExpirationPolicyCleanupStatusToContainerRepositories < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'idx_container_repositories_on_exp_cleanup_status_and_start_date' - - disable_ddl_transaction! - - def up - unless column_exists?(:container_repositories, :expiration_policy_cleanup_status) - add_column(:container_repositories, :expiration_policy_cleanup_status, :integer, limit: 2, default: 0, null: false) - end - - add_concurrent_index(:container_repositories, [:expiration_policy_cleanup_status, :expiration_policy_started_at], name: INDEX_NAME) - end - - def down - remove_concurrent_index(:container_repositories, [:expiration_policy_cleanup_status, :expiration_policy_started_at], name: INDEX_NAME) - - if column_exists?(:container_repositories, :expiration_policy_cleanup_status) - remove_column(:container_repositories, :expiration_policy_cleanup_status) - end - end -end diff --git a/db/migrate/20200928125258_add_foreign_key_to_u2f_reg_id_in_webauthn_regs.rb b/db/migrate/20200928125258_add_foreign_key_to_u2f_reg_id_in_webauthn_regs.rb deleted file mode 100644 index b76b826658e..00000000000 --- a/db/migrate/20200928125258_add_foreign_key_to_u2f_reg_id_in_webauthn_regs.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToU2fRegIdInWebauthnRegs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_webauthn_registrations_on_u2f_registration_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :webauthn_registrations, :u2f_registration_id, where: 'u2f_registration_id IS NOT NULL', name: INDEX_NAME - add_concurrent_foreign_key :webauthn_registrations, :u2f_registrations, column: :u2f_registration_id, on_delete: :cascade - end - - def down - remove_foreign_key_if_exists :webauthn_registrations, column: :u2f_registration_id - remove_concurrent_index_by_name(:webauthn_registrations, INDEX_NAME) - end -end diff --git a/db/migrate/20200928131934_create_required_code_owners_sections.rb b/db/migrate/20200928131934_create_required_code_owners_sections.rb deleted file mode 100644 index f2dfd4007e5..00000000000 --- a/db/migrate/20200928131934_create_required_code_owners_sections.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class CreateRequiredCodeOwnersSections < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - create_table :required_code_owners_sections, if_not_exists: true do |t| - t.references :protected_branch, null: false, foreign_key: { on_delete: :cascade } - t.text :name, null: false - end - end - - add_text_limit :required_code_owners_sections, :name, 1024 - end - - def down - with_lock_retries do - drop_table :required_code_owners_sections, if_exists: true - end - end -end diff --git a/db/migrate/20200928164807_add_index_on_vulnerabilities_state_case.rb b/db/migrate/20200928164807_add_index_on_vulnerabilities_state_case.rb deleted file mode 100644 index 7bfae7377d7..00000000000 --- a/db/migrate/20200928164807_add_index_on_vulnerabilities_state_case.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnVulnerabilitiesStateCase < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_vulnerabilities_on_state_case_id' - STATE_ORDER_ARRAY_POSITION = 'ARRAY_POSITION(ARRAY[1, 4, 3, 2]::smallint[], state)' - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerabilities, "#{STATE_ORDER_ARRAY_POSITION}, id DESC", name: INDEX_NAME - add_concurrent_index :vulnerabilities, "#{STATE_ORDER_ARRAY_POSITION} DESC, id DESC", name: "#{INDEX_NAME}_desc" - end - - def down - remove_concurrent_index_by_name :vulnerabilities, "#{INDEX_NAME}_desc" - remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME - end -end diff --git a/db/migrate/20200928203531_create_alert_management_http_integrations.rb b/db/migrate/20200928203531_create_alert_management_http_integrations.rb deleted file mode 100644 index fe13fe400e3..00000000000 --- a/db/migrate/20200928203531_create_alert_management_http_integrations.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class CreateAlertManagementHttpIntegrations < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - UNIQUE_INDEX = 'index_http_integrations_on_active_and_project_and_endpoint' - - disable_ddl_transaction! - - def up - create_table :alert_management_http_integrations, if_not_exists: true do |t| - t.timestamps_with_timezone - t.bigint :project_id, index: true, null: false - t.boolean :active, null: false, default: false - t.text :encrypted_token, null: false - t.text :encrypted_token_iv, null: false - t.text :endpoint_identifier, null: false - t.text :name, null: false - end - - add_text_limit :alert_management_http_integrations, :encrypted_token, 255 - add_text_limit :alert_management_http_integrations, :encrypted_token_iv, 255 - add_text_limit :alert_management_http_integrations, :endpoint_identifier, 255 - add_text_limit :alert_management_http_integrations, :name, 255 - - add_index :alert_management_http_integrations, - [:active, :project_id, :endpoint_identifier], - unique: true, - name: UNIQUE_INDEX, - where: 'active' - end - - def down - drop_table :alert_management_http_integrations - end -end diff --git a/db/migrate/20200928210524_add_http_integrations_project_foreign_key.rb b/db/migrate/20200928210524_add_http_integrations_project_foreign_key.rb deleted file mode 100644 index f59a5a0b5bb..00000000000 --- a/db/migrate/20200928210524_add_http_integrations_project_foreign_key.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddHttpIntegrationsProjectForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_foreign_key :alert_management_http_integrations, :projects, column: :project_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey - end - end - - def down - with_lock_retries do - remove_foreign_key :alert_management_http_integrations, column: :project_id - end - end -end diff --git a/db/migrate/20200928233632_remove_terraform_state_verification_indexes.rb b/db/migrate/20200928233632_remove_terraform_state_verification_indexes.rb deleted file mode 100644 index b5a7bb5e39d..00000000000 --- a/db/migrate/20200928233632_remove_terraform_state_verification_indexes.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RemoveTerraformStateVerificationIndexes < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CHECKSUM_INDEX_NAME = "terraform_states_verification_checksum_partial" - FAILURE_INDEX_NAME = "terraform_states_verification_failure_partial" - - disable_ddl_transaction! - - def up - remove_concurrent_index :terraform_states, :verification_failure, name: FAILURE_INDEX_NAME - remove_concurrent_index :terraform_states, :verification_checksum, name: CHECKSUM_INDEX_NAME - end - - def down - add_concurrent_index :terraform_states, :verification_failure, where: "(verification_failure IS NOT NULL)", name: FAILURE_INDEX_NAME - add_concurrent_index :terraform_states, :verification_checksum, where: "(verification_checksum IS NOT NULL)", name: CHECKSUM_INDEX_NAME - end -end diff --git a/db/migrate/20200929032729_add_sla_minutes_to_project_incident_management_settings.rb b/db/migrate/20200929032729_add_sla_minutes_to_project_incident_management_settings.rb deleted file mode 100644 index 2848cdf8fcd..00000000000 --- a/db/migrate/20200929032729_add_sla_minutes_to_project_incident_management_settings.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddSlaMinutesToProjectIncidentManagementSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :project_incident_management_settings, :sla_timer, :boolean, default: false - add_column :project_incident_management_settings, :sla_timer_minutes, :integer - end -end diff --git a/db/migrate/20200929063159_add_require_admin_approval_after_user_signup_to_application_settings.rb b/db/migrate/20200929063159_add_require_admin_approval_after_user_signup_to_application_settings.rb deleted file mode 100644 index 92d82757b79..00000000000 --- a/db/migrate/20200929063159_add_require_admin_approval_after_user_signup_to_application_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddRequireAdminApprovalAfterUserSignupToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :require_admin_approval_after_user_signup, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20200930094812_update_postgres_indexes_view.rb b/db/migrate/20200930094812_update_postgres_indexes_view.rb deleted file mode 100644 index b36ea362e6f..00000000000 --- a/db/migrate/20200930094812_update_postgres_indexes_view.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -class UpdatePostgresIndexesView < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute(<<~SQL) - CREATE OR REPLACE VIEW postgres_indexes AS - SELECT - pg_namespace.nspname || '.' || pg_class.relname as identifier, - pg_index.indexrelid, - pg_namespace.nspname as schema, - pg_class.relname as name, - pg_index.indisunique as unique, - pg_index.indisvalid as valid_index, - pg_class.relispartition as partitioned, - pg_index.indisexclusion as exclusion, - pg_indexes.indexdef as definition, - pg_relation_size(pg_class.oid) as ondisk_size_bytes - FROM pg_index - INNER JOIN pg_class ON pg_class.oid = pg_index.indexrelid - INNER JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid - INNER JOIN pg_indexes ON pg_class.relname = pg_indexes.indexname - WHERE pg_namespace.nspname <> 'pg_catalog' - AND pg_namespace.nspname IN ( - current_schema(), - 'gitlab_partitions_dynamic', - 'gitlab_partitions_static' - ) - SQL - end - - def down - execute(<<~SQL) - CREATE OR REPLACE VIEW postgres_indexes AS - SELECT - pg_namespace.nspname || '.' || pg_class.relname as identifier, - pg_index.indexrelid, - pg_namespace.nspname as schema, - pg_class.relname as name, - pg_index.indisunique as unique, - pg_index.indisvalid as valid_index, - pg_class.relispartition as partitioned, - pg_index.indisexclusion as exclusion, - pg_indexes.indexdef as definition, - pg_relation_size(pg_class.oid) as ondisk_size_bytes - FROM pg_index - INNER JOIN pg_class ON pg_class.oid = pg_index.indexrelid - INNER JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid - INNER JOIN pg_indexes ON pg_class.relname = pg_indexes.indexname - WHERE pg_namespace.nspname <> 'pg_catalog' - SQL - end -end diff --git a/db/migrate/20200930131343_add_index_on_project_id_and_sha_to_deployments.rb b/db/migrate/20200930131343_add_index_on_project_id_and_sha_to_deployments.rb deleted file mode 100644 index 19a536f8f6e..00000000000 --- a/db/migrate/20200930131343_add_index_on_project_id_and_sha_to_deployments.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddIndexOnProjectIdAndShaToDeployments < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - INDEX_NAME = 'index_deployments_on_project_id_sha' - - disable_ddl_transaction! - - def up - add_concurrent_index :deployments, [:project_id, :sha], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name(:deployments, INDEX_NAME) - end -end diff --git a/db/migrate/20200930132319_add_api_fuzzing_to_plan_limits.rb b/db/migrate/20200930132319_add_api_fuzzing_to_plan_limits.rb deleted file mode 100644 index 9be79974ee4..00000000000 --- a/db/migrate/20200930132319_add_api_fuzzing_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddApiFuzzingToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :plan_limits, "ci_max_artifact_size_api_fuzzing", :integer, default: 0, null: false - end -end diff --git a/db/migrate/20201002012659_add_issuable_sla_table.rb b/db/migrate/20201002012659_add_issuable_sla_table.rb deleted file mode 100644 index c43187bf93a..00000000000 --- a/db/migrate/20201002012659_add_issuable_sla_table.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddIssuableSlaTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :issuable_slas do |t| - t.references :issue, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade } - t.datetime_with_timezone :due_at, null: false - end - end -end diff --git a/db/migrate/20201004163918_remove_project_id_and_id_index_from_vulnerabilities_table.rb b/db/migrate/20201004163918_remove_project_id_and_id_index_from_vulnerabilities_table.rb deleted file mode 100644 index 73028b6b795..00000000000 --- a/db/migrate/20201004163918_remove_project_id_and_id_index_from_vulnerabilities_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RemoveProjectIdAndIdIndexFromVulnerabilitiesTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_vulnerabilities_on_project_id_and_id' - - disable_ddl_transaction! - - def up - Gitlab::BackgroundMigration.steal('PopulateResolvedOnDefaultBranchColumn') - remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME - end - - def down - add_concurrent_index :vulnerabilities, [:project_id, :id], name: INDEX_NAME - end -end diff --git a/db/migrate/20201005092703_add_namespace_column_to_frameworks.rb b/db/migrate/20201005092703_add_namespace_column_to_frameworks.rb deleted file mode 100644 index b7a9866e50b..00000000000 --- a/db/migrate/20201005092703_add_namespace_column_to_frameworks.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class AddNamespaceColumnToFrameworks < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'idx_on_compliance_management_frameworks_namespace_id_name' - - disable_ddl_transaction! - - def up - unless column_exists?(:compliance_management_frameworks, :namespace_id) - add_column(:compliance_management_frameworks, :namespace_id, :integer) - end - - add_concurrent_foreign_key(:compliance_management_frameworks, :namespaces, column: :namespace_id, on_delete: :cascade) - add_concurrent_index(:compliance_management_frameworks, [:namespace_id, :name], unique: true, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(:compliance_management_frameworks, INDEX_NAME) - remove_foreign_key_if_exists(:compliance_management_frameworks, :namespaces, column: :namespace_id) - - remove_column(:compliance_management_frameworks, :namespace_id) - end -end diff --git a/db/migrate/20201005092709_remove_compliance_frameworks_group_id_fk.rb b/db/migrate/20201005092709_remove_compliance_frameworks_group_id_fk.rb deleted file mode 100644 index dcbe48c03f9..00000000000 --- a/db/migrate/20201005092709_remove_compliance_frameworks_group_id_fk.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -class RemoveComplianceFrameworksGroupIdFk < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_compliance_management_frameworks_on_group_id_and_name' - - class TmpComplianceFramework < ActiveRecord::Base - self.table_name = 'compliance_management_frameworks' - - include EachBatch - end - - disable_ddl_transaction! - - def up - TmpComplianceFramework.each_batch(of: 100) do |query| - query.update_all('namespace_id = group_id') # Copy data in case we rolled back before... - end - - change_column_null(:compliance_management_frameworks, :group_id, true) - - remove_foreign_key_if_exists(:compliance_management_frameworks, :namespaces, column: :group_id) - remove_concurrent_index_by_name(:compliance_management_frameworks, INDEX_NAME) - end - - def down - # This is just to make the rollback possible - TmpComplianceFramework.each_batch(of: 100) do |query| - query.update_all('group_id = namespace_id') # The group_id column is not in used at all - end - - change_column_null(:compliance_management_frameworks, :group_id, false) - - add_concurrent_foreign_key(:compliance_management_frameworks, :namespaces, column: :group_id, on_delete: :cascade) - add_concurrent_index(:compliance_management_frameworks, [:group_id, :name], unique: true, name: INDEX_NAME) - end -end diff --git a/db/migrate/20201005092753_add_framework_id_to_project_framework_settings.rb b/db/migrate/20201005092753_add_framework_id_to_project_framework_settings.rb deleted file mode 100644 index f9ac12dcfd2..00000000000 --- a/db/migrate/20201005092753_add_framework_id_to_project_framework_settings.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -class AddFrameworkIdToProjectFrameworkSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless column_exists?(:project_compliance_framework_settings, :framework_id) - with_lock_retries do - add_column(:project_compliance_framework_settings, :framework_id, :bigint) - end - end - - add_concurrent_index(:project_compliance_framework_settings, :framework_id) - - add_concurrent_foreign_key( - :project_compliance_framework_settings, - :compliance_management_frameworks, - column: :framework_id, - on_delete: :cascade - ) - end - - def down - remove_foreign_key_if_exists(:project_compliance_framework_settings, :compliance_management_frameworks, column: :framework_id) - - with_lock_retries do - remove_column(:project_compliance_framework_settings, :framework_id) - end - end -end diff --git a/db/migrate/20201006014605_add_automatic_purchased_storage_allocation_to_application_settings.rb b/db/migrate/20201006014605_add_automatic_purchased_storage_allocation_to_application_settings.rb deleted file mode 100644 index f88bd177b98..00000000000 --- a/db/migrate/20201006014605_add_automatic_purchased_storage_allocation_to_application_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddAutomaticPurchasedStorageAllocationToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :automatic_purchased_storage_allocation, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20201007033527_add_daily_invites_to_plan_limits.rb b/db/migrate/20201007033527_add_daily_invites_to_plan_limits.rb deleted file mode 100644 index 8f0079cd639..00000000000 --- a/db/migrate/20201007033527_add_daily_invites_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddDailyInvitesToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column(:plan_limits, :daily_invites, :integer, default: 0, null: false) - end -end diff --git a/db/migrate/20201007033723_insert_daily_invites_plan_limits.rb b/db/migrate/20201007033723_insert_daily_invites_plan_limits.rb deleted file mode 100644 index dcdcbbb0964..00000000000 --- a/db/migrate/20201007033723_insert_daily_invites_plan_limits.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class InsertDailyInvitesPlanLimits < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - return unless Gitlab.com? - - create_or_update_plan_limit('daily_invites', 'free', 20) - create_or_update_plan_limit('daily_invites', 'bronze', 0) - create_or_update_plan_limit('daily_invites', 'silver', 0) - create_or_update_plan_limit('daily_invites', 'gold', 0) - end - - def down - return unless Gitlab.com? - - create_or_update_plan_limit('daily_invites', 'free', 0) - create_or_update_plan_limit('daily_invites', 'bronze', 0) - create_or_update_plan_limit('daily_invites', 'silver', 0) - create_or_update_plan_limit('daily_invites', 'gold', 0) - end -end diff --git a/db/migrate/20201007115209_add_lock_version_to_ci_build_trace_chunk.rb b/db/migrate/20201007115209_add_lock_version_to_ci_build_trace_chunk.rb deleted file mode 100644 index fdef5e2f52a..00000000000 --- a/db/migrate/20201007115209_add_lock_version_to_ci_build_trace_chunk.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddLockVersionToCiBuildTraceChunk < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :ci_build_trace_chunks, :lock_version, :integer, default: 0, null: false - end -end diff --git a/db/migrate/20201008011523_add_ci_jwt_signing_key_to_application_settings.rb b/db/migrate/20201008011523_add_ci_jwt_signing_key_to_application_settings.rb deleted file mode 100644 index c51f7e8b706..00000000000 --- a/db/migrate/20201008011523_add_ci_jwt_signing_key_to_application_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddCiJwtSigningKeyToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20201001011937_add_text_limit_to_application_settings_encrypted_ci_jwt_signing_key_iv - def change - add_column :application_settings, :encrypted_ci_jwt_signing_key, :text - add_column :application_settings, :encrypted_ci_jwt_signing_key_iv, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20201008011937_add_text_limit_to_application_settings_encrypted_ci_jwt_signing_key_iv.rb b/db/migrate/20201008011937_add_text_limit_to_application_settings_encrypted_ci_jwt_signing_key_iv.rb deleted file mode 100644 index 39f6eb2106a..00000000000 --- a/db/migrate/20201008011937_add_text_limit_to_application_settings_encrypted_ci_jwt_signing_key_iv.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToApplicationSettingsEncryptedCiJwtSigningKeyIv < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :encrypted_ci_jwt_signing_key_iv, 255 - end - - def down - remove_text_limit :application_settings, :encrypted_ci_jwt_signing_key_iv - end -end diff --git a/db/migrate/20201008013434_generate_ci_jwt_signing_key.rb b/db/migrate/20201008013434_generate_ci_jwt_signing_key.rb deleted file mode 100644 index 5d7b6349fe6..00000000000 --- a/db/migrate/20201008013434_generate_ci_jwt_signing_key.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class GenerateCiJwtSigningKey < ActiveRecord::Migration[6.0] - DOWNTIME = false - - class ApplicationSetting < ActiveRecord::Base - self.table_name = 'application_settings' - - attr_encrypted :ci_jwt_signing_key, { - mode: :per_attribute_iv, - key: Gitlab::Utils.ensure_utf8_size(Rails.application.secrets.db_key_base, bytes: 32.bytes), - algorithm: 'aes-256-gcm', - encode: true - } - end - - def up - ApplicationSetting.reset_column_information - - ApplicationSetting.find_each do |application_setting| - application_setting.update(ci_jwt_signing_key: OpenSSL::PKey::RSA.new(2048).to_pem) - end - end - - def down - ApplicationSetting.reset_column_information - - ApplicationSetting.find_each do |application_setting| - application_setting.update_columns(encrypted_ci_jwt_signing_key: nil, encrypted_ci_jwt_signing_key_iv: nil) - end - end -end diff --git a/db/migrate/20201008075620_add_releases_events_to_web_hooks.rb b/db/migrate/20201008075620_add_releases_events_to_web_hooks.rb deleted file mode 100644 index f6df213f162..00000000000 --- a/db/migrate/20201008075620_add_releases_events_to_web_hooks.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddReleasesEventsToWebHooks < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :web_hooks, :releases_events, :boolean, null: false, default: false - end -end diff --git a/db/migrate/20201008125643_create_csv_issue_imports.rb b/db/migrate/20201008125643_create_csv_issue_imports.rb deleted file mode 100644 index be3206af6d8..00000000000 --- a/db/migrate/20201008125643_create_csv_issue_imports.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateCsvIssueImports < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - create_table :csv_issue_imports do |t| - t.bigint :project_id, null: false, index: true - t.bigint :user_id, null: false, index: true - - t.timestamps_with_timezone - end - end - - def down - drop_table :csv_issue_imports - end -end diff --git a/db/migrate/20201008144854_set_regex_defaults_on_container_expiration_policies.rb b/db/migrate/20201008144854_set_regex_defaults_on_container_expiration_policies.rb deleted file mode 100644 index 45c411fc238..00000000000 --- a/db/migrate/20201008144854_set_regex_defaults_on_container_expiration_policies.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class SetRegexDefaultsOnContainerExpirationPolicies < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :container_expiration_policies, :name_regex, '.*' - change_column_default :container_expiration_policies, :enabled, false - end - end - - def down - with_lock_retries do - change_column_default :container_expiration_policies, :name_regex, nil - change_column_default :container_expiration_policies, :enabled, true - end - end -end diff --git a/db/migrate/20201008224441_add_position_into_security_findings.rb b/db/migrate/20201008224441_add_position_into_security_findings.rb deleted file mode 100644 index ee6d5370f83..00000000000 --- a/db/migrate/20201008224441_add_position_into_security_findings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPositionIntoSecurityFindings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :security_findings, :position, :integer - end - end - - def down - with_lock_retries do - remove_column :security_findings, :position - end - end -end diff --git a/db/migrate/20201009090954_add_index_with_project_id_to_container_expiration_policies.rb b/db/migrate/20201009090954_add_index_with_project_id_to_container_expiration_policies.rb deleted file mode 100644 index ec44d5ddcef..00000000000 --- a/db/migrate/20201009090954_add_index_with_project_id_to_container_expiration_policies.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexWithProjectIdToContainerExpirationPolicies < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = 'idx_container_exp_policies_on_project_id_next_run_at_enabled' - - disable_ddl_transaction! - - def up - add_concurrent_index :container_expiration_policies, [:project_id, :next_run_at, :enabled], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :container_expiration_policies, INDEX_NAME - end -end diff --git a/db/migrate/20201011005400_add_text_limit_to_application_settings_kroki_url.rb b/db/migrate/20201011005400_add_text_limit_to_application_settings_kroki_url.rb deleted file mode 100644 index 96427cc3454..00000000000 --- a/db/migrate/20201011005400_add_text_limit_to_application_settings_kroki_url.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToApplicationSettingsKrokiUrl < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :kroki_url, 1024 - end - - def down - # Down is required as `add_text_limit` is not reversible - # - remove_text_limit :application_settings, :kroki_url - end -end diff --git a/db/migrate/20201012073022_remove_not_null_constraint_on_framework.rb b/db/migrate/20201012073022_remove_not_null_constraint_on_framework.rb deleted file mode 100644 index b8cc8984575..00000000000 --- a/db/migrate/20201012073022_remove_not_null_constraint_on_framework.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class RemoveNotNullConstraintOnFramework < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - GDPR_FRAMEWORK_ID = 1 - - disable_ddl_transaction! - - class TmpComplianceProjectFrameworkSetting < ActiveRecord::Base - self.table_name = 'project_compliance_framework_settings' - self.primary_key = :project_id - - include EachBatch - end - - def up - change_column_null :project_compliance_framework_settings, :framework, true - end - - def down - # Custom frameworks cannot be rolled back easily since we don't have enum for them. - # To make the database consistent, we mark them as GDPR framework. - # Note: framework customization will be implemented in the next 1-3 releases so data - # corruption due to the rollback is unlikely. - TmpComplianceProjectFrameworkSetting.each_batch(of: 100) do |query| - query.where(framework: nil).update_all(framework: GDPR_FRAMEWORK_ID) - end - - change_column_null :project_compliance_framework_settings, :framework, false - end -end diff --git a/db/migrate/20201012122428_add_container_registry_expiration_policies_worker_capacity_constraint.rb b/db/migrate/20201012122428_add_container_registry_expiration_policies_worker_capacity_constraint.rb deleted file mode 100644 index e4f7d1309a3..00000000000 --- a/db/migrate/20201012122428_add_container_registry_expiration_policies_worker_capacity_constraint.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddContainerRegistryExpirationPoliciesWorkerCapacityConstraint < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - CONSTRAINT_NAME = 'app_settings_registry_exp_policies_worker_capacity_positive' - - disable_ddl_transaction! - - def up - add_check_constraint :application_settings, 'container_registry_expiration_policies_worker_capacity >= 0', CONSTRAINT_NAME - end - - def down - remove_check_constraint :application_settings, CONSTRAINT_NAME - end -end diff --git a/db/migrate/20201012134230_create_ci_test_cases.rb b/db/migrate/20201012134230_create_ci_test_cases.rb deleted file mode 100644 index fd1bcaf1093..00000000000 --- a/db/migrate/20201012134230_create_ci_test_cases.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class CreateCiTestCases < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:ci_test_cases) - create_table :ci_test_cases do |t| - t.bigint :project_id, null: false - t.text :key_hash, null: false - - t.index [:project_id, :key_hash], unique: true - # NOTE: FK for projects will be added on a separate migration as per guidelines - end - end - - add_text_limit :ci_test_cases, :key_hash, 64 - end - - def down - drop_table :ci_test_cases - end -end diff --git a/db/migrate/20201012135330_create_ci_test_case_failures.rb b/db/migrate/20201012135330_create_ci_test_case_failures.rb deleted file mode 100644 index 7eaf7b5256d..00000000000 --- a/db/migrate/20201012135330_create_ci_test_case_failures.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class CreateCiTestCaseFailures < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - create_table :ci_test_case_failures do |t| - t.datetime_with_timezone :failed_at - t.bigint :test_case_id, null: false - t.bigint :build_id, null: false - - t.index [:test_case_id, :failed_at, :build_id], name: 'index_test_case_failures_unique_columns', unique: true, order: { failed_at: :desc } - t.index :build_id - t.foreign_key :ci_test_cases, column: :test_case_id, on_delete: :cascade - # NOTE: FK for ci_builds will be added on a separate migration as per guidelines - end - end - - def down - drop_table :ci_test_case_failures - end -end diff --git a/db/migrate/20201012140110_add_projects_fk_to_ci_test_cases.rb b/db/migrate/20201012140110_add_projects_fk_to_ci_test_cases.rb deleted file mode 100644 index d30b332e41a..00000000000 --- a/db/migrate/20201012140110_add_projects_fk_to_ci_test_cases.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddProjectsFkToCiTestCases < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :ci_test_cases, :projects, column: :project_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :ci_test_cases, column: :project_id - end - end -end diff --git a/db/migrate/20201012140452_add_ci_builds_fk_to_ci_test_case_failures.rb b/db/migrate/20201012140452_add_ci_builds_fk_to_ci_test_case_failures.rb deleted file mode 100644 index 0f2fdf071fa..00000000000 --- a/db/migrate/20201012140452_add_ci_builds_fk_to_ci_test_case_failures.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddCiBuildsFkToCiTestCaseFailures < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :ci_test_case_failures, :ci_builds, column: :build_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :ci_test_case_failures, column: :build_id - end - end -end diff --git a/db/migrate/20201012194936_create_saml_group_links.rb b/db/migrate/20201012194936_create_saml_group_links.rb deleted file mode 100644 index d47c383afef..00000000000 --- a/db/migrate/20201012194936_create_saml_group_links.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class CreateSamlGroupLinks < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - create_table :saml_group_links, if_not_exists: true do |t| - t.integer :access_level, null: false, limit: 2 - t.references :group, index: false, foreign_key: { to_table: :namespaces, on_delete: :cascade }, null: false - t.timestamps_with_timezone - t.text :saml_group_name, null: false - - t.index [:group_id, :saml_group_name], unique: true - end - end - - add_text_limit :saml_group_links, :saml_group_name, 255 - end - - def down - with_lock_retries do - drop_table :saml_group_links - end - end -end diff --git a/db/migrate/20201014163633_specify_primary_key_where_missing.rb b/db/migrate/20201014163633_specify_primary_key_where_missing.rb deleted file mode 100644 index bca111dacf2..00000000000 --- a/db/migrate/20201014163633_specify_primary_key_where_missing.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -class SpecifyPrimaryKeyWhereMissing < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - TABLES = { - project_authorizations: [:index_project_authorizations_on_user_id_project_id_access_level, %i(user_id project_id access_level)], - analytics_language_trend_repository_languages: [:analytics_repository_languages_unique_index, %i(programming_language_id project_id snapshot_date)], - approval_project_rules_protected_branches: [:index_approval_project_rules_protected_branches_unique, %i(approval_project_rule_id protected_branch_id)], - ci_build_trace_sections: [:index_ci_build_trace_sections_on_build_id_and_section_name_id, %i(build_id section_name_id)], - deployment_merge_requests: [:idx_deployment_merge_requests_unique_index, %i(deployment_id merge_request_id)], - issue_assignees: [:index_issue_assignees_on_issue_id_and_user_id, %i(issue_id user_id)], - issues_prometheus_alert_events: [:issue_id_prometheus_alert_event_id_index, %i(issue_id prometheus_alert_event_id)], - issues_self_managed_prometheus_alert_events: [:issue_id_self_managed_prometheus_alert_event_id_index, %i(issue_id self_managed_prometheus_alert_event_id)], - merge_request_diff_commits: [:index_merge_request_diff_commits_on_mr_diff_id_and_order, %i(merge_request_diff_id relative_order)], - merge_request_diff_files: [:index_merge_request_diff_files_on_mr_diff_id_and_order, %i(merge_request_diff_id relative_order)], - milestone_releases: [:index_miletone_releases_on_milestone_and_release, %i(milestone_id release_id)], - project_pages_metadata: [:index_project_pages_metadata_on_project_id, %i(project_id)], - push_event_payloads: [:index_push_event_payloads_on_event_id, %i(event_id)], - repository_languages: [:index_repository_languages_on_project_and_languages_id, %i(project_id programming_language_id)], - user_interacted_projects: [:index_user_interacted_projects_on_project_id_and_user_id, %i(project_id user_id)], - users_security_dashboard_projects: [:users_security_dashboard_projects_unique_index, %i(project_id user_id)] - }.freeze - - def up - TABLES.each do |table, (unique_index, _)| - with_lock_retries do - execute "ALTER TABLE #{table} ADD CONSTRAINT #{table}_pkey PRIMARY KEY USING INDEX #{unique_index}" if index_exists_by_name?(table, unique_index) - end - end - end - - def down - TABLES.each do |table, (unique_index, columns)| - add_concurrent_index table, columns, name: unique_index, unique: true - - with_lock_retries do - execute "ALTER TABLE #{table} DROP CONSTRAINT #{table}_pkey" - end - end - end -end diff --git a/db/migrate/20201014205300_drop_backfill_jira_tracker_deployment_type_jobs.rb b/db/migrate/20201014205300_drop_backfill_jira_tracker_deployment_type_jobs.rb deleted file mode 100644 index c26636444af..00000000000 --- a/db/migrate/20201014205300_drop_backfill_jira_tracker_deployment_type_jobs.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class DropBackfillJiraTrackerDeploymentTypeJobs < ActiveRecord::Migration[6.0] - DOWNTIME = false - DROPPED_JOB_CLASS = 'BackfillJiraTrackerDeploymentType' - QUEUE = 'background_migration' - - def up - sidekiq_queues.each do |queue| - queue.each do |job| - next unless job.args.first == DROPPED_JOB_CLASS - - job.delete - end - end - end - - def down - # no-op - end - - def sidekiq_queues - [Sidekiq::ScheduledSet.new, Sidekiq::RetrySet.new, Sidekiq::Queue.new(QUEUE)] - end -end diff --git a/db/migrate/20201015121805_add_project_foreign_key_to_csv_issue_imports.rb b/db/migrate/20201015121805_add_project_foreign_key_to_csv_issue_imports.rb deleted file mode 100644 index 9476d2d55bd..00000000000 --- a/db/migrate/20201015121805_add_project_foreign_key_to_csv_issue_imports.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddProjectForeignKeyToCsvIssueImports < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :csv_issue_imports, :projects, column: :project_id - end - - def down - with_lock_retries do - remove_foreign_key :csv_issue_imports, column: :project_id - end - end -end diff --git a/db/migrate/20201015121825_add_user_foreign_key_to_csv_issue_imports.rb b/db/migrate/20201015121825_add_user_foreign_key_to_csv_issue_imports.rb deleted file mode 100644 index ae91695bff4..00000000000 --- a/db/migrate/20201015121825_add_user_foreign_key_to_csv_issue_imports.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddUserForeignKeyToCsvIssueImports < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :csv_issue_imports, :users, column: :user_id - end - - def down - with_lock_retries do - remove_foreign_key :csv_issue_imports, column: :user_id - end - end -end diff --git a/db/migrate/20201015194852_add_index_on_state_for_dast_site_validations.rb b/db/migrate/20201015194852_add_index_on_state_for_dast_site_validations.rb deleted file mode 100644 index 785d7c8829c..00000000000 --- a/db/migrate/20201015194852_add_index_on_state_for_dast_site_validations.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnStateForDastSiteValidations < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - OLD_INDEX_NAME = 'index_dast_site_validations_on_url_base' - NEW_INDEX_NAME = 'index_dast_site_validations_on_url_base_and_state' - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :dast_site_validations, [:url_base, :state], name: NEW_INDEX_NAME - remove_concurrent_index_by_name :dast_site_validations, OLD_INDEX_NAME - end - - def down - add_concurrent_index :dast_site_validations, :url_base, name: OLD_INDEX_NAME - remove_concurrent_index_by_name :dast_site_validations, NEW_INDEX_NAME - end -end diff --git a/db/migrate/20201015231049_add_ci_build_id_to_terraform_state_versions.rb b/db/migrate/20201015231049_add_ci_build_id_to_terraform_state_versions.rb deleted file mode 100644 index 539b2af5fc4..00000000000 --- a/db/migrate/20201015231049_add_ci_build_id_to_terraform_state_versions.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class AddCiBuildIdToTerraformStateVersions < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_terraform_state_versions_on_ci_build_id' - - disable_ddl_transaction! - - def up - unless column_exists?(:terraform_state_versions, :ci_build_id) - add_column :terraform_state_versions, :ci_build_id, :bigint - end - - add_concurrent_index :terraform_state_versions, :ci_build_id, name: INDEX_NAME - add_concurrent_foreign_key :terraform_state_versions, :ci_builds, column: :ci_build_id, on_delete: :nullify - end - - def down - with_lock_retries do - remove_foreign_key_if_exists :terraform_state_versions, :ci_builds, column: :ci_build_id - end - - remove_concurrent_index_by_name :terraform_state_versions, INDEX_NAME - remove_column :terraform_state_versions, :ci_build_id - end -end diff --git a/db/migrate/20201016074302_add_index_project_id_and_id_to_container_repositories.rb b/db/migrate/20201016074302_add_index_project_id_and_id_to_container_repositories.rb deleted file mode 100644 index b2e7c62ba0c..00000000000 --- a/db/migrate/20201016074302_add_index_project_id_and_id_to_container_repositories.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexProjectIdAndIdToContainerRepositories < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_container_repositories_on_project_id_and_id' - - disable_ddl_transaction! - - def up - add_concurrent_index(:container_repositories, [:project_id, :id], name: INDEX_NAME) - end - - def down - remove_concurrent_index(:container_repositories, [:project_id, :id], name: INDEX_NAME) - end -end diff --git a/db/migrate/20201019091307_add_unique_index_on_scan_id_and_position_of_security_findings.rb b/db/migrate/20201019091307_add_unique_index_on_scan_id_and_position_of_security_findings.rb deleted file mode 100644 index 3303e41d8a1..00000000000 --- a/db/migrate/20201019091307_add_unique_index_on_scan_id_and_position_of_security_findings.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueIndexOnScanIdAndPositionOfSecurityFindings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_security_findings_on_scan_id_and_position' - - disable_ddl_transaction! - - def up - add_concurrent_index :security_findings, [:scan_id, :position], unique: true, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :security_findings, INDEX_NAME - end -end diff --git a/db/migrate/20201019101549_add_es_custom_analyzers_settings.rb b/db/migrate/20201019101549_add_es_custom_analyzers_settings.rb deleted file mode 100644 index 47fd9ebbb8e..00000000000 --- a/db/migrate/20201019101549_add_es_custom_analyzers_settings.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddEsCustomAnalyzersSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :elasticsearch_analyzers_smartcn_enabled, :bool, null: false, default: false - add_column :application_settings, :elasticsearch_analyzers_smartcn_search, :bool, null: false, default: false - add_column :application_settings, :elasticsearch_analyzers_kuromoji_enabled, :bool, null: false, default: false - add_column :application_settings, :elasticsearch_analyzers_kuromoji_search, :bool, null: false, default: false - end -end diff --git a/db/migrate/20201019111952_add_sha256_and_filecount_to_pages_deployments.rb b/db/migrate/20201019111952_add_sha256_and_filecount_to_pages_deployments.rb deleted file mode 100644 index 1921701626d..00000000000 --- a/db/migrate/20201019111952_add_sha256_and_filecount_to_pages_deployments.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddSha256AndFilecountToPagesDeployments < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - # pages_deployments were never enabled on any production/staging - # environments, so we safely delete them for people who enabled - # them locally - execute "DELETE FROM pages_deployments" - - # rubocop:disable Rails/NotNullColumn - add_column :pages_deployments, :file_count, :integer, null: false - add_column :pages_deployments, :file_sha256, :binary, null: false - # rubocop:enable Rails/NotNullColumn - end - - def down - remove_column :pages_deployments, :file_sha256 - remove_column :pages_deployments, :file_count - end -end diff --git a/db/migrate/20201019113009_add_new_user_signups_cap_to_application_settings.rb b/db/migrate/20201019113009_add_new_user_signups_cap_to_application_settings.rb deleted file mode 100644 index 8754b0d481e..00000000000 --- a/db/migrate/20201019113009_add_new_user_signups_cap_to_application_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddNewUserSignupsCapToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :new_user_signups_cap, :integer - end -end diff --git a/db/migrate/20201019130244_remove_license_compliance_temp_index.rb b/db/migrate/20201019130244_remove_license_compliance_temp_index.rb deleted file mode 100644 index d0383d999ed..00000000000 --- a/db/migrate/20201019130244_remove_license_compliance_temp_index.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveLicenseComplianceTempIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_ci_job_artifacts_on_license_compliance_file_types' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :ci_job_artifacts, name: INDEX_NAME - end - - def down - add_concurrent_index :ci_job_artifacts, [:job_id, :file_type], where: 'file_type = 10 OR file_type = 101', name: INDEX_NAME - end -end diff --git a/db/migrate/20201019152046_add_default_branch_to_daily_build_group_report_result.rb b/db/migrate/20201019152046_add_default_branch_to_daily_build_group_report_result.rb deleted file mode 100644 index 8a0051b8106..00000000000 --- a/db/migrate/20201019152046_add_default_branch_to_daily_build_group_report_result.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultBranchToDailyBuildGroupReportResult < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def change - add_column :ci_daily_build_group_report_results, :default_branch, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20201019161924_add_partitioned_table_view.rb b/db/migrate/20201019161924_add_partitioned_table_view.rb deleted file mode 100644 index 45bbfda40ff..00000000000 --- a/db/migrate/20201019161924_add_partitioned_table_view.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionedTableView < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute(<<~SQL) - CREATE OR REPLACE VIEW postgres_partitioned_tables AS - SELECT - pg_namespace.nspname::text || '.'::text || pg_class.relname::text AS identifier, - pg_class.oid AS oid, - pg_namespace.nspname AS schema, - pg_class.relname AS name, - CASE partitioned_tables.partstrat - WHEN 'l' THEN 'list' - WHEN 'r' THEN 'range' - WHEN 'h' THEN 'hash' - END as strategy, - array_agg(pg_attribute.attname) as key_columns - FROM ( - SELECT - partrelid, - partstrat, - unnest(partattrs) as column_position - FROM pg_partitioned_table - ) partitioned_tables - INNER JOIN pg_class - ON partitioned_tables.partrelid = pg_class.oid - INNER JOIN pg_namespace - ON pg_class.relnamespace = pg_namespace.oid - INNER JOIN pg_attribute - ON pg_attribute.attrelid = pg_class.oid - AND pg_attribute.attnum = partitioned_tables.column_position - WHERE pg_namespace.nspname = current_schema() - GROUP BY identifier, pg_class.oid, schema, name, strategy; - SQL - end - - def down - execute(<<~SQL) - DROP VIEW IF EXISTS postgres_partitioned_tables - SQL - end -end diff --git a/db/migrate/20201019172704_add_partitions_view.rb b/db/migrate/20201019172704_add_partitions_view.rb deleted file mode 100644 index 991d137faf3..00000000000 --- a/db/migrate/20201019172704_add_partitions_view.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionsView < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute(<<~SQL) - CREATE OR REPLACE VIEW postgres_partitions AS - SELECT - pg_namespace.nspname::text || '.'::text || pg_class.relname::text AS identifier, - pg_class.oid AS oid, - pg_namespace.nspname AS schema, - pg_class.relname AS name, - parent_namespace.nspname::text || '.'::text || parent_class.relname::text AS parent_identifier, - pg_get_expr(pg_class.relpartbound, pg_inherits.inhrelid) AS condition - FROM pg_class - INNER JOIN pg_namespace - ON pg_namespace.oid = pg_class.relnamespace - INNER JOIN pg_inherits - ON pg_class.oid = pg_inherits.inhrelid - INNER JOIN pg_class parent_class - ON pg_inherits.inhparent = parent_class.oid - INNER JOIN pg_namespace parent_namespace - ON parent_class.relnamespace = parent_namespace.oid - WHERE pg_class.relispartition - AND pg_namespace.nspname IN ( - current_schema(), - 'gitlab_partitions_dynamic', - 'gitlab_partitions_static' - ) - SQL - end - - def down - execute(<<~SQL) - DROP VIEW IF EXISTS postgres_partitions - SQL - end -end diff --git a/db/migrate/20201021085007_create_analytics_devops_adoption_segments.rb b/db/migrate/20201021085007_create_analytics_devops_adoption_segments.rb deleted file mode 100644 index 3e322675ba6..00000000000 --- a/db/migrate/20201021085007_create_analytics_devops_adoption_segments.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class CreateAnalyticsDevopsAdoptionSegments < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :analytics_devops_adoption_segments, if_not_exists: true do |t| - t.text :name, null: false, index: { unique: true } - t.datetime_with_timezone :last_recorded_at - - t.timestamps_with_timezone - end - - add_text_limit :analytics_devops_adoption_segments, :name, 255 - end - - def down - drop_table :analytics_devops_adoption_segments - end -end diff --git a/db/migrate/20201021101956_add_index_route_on_name_trigram_to_route.rb b/db/migrate/20201021101956_add_index_route_on_name_trigram_to_route.rb deleted file mode 100644 index cf65c7500c5..00000000000 --- a/db/migrate/20201021101956_add_index_route_on_name_trigram_to_route.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexRouteOnNameTrigramToRoute < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_route_on_name_trigram' - - disable_ddl_transaction! - - def up - add_concurrent_index :routes, :name, name: INDEX_NAME, using: :gin, opclass: { name: :gin_trgm_ops } - end - - def down - remove_concurrent_index_by_name(:routes, INDEX_NAME) - end -end diff --git a/db/migrate/20201021102554_create_analytics_devops_adoption_segment_selections.rb b/db/migrate/20201021102554_create_analytics_devops_adoption_segment_selections.rb deleted file mode 100644 index c5aac7a82a5..00000000000 --- a/db/migrate/20201021102554_create_analytics_devops_adoption_segment_selections.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class CreateAnalyticsDevopsAdoptionSegmentSelections < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :analytics_devops_adoption_segment_selections do |t| - t.references :segment, index: { name: 'index_on_segment_selections_segment_id' }, null: false, foreign_key: { to_table: :analytics_devops_adoption_segments, on_delete: :cascade } - t.bigint :group_id - t.bigint :project_id - t.index [:group_id, :segment_id], unique: true, name: 'index_on_segment_selections_group_id_segment_id' - t.index [:project_id, :segment_id], unique: true, name: 'index_on_segment_selections_project_id_segment_id' - - t.timestamps_with_timezone - end - end -end diff --git a/db/migrate/20201021105347_add_foreign_key_project_id_to_segment_selection.rb b/db/migrate/20201021105347_add_foreign_key_project_id_to_segment_selection.rb deleted file mode 100644 index 651770e059c..00000000000 --- a/db/migrate/20201021105347_add_foreign_key_project_id_to_segment_selection.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyProjectIdToSegmentSelection < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key(:analytics_devops_adoption_segment_selections, :projects, column: :project_id, on_delete: :cascade) - end - - def down - with_lock_retries do - remove_foreign_key :analytics_devops_adoption_segment_selections, column: :project_id - end - end -end diff --git a/db/migrate/20201021105600_add_foreign_key_group_id_to_segment_selection.rb b/db/migrate/20201021105600_add_foreign_key_group_id_to_segment_selection.rb deleted file mode 100644 index 3ee73ee3a64..00000000000 --- a/db/migrate/20201021105600_add_foreign_key_group_id_to_segment_selection.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyGroupIdToSegmentSelection < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key(:analytics_devops_adoption_segment_selections, :namespaces, column: :group_id, on_delete: :cascade) - end - - def down - with_lock_retries do - remove_foreign_key :analytics_devops_adoption_segment_selections, column: :group_id - end - end -end diff --git a/db/migrate/20201021105959_add_check_constraint_to_segment_selection.rb b/db/migrate/20201021105959_add_check_constraint_to_segment_selection.rb deleted file mode 100644 index 68fec36aa8a..00000000000 --- a/db/migrate/20201021105959_add_check_constraint_to_segment_selection.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddCheckConstraintToSegmentSelection < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - CONSTRAINT_NAME = 'segment_selection_project_id_or_group_id_required' - - def up - add_check_constraint :analytics_devops_adoption_segment_selections, '(project_id != NULL AND group_id IS NULL) OR (group_id != NULL AND project_id IS NULL)', CONSTRAINT_NAME - end - - def down - remove_check_constraint :analytics_devops_adoption_segment_selections, CONSTRAINT_NAME - end -end diff --git a/db/migrate/20201021142812_add_index_to_ci_daily_build_group_report_results.rb b/db/migrate/20201021142812_add_index_to_ci_daily_build_group_report_results.rb deleted file mode 100644 index c811e3deeda..00000000000 --- a/db/migrate/20201021142812_add_index_to_ci_daily_build_group_report_results.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToCiDailyBuildGroupReportResults < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_ci_daily_build_group_report_results_on_project_and_date' - - disable_ddl_transaction! - - def up - add_concurrent_index( - :ci_daily_build_group_report_results, - [:project_id, :date], - order: { date: :desc }, - where: "default_branch = TRUE AND (data -> 'coverage') IS NOT NULL", - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index_by_name(:ci_daily_build_group_report_results, INDEX_NAME) - end -end diff --git a/db/migrate/20201021152210_add_secret_detection_token_revocation_application_settings.rb b/db/migrate/20201021152210_add_secret_detection_token_revocation_application_settings.rb deleted file mode 100644 index 6334dcd8c1a..00000000000 --- a/db/migrate/20201021152210_add_secret_detection_token_revocation_application_settings.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddSecretDetectionTokenRevocationApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column :application_settings, :secret_detection_token_revocation_enabled, :boolean, default: false, null: false - add_column :application_settings, :secret_detection_token_revocation_url, :text, null: true # rubocop:disable Migration/AddLimitToTextColumns - - add_column :application_settings, :encrypted_secret_detection_token_revocation_token, :text - add_column :application_settings, :encrypted_secret_detection_token_revocation_token_iv, :text - end - - def down - remove_column :application_settings, :secret_detection_token_revocation_enabled - remove_column :application_settings, :secret_detection_token_revocation_url - - remove_column :application_settings, :encrypted_secret_detection_token_revocation_token - remove_column :application_settings, :encrypted_secret_detection_token_revocation_token_iv - end -end diff --git a/db/migrate/20201021155606_add_analytics_access_level_to_project_features.rb b/db/migrate/20201021155606_add_analytics_access_level_to_project_features.rb deleted file mode 100644 index faedbced06b..00000000000 --- a/db/migrate/20201021155606_add_analytics_access_level_to_project_features.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddAnalyticsAccessLevelToProjectFeatures < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - def up - with_lock_retries do - add_column :project_features, :analytics_access_level, :integer, default: 20, null: false - end - end - - def down - with_lock_retries do - remove_column :project_features, :analytics_access_level, :integer - end - end -end diff --git a/db/migrate/20201021190539_add_text_limit_to_secret_detection_token_revocation_application_settings.rb b/db/migrate/20201021190539_add_text_limit_to_secret_detection_token_revocation_application_settings.rb deleted file mode 100644 index ea5e12322d0..00000000000 --- a/db/migrate/20201021190539_add_text_limit_to_secret_detection_token_revocation_application_settings.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToSecretDetectionTokenRevocationApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :secret_detection_token_revocation_url, 255 - end - - def down - remove_text_limit :application_settings, :secret_detection_token_revocation_url - end -end diff --git a/db/migrate/20201021220101_add_merge_trains_enabled.rb b/db/migrate/20201021220101_add_merge_trains_enabled.rb deleted file mode 100644 index 88a71897435..00000000000 --- a/db/migrate/20201021220101_add_merge_trains_enabled.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddMergeTrainsEnabled < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :project_ci_cd_settings, :merge_trains_enabled, :boolean, default: false, allow_null: false - end -end diff --git a/db/migrate/20201022080802_add_repository_read_only_to_snippets.rb b/db/migrate/20201022080802_add_repository_read_only_to_snippets.rb deleted file mode 100644 index d0cb329fb02..00000000000 --- a/db/migrate/20201022080802_add_repository_read_only_to_snippets.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddRepositoryReadOnlyToSnippets < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :snippets, :repository_read_only, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20201022094845_add_historical_data_recorded_at.rb b/db/migrate/20201022094845_add_historical_data_recorded_at.rb deleted file mode 100644 index c90889e2d38..00000000000 --- a/db/migrate/20201022094845_add_historical_data_recorded_at.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddHistoricalDataRecordedAt < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column(:historical_data, :recorded_at, :timestamptz) - end - - def down - remove_column(:historical_data, :recorded_at) - end -end diff --git a/db/migrate/20201022094846_update_historical_data_recorded_at.rb b/db/migrate/20201022094846_update_historical_data_recorded_at.rb deleted file mode 100644 index bd1889149bb..00000000000 --- a/db/migrate/20201022094846_update_historical_data_recorded_at.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class UpdateHistoricalDataRecordedAt < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - update_value = Arel.sql("COALESCE(created_at, date + '12:00'::time AT TIME ZONE '#{Time.zone&.tzinfo&.name || "Etc/UTC"}')") - - update_column_in_batches(:historical_data, :recorded_at, update_value) do |table, query| - query.where(table[:recorded_at].eq(nil)) - end - - add_not_null_constraint :historical_data, :recorded_at - - change_column_null :historical_data, :date, true - end - - def down - change_column_null :historical_data, :date, false - - remove_not_null_constraint :historical_data, :recorded_at - - update_column_in_batches(:historical_data, :recorded_at, nil) do |table, query| - query.where(table[:recorded_at].not_eq(nil)) - end - end -end diff --git a/db/migrate/20201022103304_add_availability_to_user_statuses.rb b/db/migrate/20201022103304_add_availability_to_user_statuses.rb deleted file mode 100644 index 9144c81fcfb..00000000000 --- a/db/migrate/20201022103304_add_availability_to_user_statuses.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddAvailabilityToUserStatuses < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :user_statuses, :availability, :integer, limit: 2, default: 0, null: false - end -end diff --git a/db/migrate/20201022144501_create_snippet_repository_storage_move.rb b/db/migrate/20201022144501_create_snippet_repository_storage_move.rb deleted file mode 100644 index 7db38191942..00000000000 --- a/db/migrate/20201022144501_create_snippet_repository_storage_move.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class CreateSnippetRepositoryStorageMove < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:snippet_repository_storage_moves) - with_lock_retries do - create_table :snippet_repository_storage_moves do |t| - t.timestamps_with_timezone - t.references :snippet, index: true, null: false, foreign_key: { on_delete: :cascade } - t.integer :state, limit: 2, default: 1, null: false - t.text :source_storage_name, null: false - t.text :destination_storage_name, null: false - end - end - end - - add_text_limit(:snippet_repository_storage_moves, :source_storage_name, 255, constraint_name: 'snippet_repository_storage_moves_source_storage_name') - add_text_limit(:snippet_repository_storage_moves, :destination_storage_name, 255, constraint_name: 'snippet_repository_storage_moves_destination_storage_name') - end - - def down - with_lock_retries do - drop_table :snippet_repository_storage_moves - end - end -end diff --git a/db/migrate/20201022191817_add_has_vulnerabilities_into_project_settings.rb b/db/migrate/20201022191817_add_has_vulnerabilities_into_project_settings.rb deleted file mode 100644 index bb2d683c4e2..00000000000 --- a/db/migrate/20201022191817_add_has_vulnerabilities_into_project_settings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddHasVulnerabilitiesIntoProjectSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :project_settings, :has_vulnerabilities, :boolean, default: false, null: false - end - end - - def down - with_lock_retries do - remove_column :project_settings, :has_vulnerabilities - end - end -end diff --git a/db/migrate/20201022192254_index_project_settings_on_project_id_partially.rb b/db/migrate/20201022192254_index_project_settings_on_project_id_partially.rb deleted file mode 100644 index 57247bd0f22..00000000000 --- a/db/migrate/20201022192254_index_project_settings_on_project_id_partially.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class IndexProjectSettingsOnProjectIdPartially < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_project_settings_on_project_id_partially' - - disable_ddl_transaction! - - def up - add_concurrent_index :project_settings, :project_id, name: INDEX_NAME, where: 'has_vulnerabilities IS TRUE' - end - - def down - remove_concurrent_index_by_name :project_settings, INDEX_NAME - end -end diff --git a/db/migrate/20201023114628_create_merge_request_cleanup_schedules.rb b/db/migrate/20201023114628_create_merge_request_cleanup_schedules.rb deleted file mode 100644 index f63738682b1..00000000000 --- a/db/migrate/20201023114628_create_merge_request_cleanup_schedules.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class CreateMergeRequestCleanupSchedules < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :merge_request_cleanup_schedules, id: false do |t| - t.references :merge_request, primary_key: true, index: { unique: true }, null: false, foreign_key: { on_delete: :cascade } - t.datetime_with_timezone :scheduled_at, null: false - t.datetime_with_timezone :completed_at, null: true - - t.timestamps_with_timezone - - t.index :scheduled_at, where: 'completed_at IS NULL', name: 'index_mr_cleanup_schedules_timestamps' - end - end - end - - def down - with_lock_retries do - drop_table :merge_request_cleanup_schedules - end - end -end diff --git a/db/migrate/20201026200736_seed_merge_trains_enabled.rb b/db/migrate/20201026200736_seed_merge_trains_enabled.rb deleted file mode 100644 index c22c2a408bc..00000000000 --- a/db/migrate/20201026200736_seed_merge_trains_enabled.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class SeedMergeTrainsEnabled < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - update_column_in_batches(:project_ci_cd_settings, :merge_trains_enabled, true) do |table, query| - query.where(table[:merge_pipelines_enabled].eq(true)) - end - end - - def down - # no-op - end -end diff --git a/db/migrate/20201027002551_migrate_services_to_http_integrations.rb b/db/migrate/20201027002551_migrate_services_to_http_integrations.rb deleted file mode 100644 index 5fe05320862..00000000000 --- a/db/migrate/20201027002551_migrate_services_to_http_integrations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -class MigrateServicesToHttpIntegrations < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - ALERT_SERVICE_TYPE = 'AlertsService' - SERVICE_NAMES_IDENTIFIER = { - name: 'HTTP endpoint', - identifier: 'legacy' - } - - class HttpIntegration < ActiveRecord::Base - self.table_name = 'alert_management_http_integrations' - end - - # For each Alerts service, - # Create the matching HttpIntegration - def up - HttpIntegration.reset_column_information - - sql = <<~SQL - SELECT * FROM services - JOIN alerts_service_data - ON (services.id = alerts_service_data.service_id) - WHERE type = '#{ALERT_SERVICE_TYPE}' - AND active = TRUE - SQL - - current_time = Time.current - - values = select_all(sql).map do |alerts_service| - { - project_id: alerts_service['project_id'], - name: SERVICE_NAMES_IDENTIFIER[:name], - endpoint_identifier: SERVICE_NAMES_IDENTIFIER[:identifier], - encrypted_token: alerts_service['encrypted_token'], - encrypted_token_iv: alerts_service['encrypted_token_iv'], - active: alerts_service['active'], - updated_at: current_time, - created_at: current_time - } - end - - HttpIntegration.insert_all(values) if values.present? - end - - def down - # no-op - end -end diff --git a/db/migrate/20201027101010_create_user_follow_users.rb b/db/migrate/20201027101010_create_user_follow_users.rb deleted file mode 100644 index 7c1f831f3b2..00000000000 --- a/db/migrate/20201027101010_create_user_follow_users.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class CreateUserFollowUsers < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - execute <<~SQL - CREATE TABLE user_follow_users ( - follower_id integer not null references users (id) on delete cascade, - followee_id integer not null references users (id) on delete cascade, - PRIMARY KEY (follower_id, followee_id) - ); - CREATE INDEX ON user_follow_users (followee_id); - SQL - end - end - - def down - drop_table :user_follow_users - end -end diff --git a/db/migrate/20201027135651_add_auto_rollback_setting.rb b/db/migrate/20201027135651_add_auto_rollback_setting.rb deleted file mode 100644 index 8e916ac9d36..00000000000 --- a/db/migrate/20201027135651_add_auto_rollback_setting.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddAutoRollbackSetting < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :project_ci_cd_settings, :auto_rollback_enabled, :boolean, default: false, null: false - end - end - - def down - with_lock_retries do - remove_column :project_ci_cd_settings, :auto_rollback_enabled - end - end -end diff --git a/db/migrate/20201027210127_add_index_to_oauth_access_grants_resource_owner_id.rb b/db/migrate/20201027210127_add_index_to_oauth_access_grants_resource_owner_id.rb deleted file mode 100644 index 035d2fb4386..00000000000 --- a/db/migrate/20201027210127_add_index_to_oauth_access_grants_resource_owner_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToOauthAccessGrantsResourceOwnerId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_oauth_access_grants_on_resource_owner_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :oauth_access_grants, %i[resource_owner_id application_id created_at], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :oauth_access_grants, INDEX_NAME - end -end diff --git a/db/migrate/20201027211138_increase_default_diff_max_patch_bytes.rb b/db/migrate/20201027211138_increase_default_diff_max_patch_bytes.rb deleted file mode 100644 index 92d9025706f..00000000000 --- a/db/migrate/20201027211138_increase_default_diff_max_patch_bytes.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class IncreaseDefaultDiffMaxPatchBytes < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_column_default(:application_settings, :diff_max_patch_bytes, from: 102400, to: 204800) - end -end diff --git a/db/migrate/20201028160831_add_temporary_index_to_vulnerabilities_table.rb b/db/migrate/20201028160831_add_temporary_index_to_vulnerabilities_table.rb deleted file mode 100644 index 05bb75be75a..00000000000 --- a/db/migrate/20201028160831_add_temporary_index_to_vulnerabilities_table.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddTemporaryIndexToVulnerabilitiesTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'temporary_index_vulnerabilities_on_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerabilities, :id, where: "state = 2 AND (dismissed_at IS NULL OR dismissed_by_id IS NULL)", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME - end -end diff --git a/db/migrate/20201028184640_add_helm_major_version_to_clusters.rb b/db/migrate/20201028184640_add_helm_major_version_to_clusters.rb deleted file mode 100644 index 2169fd41826..00000000000 --- a/db/migrate/20201028184640_add_helm_major_version_to_clusters.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddHelmMajorVersionToClusters < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column(:clusters, :helm_major_version, :integer, default: 2, null: false) - end -end diff --git a/db/migrate/20201028204306_migrate_default_diff_max_patch_bytes_to_minimum_200kb.rb b/db/migrate/20201028204306_migrate_default_diff_max_patch_bytes_to_minimum_200kb.rb deleted file mode 100644 index 11d47904e67..00000000000 --- a/db/migrate/20201028204306_migrate_default_diff_max_patch_bytes_to_minimum_200kb.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class MigrateDefaultDiffMaxPatchBytesToMinimum200kb < ActiveRecord::Migration[6.0] - DOWNTIME = false - MAX_SIZE = 200.kilobytes - - class ApplicationSetting < ActiveRecord::Base - self.table_name = 'application_settings' - end - - def up - table = ApplicationSetting.arel_table - ApplicationSetting.where(table[:diff_max_patch_bytes].lt(MAX_SIZE)).update_all(diff_max_patch_bytes: MAX_SIZE) - end - - def down - table = ApplicationSetting.arel_table - ApplicationSetting.where(table[:diff_max_patch_bytes].eq(MAX_SIZE)).update_all(diff_max_patch_bytes: 100.kilobytes) - end -end diff --git a/db/migrate/20201029143650_rename_application_settings_to_allow_deny_names.rb b/db/migrate/20201029143650_rename_application_settings_to_allow_deny_names.rb deleted file mode 100644 index 2d96da91069..00000000000 --- a/db/migrate/20201029143650_rename_application_settings_to_allow_deny_names.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RenameApplicationSettingsToAllowDenyNames < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - rename_column_concurrently :application_settings, :domain_blacklist_enabled, :domain_denylist_enabled - rename_column_concurrently :application_settings, :domain_blacklist, :domain_denylist - rename_column_concurrently :application_settings, :domain_whitelist, :domain_allowlist - end - - def down - undo_rename_column_concurrently :application_settings, :domain_blacklist_enabled, :domain_denylist_enabled - undo_rename_column_concurrently :application_settings, :domain_blacklist, :domain_denylist - undo_rename_column_concurrently :application_settings, :domain_whitelist, :domain_allowlist - end -end diff --git a/db/migrate/20201029144444_create_vulnerability_finding_links.rb b/db/migrate/20201029144444_create_vulnerability_finding_links.rb deleted file mode 100644 index 225a2de6e19..00000000000 --- a/db/migrate/20201029144444_create_vulnerability_finding_links.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class CreateVulnerabilityFindingLinks < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :vulnerability_finding_links, if_not_exists: true do |t| - t.timestamps_with_timezone null: false - t.references :vulnerability_occurrence, index: { name: 'finding_links_on_vulnerability_occurrence_id' }, null: false, foreign_key: { on_delete: :cascade } - t.text :name - t.text :url, null: false - end - - add_text_limit :vulnerability_finding_links, :name, 255 - add_text_limit :vulnerability_finding_links, :url, 2048 - end - - def down - drop_table :vulnerability_finding_links - end -end diff --git a/db/migrate/20201029144524_add_index_to_releases.rb b/db/migrate/20201029144524_add_index_to_releases.rb deleted file mode 100644 index fbffa1453af..00000000000 --- a/db/migrate/20201029144524_add_index_to_releases.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToReleases < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_releases_on_released_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :releases, :released_at, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :releases, INDEX_NAME - end -end diff --git a/db/migrate/20201030092151_add_requirements_access_level_to_project_features.rb b/db/migrate/20201030092151_add_requirements_access_level_to_project_features.rb deleted file mode 100644 index e4ba7b2adb9..00000000000 --- a/db/migrate/20201030092151_add_requirements_access_level_to_project_features.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddRequirementsAccessLevelToProjectFeatures < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - unless column_exists?(:project_features, :requirements_access_level) - with_lock_retries { add_column :project_features, :requirements_access_level, :integer, default: 20, null: false } - end - end - - def down - if column_exists?(:project_features, :requirements_access_level) - with_lock_retries { remove_column :project_features, :requirements_access_level } - end - end -end diff --git a/db/migrate/20201030200115_add_iid_to_design_management_design.rb b/db/migrate/20201030200115_add_iid_to_design_management_design.rb deleted file mode 100644 index c31cd86d5e2..00000000000 --- a/db/migrate/20201030200115_add_iid_to_design_management_design.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddIidToDesignManagementDesign < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :design_management_designs, :iid, :integer - end -end diff --git a/db/migrate/20201030200539_add_index_on_design_management_designs_iid_project_id.rb b/db/migrate/20201030200539_add_index_on_design_management_designs_iid_project_id.rb deleted file mode 100644 index 3ff50c299cb..00000000000 --- a/db/migrate/20201030200539_add_index_on_design_management_designs_iid_project_id.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnDesignManagementDesignsIidProjectId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'index_design_management_designs_on_iid_and_project_id' - - def up - add_concurrent_index :design_management_designs, [:project_id, :iid], - name: INDEX_NAME, - unique: true - end - - def down - remove_concurrent_index_by_name :design_management_designs, INDEX_NAME - end -end diff --git a/db/migrate/20201030223933_add_ci_pipeline_deployments_to_plan_limits.rb b/db/migrate/20201030223933_add_ci_pipeline_deployments_to_plan_limits.rb deleted file mode 100644 index 60f0ff9d6ed..00000000000 --- a/db/migrate/20201030223933_add_ci_pipeline_deployments_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddCiPipelineDeploymentsToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :plan_limits, :ci_pipeline_deployments, :integer, default: 500, null: false - end -end diff --git a/db/migrate/20201102184743_add_index_to_incident_issues_on_project_and_created_at.rb b/db/migrate/20201102184743_add_index_to_incident_issues_on_project_and_created_at.rb deleted file mode 100644 index 1fd900002c3..00000000000 --- a/db/migrate/20201102184743_add_index_to_incident_issues_on_project_and_created_at.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToIncidentIssuesOnProjectAndCreatedAt < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - INCIDENT_TYPE = 1 - OLD_INDEX_NAME = 'index_issues_project_id_issue_type_incident' - NEW_INDEX_NAME = 'index_issues_on_project_id_and_created_at_issue_type_incident' - - DOWNTIME = false - disable_ddl_transaction! - - def up - add_concurrent_index :issues, - [:project_id, :created_at], - where: "issue_type = #{INCIDENT_TYPE}", - name: NEW_INDEX_NAME - - remove_concurrent_index_by_name :issues, OLD_INDEX_NAME - end - - def down - add_concurrent_index :issues, - :project_id, - where: "issue_type = #{INCIDENT_TYPE}", - name: OLD_INDEX_NAME - - remove_concurrent_index_by_name :issues, NEW_INDEX_NAME - end -end diff --git a/db/migrate/20201103045515_add_issuable_metric_images.rb b/db/migrate/20201103045515_add_issuable_metric_images.rb deleted file mode 100644 index c598bb468a1..00000000000 --- a/db/migrate/20201103045515_add_issuable_metric_images.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class AddIssuableMetricImages < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:issuable_metric_images) - with_lock_retries do - create_table :issuable_metric_images do |t| - t.references :issue, null: false, index: true, foreign_key: { on_delete: :cascade } - t.timestamps_with_timezone - t.integer :file_store, limit: 2 - t.text :file, null: false - t.text :url - end - end - end - - add_text_limit(:issuable_metric_images, :url, 255) - add_text_limit(:issuable_metric_images, :file, 255) - end - - def down - with_lock_retries do - drop_table :issuable_metric_images - end - end -end diff --git a/db/migrate/20201103095752_add_issues_closed_at_index.rb b/db/migrate/20201103095752_add_issues_closed_at_index.rb deleted file mode 100644 index 7a8ee4e8d67..00000000000 --- a/db/migrate/20201103095752_add_issues_closed_at_index.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIssuesClosedAtIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index(:issues, [:project_id, :closed_at]) - end - - def down - remove_concurrent_index_by_name(:issues, 'index_issues_on_project_id_and_closed_at') - end -end diff --git a/db/migrate/20201103171537_add_index_active_billable_users_to_user.rb b/db/migrate/20201103171537_add_index_active_billable_users_to_user.rb deleted file mode 100644 index 3ad7a3f4ca3..00000000000 --- a/db/migrate/20201103171537_add_index_active_billable_users_to_user.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexActiveBillableUsersToUser < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'active_billable_users' - HUMAN_TYPE = 'NULL' - HUMAN_SVC_BOT_TYPES = "#{HUMAN_TYPE}, 6, 4" - BOT_TYPES = '2,6,1,3,7,8' - - disable_ddl_transaction! - - def up - add_concurrent_index :users, :id, name: INDEX_NAME, where: "(state = 'active' AND (user_type is #{HUMAN_TYPE} or user_type in (#{HUMAN_SVC_BOT_TYPES}))) and ((users.user_type IS #{HUMAN_TYPE}) OR (users.user_type <> ALL ('{#{BOT_TYPES}}')))" - end - - def down - remove_concurrent_index_by_name(:users, INDEX_NAME) - end -end diff --git a/db/migrate/20201103184333_create_packages_package_file_build_infos.rb b/db/migrate/20201103184333_create_packages_package_file_build_infos.rb deleted file mode 100644 index 9cb6869cae4..00000000000 --- a/db/migrate/20201103184333_create_packages_package_file_build_infos.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesPackageFileBuildInfos < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - unless table_exists?(:packages_package_file_build_infos) - with_lock_retries do - create_table :packages_package_file_build_infos do |t| - t.references :package_file, index: true, - null: false, - foreign_key: { to_table: :packages_package_files, on_delete: :cascade }, - type: :bigint - t.references :pipeline, index: true, - null: true, - foreign_key: { to_table: :ci_pipelines, on_delete: :nullify }, - type: :bigint - end - end - end - end - - def down - with_lock_retries do - drop_table :packages_package_file_build_infos - end - end -end diff --git a/db/migrate/20201103202213_update_packages_build_infos_index.rb b/db/migrate/20201103202213_update_packages_build_infos_index.rb deleted file mode 100644 index d737517045b..00000000000 --- a/db/migrate/20201103202213_update_packages_build_infos_index.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class UpdatePackagesBuildInfosIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - NEW_INDEX_NAME = 'idx_packages_build_infos_on_package_id' - OLD_INDEX_NAME = 'index_packages_build_infos_on_package_id' - - def up - add_concurrent_index :packages_build_infos, :package_id, name: NEW_INDEX_NAME - remove_concurrent_index_by_name :packages_build_infos, OLD_INDEX_NAME - end - - def down - # No op. It is possible records would validate the UNIQUE constraint, so it - # cannot be added back to the index. - end -end diff --git a/db/migrate/20201104142036_add_index_to_merge_request_metrics_target_project_id.rb b/db/migrate/20201104142036_add_index_to_merge_request_metrics_target_project_id.rb deleted file mode 100644 index 348a3387b6f..00000000000 --- a/db/migrate/20201104142036_add_index_to_merge_request_metrics_target_project_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToMergeRequestMetricsTargetProjectId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_mr_metrics_on_target_project_id_merged_at_time_to_merge' - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_request_metrics, [:target_project_id, :merged_at, :created_at], where: 'merged_at > created_at', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name(:merge_request_metrics, INDEX_NAME) - end -end diff --git a/db/migrate/20201104204739_create_bulk_import_trackers.rb b/db/migrate/20201104204739_create_bulk_import_trackers.rb deleted file mode 100644 index 906bd06248d..00000000000 --- a/db/migrate/20201104204739_create_bulk_import_trackers.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -class CreateBulkImportTrackers < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - unless table_exists?(:bulk_import_trackers) - create_table :bulk_import_trackers do |t| - t.references :bulk_import_entity, - null: false, - index: false, - foreign_key: { on_delete: :cascade } - - t.text :relation, null: false - t.text :next_page - t.boolean :has_next_page, default: false, null: false - - t.index %w(bulk_import_entity_id relation), - unique: true, - name: :bulk_import_trackers_uniq_relation_by_entity - end - end - end - - add_check_constraint :bulk_import_trackers, - '(has_next_page IS FALSE or next_page IS NOT NULL)', - 'check_next_page_requirement' - add_text_limit :bulk_import_trackers, :relation, 255 - add_text_limit :bulk_import_trackers, :next_page, 255 - end - - def down - with_lock_retries do - drop_table :bulk_import_trackers - end - end -end diff --git a/db/migrate/20201105021637_add_uploads_size_to_project_statistics.rb b/db/migrate/20201105021637_add_uploads_size_to_project_statistics.rb deleted file mode 100644 index 1d2251f6c37..00000000000 --- a/db/migrate/20201105021637_add_uploads_size_to_project_statistics.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddUploadsSizeToProjectStatistics < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column :project_statistics, :uploads_size, :bigint, default: 0, null: false - end - - def down - remove_column :project_statistics, :uploads_size - end -end diff --git a/db/migrate/20201105024127_add_uploads_size_to_namespace_root_storage_statistics.rb b/db/migrate/20201105024127_add_uploads_size_to_namespace_root_storage_statistics.rb deleted file mode 100644 index c3cccc7d5f2..00000000000 --- a/db/migrate/20201105024127_add_uploads_size_to_namespace_root_storage_statistics.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddUploadsSizeToNamespaceRootStorageStatistics < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column :namespace_root_storage_statistics, :uploads_size, :bigint, default: 0, null: false - end - - def down - remove_column :namespace_root_storage_statistics, :uploads_size - end -end diff --git a/db/migrate/20201105135051_change_default_value_of_ci_max_artifact_size_lsif_of_plan_limits_from20_to100.rb b/db/migrate/20201105135051_change_default_value_of_ci_max_artifact_size_lsif_of_plan_limits_from20_to100.rb deleted file mode 100644 index d53f81ecabb..00000000000 --- a/db/migrate/20201105135051_change_default_value_of_ci_max_artifact_size_lsif_of_plan_limits_from20_to100.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class ChangeDefaultValueOfCiMaxArtifactSizeLsifOfPlanLimitsFrom20To100 < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - change_column_default :plan_limits, :ci_max_artifact_size_lsif, 100 - execute('UPDATE plan_limits SET ci_max_artifact_size_lsif = 100 WHERE ci_max_artifact_size_lsif = 20') - end - end - - def down - with_lock_retries do - change_column_default :plan_limits, :ci_max_artifact_size_lsif, 20 - execute('UPDATE plan_limits SET ci_max_artifact_size_lsif = 20 WHERE ci_max_artifact_size_lsif = 100') - end - end -end diff --git a/db/migrate/20201105143211_add_vulnerabilities_enabled_and_issuetype_to_jira_tracker_data.rb b/db/migrate/20201105143211_add_vulnerabilities_enabled_and_issuetype_to_jira_tracker_data.rb deleted file mode 100644 index 27269de611c..00000000000 --- a/db/migrate/20201105143211_add_vulnerabilities_enabled_and_issuetype_to_jira_tracker_data.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddVulnerabilitiesEnabledAndIssuetypeToJiraTrackerData < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20201105143312_add_text_limit_to_jira_tracker_data_issuetype.rb - def change - add_column :jira_tracker_data, :vulnerabilities_issuetype, :text - add_column :jira_tracker_data, :vulnerabilities_enabled, :boolean, default: false, null: false - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20201105143312_add_text_limit_to_jira_tracker_data_issuetype.rb b/db/migrate/20201105143312_add_text_limit_to_jira_tracker_data_issuetype.rb deleted file mode 100644 index 4a81b0ce7af..00000000000 --- a/db/migrate/20201105143312_add_text_limit_to_jira_tracker_data_issuetype.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToJiraTrackerDataIssuetype < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :jira_tracker_data, :vulnerabilities_issuetype, 255 - end - - def down - remove_text_limit :jira_tracker_data, :vulnerabilities_issuetype - end -end diff --git a/db/migrate/20201106134139_add_pipelines_created_index.rb b/db/migrate/20201106134139_add_pipelines_created_index.rb deleted file mode 100644 index aaf6643cf0b..00000000000 --- a/db/migrate/20201106134139_add_pipelines_created_index.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPipelinesCreatedIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = :index_ci_pipelines_on_project_id_and_status_and_created_at - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_pipelines, [:project_id, :status, :created_at], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :ci_pipelines, INDEX_NAME - end -end diff --git a/db/migrate/20201106135608_remove_redundant_pipelines_index.rb b/db/migrate/20201106135608_remove_redundant_pipelines_index.rb deleted file mode 100644 index 03e757c0ec1..00000000000 --- a/db/migrate/20201106135608_remove_redundant_pipelines_index.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveRedundantPipelinesIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :ci_pipelines, :index_ci_pipelines_on_project_id_and_created_at - end - - def down - add_concurrent_index :ci_pipelines, [:project_id, :created_at] - end -end diff --git a/db/migrate/20201106193452_add_converted_at_to_experiment_users.rb b/db/migrate/20201106193452_add_converted_at_to_experiment_users.rb deleted file mode 100644 index 5391093516b..00000000000 --- a/db/migrate/20201106193452_add_converted_at_to_experiment_users.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddConvertedAtToExperimentUsers < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :experiment_users, :converted_at, :datetime_with_timezone - end -end diff --git a/db/migrate/20201107032257_add_default_true_require_admin_approval_after_user_signup_to_application_settings.rb b/db/migrate/20201107032257_add_default_true_require_admin_approval_after_user_signup_to_application_settings.rb deleted file mode 100644 index 196f7bd8359..00000000000 --- a/db/migrate/20201107032257_add_default_true_require_admin_approval_after_user_signup_to_application_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultTrueRequireAdminApprovalAfterUserSignupToApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_column_default :application_settings, :require_admin_approval_after_user_signup, from: false, to: true - end -end diff --git a/db/migrate/20201108134919_add_finding_fingerprint_table.rb b/db/migrate/20201108134919_add_finding_fingerprint_table.rb deleted file mode 100644 index dd8ffe8e8aa..00000000000 --- a/db/migrate/20201108134919_add_finding_fingerprint_table.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class AddFindingFingerprintTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - FINGERPRINT_IDX = :idx_vuln_fingerprints_on_occurrences_id_and_fingerprint - UNIQ_IDX = :idx_vuln_fingerprints_uniqueness - - def up - with_lock_retries do - create_table :vulnerability_finding_fingerprints do |t| - t.references :finding, - index: true, - null: false, - foreign_key: { to_table: :vulnerability_occurrences, column: :finding_id, on_delete: :cascade } - - t.timestamps_with_timezone null: false - - t.integer :algorithm_type, null: false - t.binary :fingerprint_sha256, null: false - - t.index %i[finding_id fingerprint_sha256], - name: FINGERPRINT_IDX, - unique: true # only one link should exist between occurrence and the fingerprint - - t.index %i[finding_id algorithm_type fingerprint_sha256], - name: UNIQ_IDX, - unique: true # these should be unique - end - end - end - - def down - with_lock_retries do - drop_table :vulnerability_finding_fingerprints - end - end -end diff --git a/db/migrate/20201109080645_create_vulnerability_remediations_table.rb b/db/migrate/20201109080645_create_vulnerability_remediations_table.rb deleted file mode 100644 index b00ce797c7d..00000000000 --- a/db/migrate/20201109080645_create_vulnerability_remediations_table.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class CreateVulnerabilityRemediationsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - create_table :vulnerability_remediations, if_not_exists: true do |t| - t.timestamps_with_timezone - - t.integer :file_store, limit: 2 - t.text :summary, null: false - t.text :file, null: false - end - - add_text_limit :vulnerability_remediations, :summary, 200 - add_text_limit :vulnerability_remediations, :file, 255 - end - - def down - drop_table :vulnerability_remediations - end -end diff --git a/db/migrate/20201109080646_create_vulnerability_findings_remediations_join_table.rb b/db/migrate/20201109080646_create_vulnerability_findings_remediations_join_table.rb deleted file mode 100644 index e944cee24e4..00000000000 --- a/db/migrate/20201109080646_create_vulnerability_findings_remediations_join_table.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateVulnerabilityFindingsRemediationsJoinTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/CreateTableWithForeignKeys - def change - create_table :vulnerability_findings_remediations do |t| - t.references :vulnerability_occurrence, index: false, foreign_key: { on_delete: :cascade } - t.references :vulnerability_remediation, index: { name: 'index_vulnerability_findings_remediations_on_remediation_id' }, foreign_key: { on_delete: :cascade } - - t.timestamps_with_timezone - - t.index [:vulnerability_occurrence_id, :vulnerability_remediation_id], unique: true, name: 'index_vulnerability_findings_remediations_on_unique_keys' - end - end - # rubocop:enable Migration/CreateTableWithForeignKeys -end diff --git a/db/migrate/20201109144634_add_region_field_to_aws_role.rb b/db/migrate/20201109144634_add_region_field_to_aws_role.rb deleted file mode 100644 index ced75f24552..00000000000 --- a/db/migrate/20201109144634_add_region_field_to_aws_role.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddRegionFieldToAwsRole < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless column_exists?(:aws_roles, :region) - add_column :aws_roles, :region, :text - end - - add_text_limit :aws_roles, :region, 255 - end - - def down - remove_column :aws_roles, :region - end -end diff --git a/db/migrate/20201109180311_add_secret_detection_revocation_token_types_application_settings.rb b/db/migrate/20201109180311_add_secret_detection_revocation_token_types_application_settings.rb deleted file mode 100644 index 0823655f92f..00000000000 --- a/db/migrate/20201109180311_add_secret_detection_revocation_token_types_application_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddSecretDetectionRevocationTokenTypesApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - add_column :application_settings, :secret_detection_revocation_token_types_url, :text, null: true # rubocop:disable Migration/AddLimitToTextColumns - end - - def down - remove_column :application_settings, :secret_detection_revocation_token_types_url - end -end diff --git a/db/migrate/20201109184023_add_text_limit_to_secret_detection_revocation_token_types_application_settings.rb b/db/migrate/20201109184023_add_text_limit_to_secret_detection_revocation_token_types_application_settings.rb deleted file mode 100644 index 9e0329aafcc..00000000000 --- a/db/migrate/20201109184023_add_text_limit_to_secret_detection_revocation_token_types_application_settings.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToSecretDetectionRevocationTokenTypesApplicationSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :secret_detection_revocation_token_types_url, 255 - end - - def down - remove_text_limit :application_settings, :secret_detection_revocation_token_types_url - end -end diff --git a/db/migrate/20201110035029_created_index_for_vulnerability_occurrences_on_project_fingerprint.rb b/db/migrate/20201110035029_created_index_for_vulnerability_occurrences_on_project_fingerprint.rb deleted file mode 100644 index fed117d5f08..00000000000 --- a/db/migrate/20201110035029_created_index_for_vulnerability_occurrences_on_project_fingerprint.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreatedIndexForVulnerabilityOccurrencesOnProjectFingerprint < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_vulnerability_occurrences_on_project_fingerprint' - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerability_occurrences, :project_fingerprint, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME - end -end diff --git a/db/migrate/20201110110454_extend_postgres_indexes_view.rb b/db/migrate/20201110110454_extend_postgres_indexes_view.rb deleted file mode 100644 index 4e9172024d3..00000000000 --- a/db/migrate/20201110110454_extend_postgres_indexes_view.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -class ExtendPostgresIndexesView < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute(<<~SQL) - DROP VIEW postgres_indexes; - - CREATE VIEW postgres_indexes AS - SELECT (pg_namespace.nspname::text || '.'::text) || pg_class.relname::text AS identifier, - pg_index.indexrelid, - pg_namespace.nspname AS schema, - pg_class.relname AS name, - pg_index.indisunique AS "unique", - pg_index.indisvalid AS valid_index, - pg_class.relispartition AS partitioned, - pg_index.indisexclusion AS exclusion, - pg_index.indexprs IS NOT NULL as expression, - pg_index.indpred IS NOT NULL as partial, - pg_indexes.indexdef AS definition, - pg_relation_size(pg_class.oid::regclass) AS ondisk_size_bytes - FROM pg_index - JOIN pg_class ON pg_class.oid = pg_index.indexrelid - JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid - JOIN pg_indexes ON pg_class.relname = pg_indexes.indexname - WHERE pg_namespace.nspname <> 'pg_catalog'::name - AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name])); - SQL - end - - def down - execute(<<~SQL) - DROP VIEW postgres_indexes; - - CREATE VIEW postgres_indexes AS - SELECT (pg_namespace.nspname::text || '.'::text) || pg_class.relname::text AS identifier, - pg_index.indexrelid, - pg_namespace.nspname AS schema, - pg_class.relname AS name, - pg_index.indisunique AS "unique", - pg_index.indisvalid AS valid_index, - pg_class.relispartition AS partitioned, - pg_index.indisexclusion AS exclusion, - pg_indexes.indexdef AS definition, - pg_relation_size(pg_class.oid::regclass) AS ondisk_size_bytes - FROM pg_index - JOIN pg_class ON pg_class.oid = pg_index.indexrelid - JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid - JOIN pg_indexes ON pg_class.relname = pg_indexes.indexname - WHERE pg_namespace.nspname <> 'pg_catalog'::name - AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name])); - SQL - end -end diff --git a/db/migrate/20201110133629_change_index_mr_metrics_target_project_id.rb b/db/migrate/20201110133629_change_index_mr_metrics_target_project_id.rb deleted file mode 100644 index 5bd810207d8..00000000000 --- a/db/migrate/20201110133629_change_index_mr_metrics_target_project_id.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class ChangeIndexMrMetricsTargetProjectId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - disable_ddl_transaction! - - DOWNTIME = false - INDEX_NAME = 'index_merge_request_metrics_on_target_project_id_merged_at' - NULLS_LAST_INDEX_NAME = 'index_mr_metrics_on_target_project_id_merged_at_nulls_last' - - def up - add_concurrent_index :merge_request_metrics, [:target_project_id, :merged_at, :id], order: { merged_at: 'DESC NULLS LAST', id: 'DESC' }, name: NULLS_LAST_INDEX_NAME - remove_concurrent_index_by_name(:merge_request_metrics, INDEX_NAME) - end - - def down - add_concurrent_index :merge_request_metrics, [:target_project_id, :merged_at], name: INDEX_NAME - remove_concurrent_index_by_name(:merge_request_metrics, NULLS_LAST_INDEX_NAME) - end -end diff --git a/db/migrate/20201110221400_create_experiment_subjects.rb b/db/migrate/20201110221400_create_experiment_subjects.rb deleted file mode 100644 index 0c04d5b219f..00000000000 --- a/db/migrate/20201110221400_create_experiment_subjects.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class CreateExperimentSubjects < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - create_table :experiment_subjects do |t| - t.references :experiment, index: true, foreign_key: { on_delete: :cascade }, null: false - t.bigint :user_id, index: true - t.bigint :group_id, index: true - t.bigint :project_id, index: true - t.integer :variant, limit: 2, null: false, default: 0 - t.timestamps_with_timezone null: false - end - - # Require exactly one of user_id, group_id, or project_id to be NOT NULL - execute <<-SQL - ALTER TABLE experiment_subjects ADD CONSTRAINT chk_has_one_subject CHECK (num_nonnulls(user_id, group_id, project_id) = 1); - SQL - end - - def down - drop_table :experiment_subjects - end -end diff --git a/db/migrate/20201111051655_add_foreign_key_to_experiment_subjects_on_user.rb b/db/migrate/20201111051655_add_foreign_key_to_experiment_subjects_on_user.rb deleted file mode 100644 index 231d083dfda..00000000000 --- a/db/migrate/20201111051655_add_foreign_key_to_experiment_subjects_on_user.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToExperimentSubjectsOnUser < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - - def up - add_concurrent_foreign_key :experiment_subjects, :users, column: :user_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :experiment_subjects, column: :user_id - end - end -end diff --git a/db/migrate/20201111051847_add_foreign_key_to_experiment_subjects_on_group.rb b/db/migrate/20201111051847_add_foreign_key_to_experiment_subjects_on_group.rb deleted file mode 100644 index ad0d7ae027e..00000000000 --- a/db/migrate/20201111051847_add_foreign_key_to_experiment_subjects_on_group.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToExperimentSubjectsOnGroup < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - - def up - add_concurrent_foreign_key :experiment_subjects, :namespaces, column: :group_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :experiment_subjects, column: :group_id - end - end -end diff --git a/db/migrate/20201111051904_add_foreign_key_to_experiment_subjects_on_project.rb b/db/migrate/20201111051904_add_foreign_key_to_experiment_subjects_on_project.rb deleted file mode 100644 index a8a05292cca..00000000000 --- a/db/migrate/20201111051904_add_foreign_key_to_experiment_subjects_on_project.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToExperimentSubjectsOnProject < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - - def up - add_concurrent_foreign_key :experiment_subjects, :projects, column: :project_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :experiment_subjects, column: :project_id - end - end -end diff --git a/db/migrate/20201111100136_create_analytics_devops_adoption_snapshots.rb b/db/migrate/20201111100136_create_analytics_devops_adoption_snapshots.rb deleted file mode 100644 index ee029d17c94..00000000000 --- a/db/migrate/20201111100136_create_analytics_devops_adoption_snapshots.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class CreateAnalyticsDevopsAdoptionSnapshots < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - create_table :analytics_devops_adoption_snapshots do |t| - t.references :segment, index: false, null: false, foreign_key: { to_table: :analytics_devops_adoption_segments, on_delete: :cascade } - t.datetime_with_timezone :recorded_at, null: false - t.boolean :issue_opened, null: false - t.boolean :merge_request_opened, null: false - t.boolean :merge_request_approved, null: false - t.boolean :runner_configured, null: false - t.boolean :pipeline_succeeded, null: false - t.boolean :deploy_succeeded, null: false - t.boolean :security_scan_succeeded, null: false - - t.index [:segment_id, :recorded_at], name: 'index_on_snapshots_segment_id_recorded_at' - end - end -end diff --git a/db/migrate/20201111110318_add_cloud_license_auth_token_to_settings.rb b/db/migrate/20201111110318_add_cloud_license_auth_token_to_settings.rb deleted file mode 100644 index e2069835597..00000000000 --- a/db/migrate/20201111110318_add_cloud_license_auth_token_to_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddCloudLicenseAuthTokenToSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20201111110918_add_cloud_license_auth_token_application_settings_text_limit - def change - add_column :application_settings, :encrypted_cloud_license_auth_token, :text - add_column :application_settings, :encrypted_cloud_license_auth_token_iv, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20201111110918_add_cloud_license_auth_token_application_settings_text_limit.rb b/db/migrate/20201111110918_add_cloud_license_auth_token_application_settings_text_limit.rb deleted file mode 100644 index fd1ee5e07bf..00000000000 --- a/db/migrate/20201111110918_add_cloud_license_auth_token_application_settings_text_limit.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddCloudLicenseAuthTokenApplicationSettingsTextLimit < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :encrypted_cloud_license_auth_token_iv, 255 - end - - def down - remove_text_limit :application_settings, :encrypted_cloud_license_auth_token_iv - end -end diff --git a/db/migrate/20201111115414_create_incident_management_oncall_schedules.rb b/db/migrate/20201111115414_create_incident_management_oncall_schedules.rb deleted file mode 100644 index dbb7d1c0808..00000000000 --- a/db/migrate/20201111115414_create_incident_management_oncall_schedules.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -class CreateIncidentManagementOncallSchedules < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - unless table_exists?(:incident_management_oncall_schedules) - create_table :incident_management_oncall_schedules do |t| - t.timestamps_with_timezone - t.references :project, index: true, null: false, foreign_key: { on_delete: :cascade } - t.integer :iid, null: false - t.text :name, null: false - t.text :description - t.text :timezone - - t.index %w(project_id iid), name: 'index_im_oncall_schedules_on_project_id_and_iid', unique: true, using: :btree - end - end - end - - add_text_limit :incident_management_oncall_schedules, :name, 200 - add_text_limit :incident_management_oncall_schedules, :description, 1000 - add_text_limit :incident_management_oncall_schedules, :timezone, 100 - end - - def down - with_lock_retries do - drop_table :incident_management_oncall_schedules - end - end -end diff --git a/db/migrate/20201111145317_add_relation_to_indexes_view.rb b/db/migrate/20201111145317_add_relation_to_indexes_view.rb deleted file mode 100644 index 318b77c1dc6..00000000000 --- a/db/migrate/20201111145317_add_relation_to_indexes_view.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -class AddRelationToIndexesView < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute(<<~SQL) - DROP VIEW postgres_indexes; - - CREATE VIEW postgres_indexes AS - SELECT (pg_namespace.nspname::text || '.'::text) || pg_class.relname::text AS identifier, - pg_index.indexrelid, - pg_namespace.nspname AS schema, - pg_class.relname AS name, - pg_indexes.tablename, - pg_index.indisunique AS "unique", - pg_index.indisvalid AS valid_index, - pg_class.relispartition AS partitioned, - pg_index.indisexclusion AS exclusion, - pg_index.indexprs IS NOT NULL as expression, - pg_index.indpred IS NOT NULL as partial, - pg_indexes.indexdef AS definition, - pg_relation_size(pg_class.oid::regclass) AS ondisk_size_bytes - FROM pg_index - JOIN pg_class ON pg_class.oid = pg_index.indexrelid - JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid - JOIN pg_indexes ON pg_class.relname = pg_indexes.indexname - WHERE pg_namespace.nspname <> 'pg_catalog'::name - AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name])); - SQL - end - - def down - execute(<<~SQL) - DROP VIEW postgres_indexes; - - CREATE VIEW postgres_indexes AS - SELECT (pg_namespace.nspname::text || '.'::text) || pg_class.relname::text AS identifier, - pg_index.indexrelid, - pg_namespace.nspname AS schema, - pg_class.relname AS name, - pg_index.indisunique AS "unique", - pg_index.indisvalid AS valid_index, - pg_class.relispartition AS partitioned, - pg_index.indisexclusion AS exclusion, - pg_index.indexprs IS NOT NULL as expression, - pg_index.indpred IS NOT NULL as partial, - pg_indexes.indexdef AS definition, - pg_relation_size(pg_class.oid::regclass) AS ondisk_size_bytes - FROM pg_index - JOIN pg_class ON pg_class.oid = pg_index.indexrelid - JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid - JOIN pg_indexes ON pg_class.relname = pg_indexes.indexname - WHERE pg_namespace.nspname <> 'pg_catalog'::name - AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name])); - SQL - end -end diff --git a/db/migrate/20201111152859_add_missing_expression_indexes.rb b/db/migrate/20201111152859_add_missing_expression_indexes.rb deleted file mode 100644 index e2742f7f3bc..00000000000 --- a/db/migrate/20201111152859_add_missing_expression_indexes.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -class AddMissingExpressionIndexes < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEXES = [ - [:namespaces, :index_on_namespaces_lower_name, 'LOWER(name)'], - [:namespaces, :index_on_namespaces_lower_path, 'LOWER(path)'], - [:projects, :index_on_projects_lower_path, 'LOWER(path)'], - [:routes, :index_on_routes_lower_path, 'LOWER(path)'], - [:users, :index_on_users_lower_username, 'LOWER(username)'], - [:users, :index_on_users_lower_email, 'LOWER(email)'] - ] - - def up - # Those indexes had been introduced before, but they haven't been - # captured in structure.sql. For installations that already have it, - # this is a no-op - others will get it retroactively with - # this migration. - - tables = Set.new - - INDEXES.each do |(table, name, expression)| - unless index_name_exists?(table, name) - add_concurrent_index table, expression, name: name - tables.add(table) - end - end - - # Rebuild statistics on affected tables only - tables.each do |table| - execute("ANALYZE #{table}") - end - end - - def down - # no-op - end -end diff --git a/db/migrate/20201112132808_create_bulk_import_failures.rb b/db/migrate/20201112132808_create_bulk_import_failures.rb deleted file mode 100644 index cdc5a4d6ff0..00000000000 --- a/db/migrate/20201112132808_create_bulk_import_failures.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -class CreateBulkImportFailures < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - unless table_exists?(:bulk_import_failures) - create_table :bulk_import_failures do |t| - t.references :bulk_import_entity, - null: false, - index: true, - foreign_key: { on_delete: :cascade } - - t.datetime_with_timezone :created_at, null: false - t.text :pipeline_class, null: false - t.text :exception_class, null: false - t.text :exception_message, null: false - t.text :correlation_id_value, index: true - end - end - end - - add_text_limit :bulk_import_failures, :pipeline_class, 255 - add_text_limit :bulk_import_failures, :exception_class, 255 - add_text_limit :bulk_import_failures, :exception_message, 255 - add_text_limit :bulk_import_failures, :correlation_id_value, 255 - end - - def down - with_lock_retries do - drop_table :bulk_import_failures - end - end -end diff --git a/db/migrate/20201112173532_add_verification_state_to_package_files.rb b/db/migrate/20201112173532_add_verification_state_to_package_files.rb deleted file mode 100644 index 61f526bd77e..00000000000 --- a/db/migrate/20201112173532_add_verification_state_to_package_files.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddVerificationStateToPackageFiles < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :packages_package_files, :verification_state, :integer, default: 0, limit: 2, null: false - add_column :packages_package_files, :verification_started_at, :datetime_with_timezone - end -end diff --git a/db/migrate/20201112173911_add_index_on_verification_state_on_package_files.rb b/db/migrate/20201112173911_add_index_on_verification_state_on_package_files.rb deleted file mode 100644 index 17e6b7d01f6..00000000000 --- a/db/migrate/20201112173911_add_index_on_verification_state_on_package_files.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnVerificationStateOnPackageFiles < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_packages_package_files_on_verification_state' - - disable_ddl_transaction! - - def up - add_concurrent_index :packages_package_files, :verification_state, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :packages_package_files, INDEX_NAME - end -end diff --git a/db/migrate/20201112195322_reseed_merge_trains_enabled.rb b/db/migrate/20201112195322_reseed_merge_trains_enabled.rb deleted file mode 100644 index 777c59d16b1..00000000000 --- a/db/migrate/20201112195322_reseed_merge_trains_enabled.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class ReseedMergeTrainsEnabled < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - update_column_in_batches(:project_ci_cd_settings, :merge_trains_enabled, true) do |table, query| - query.where(table[:merge_pipelines_enabled].eq(true)) - end - end - - def down - # no-op - end -end diff --git a/db/migrate/20201112215028_add_partitioned_audit_event_indexes.rb b/db/migrate/20201112215028_add_partitioned_audit_event_indexes.rb deleted file mode 100644 index d8b2833474b..00000000000 --- a/db/migrate/20201112215028_add_partitioned_audit_event_indexes.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionedAuditEventIndexes < ActiveRecord::Migration[6.0] - include Gitlab::Database::PartitioningMigrationHelpers - - DOWNTIME = false - - CREATED_AT_AUTHOR_ID_INDEX_NAME = 'analytics_index_audit_events_part_on_created_at_and_author_id' - ENTITY_ID_DESC_INDEX_NAME = 'idx_audit_events_part_on_entity_id_desc_author_id_created_at' - - disable_ddl_transaction! - - def up - add_concurrent_partitioned_index :audit_events_part_5fc467ac26, - [:created_at, :author_id], - name: CREATED_AT_AUTHOR_ID_INDEX_NAME - - add_concurrent_partitioned_index :audit_events_part_5fc467ac26, - [:entity_id, :entity_type, :id, :author_id, :created_at], - order: { id: :desc }, - name: ENTITY_ID_DESC_INDEX_NAME - end - - def down - remove_concurrent_partitioned_index_by_name :audit_events_part_5fc467ac26, ENTITY_ID_DESC_INDEX_NAME - - remove_concurrent_partitioned_index_by_name :audit_events_part_5fc467ac26, CREATED_AT_AUTHOR_ID_INDEX_NAME - end -end diff --git a/db/migrate/20201112215132_swap_partitioned_audit_events.rb b/db/migrate/20201112215132_swap_partitioned_audit_events.rb deleted file mode 100644 index 8360dbd4aa5..00000000000 --- a/db/migrate/20201112215132_swap_partitioned_audit_events.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class SwapPartitionedAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::PartitioningMigrationHelpers - - DOWNTIME = false - - def up - replace_with_partitioned_table :audit_events - end - - def down - rollback_replace_with_partitioned_table :audit_events - end -end diff --git a/db/migrate/20201116090328_add_regulated_to_compliance_frameworks.rb b/db/migrate/20201116090328_add_regulated_to_compliance_frameworks.rb deleted file mode 100644 index f2e0c23ccfc..00000000000 --- a/db/migrate/20201116090328_add_regulated_to_compliance_frameworks.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddRegulatedToComplianceFrameworks < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column(:compliance_management_frameworks, :regulated, :boolean, default: true, null: false) - end -end diff --git a/db/migrate/20201116211829_create_user_permission_export_uploads.rb b/db/migrate/20201116211829_create_user_permission_export_uploads.rb deleted file mode 100644 index d6207fe0c2c..00000000000 --- a/db/migrate/20201116211829_create_user_permission_export_uploads.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class CreateUserPermissionExportUploads < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - unless table_exists?(:user_permission_export_uploads) - create_table :user_permission_export_uploads do |t| - t.timestamps_with_timezone null: false - t.references :user, foreign_key: { on_delete: :cascade }, index: false, null: false - t.integer :file_store - t.integer :status, limit: 2, null: false, default: 0 - t.text :file - - t.index [:user_id, :status] - end - end - end - - add_text_limit :user_permission_export_uploads, :file, 255 - end - - def down - with_lock_retries do - drop_table :user_permission_export_uploads - end - end -end diff --git a/db/migrate/20201117054609_add_cloud_license_enabled_to_settings.rb b/db/migrate/20201117054609_add_cloud_license_enabled_to_settings.rb deleted file mode 100644 index 4488aa376a1..00000000000 --- a/db/migrate/20201117054609_add_cloud_license_enabled_to_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddCloudLicenseEnabledToSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :cloud_license_enabled, :boolean, null: false, default: false - end -end diff --git a/db/migrate/20201117075742_change_webauthn_xid_length.rb b/db/migrate/20201117075742_change_webauthn_xid_length.rb deleted file mode 100644 index 2d836662e01..00000000000 --- a/db/migrate/20201117075742_change_webauthn_xid_length.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class ChangeWebauthnXidLength < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :webauthn_registrations, :credential_xid, 340, constraint_name: check_constraint_name(:webauthn_registrations, :credential_xid, 'max_length_v2') - remove_text_limit :webauthn_registrations, :credential_xid, constraint_name: check_constraint_name(:webauthn_registrations, :credential_xid, 'max_length') - end - - def down - # no-op: Danger of failling if there are records with length(credential_xid) > 255 - end -end diff --git a/db/migrate/20201117153333_add_index_on_package_size_and_project_id_to_project_statistics.rb b/db/migrate/20201117153333_add_index_on_package_size_and_project_id_to_project_statistics.rb deleted file mode 100644 index efb5cf14d3c..00000000000 --- a/db/migrate/20201117153333_add_index_on_package_size_and_project_id_to_project_statistics.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnPackageSizeAndProjectIdToProjectStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_project_statistics_on_packages_size_and_project_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :project_statistics, [:packages_size, :project_id], - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :project_statistics, INDEX_NAME - end -end diff --git a/db/migrate/20201117184334_add_index_to_project_repositories_shard_id_project_id.rb b/db/migrate/20201117184334_add_index_to_project_repositories_shard_id_project_id.rb deleted file mode 100644 index 25d95231ac4..00000000000 --- a/db/migrate/20201117184334_add_index_to_project_repositories_shard_id_project_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToProjectRepositoriesShardIdProjectId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :project_repositories, [:shard_id, :project_id] - end - - def down - remove_concurrent_index :project_repositories, [:shard_id, :project_id], name: 'index_project_repositories_on_shard_id_and_project_id' - end -end diff --git a/db/migrate/20201117203224_add_iteration_id_to_boards_table.rb b/db/migrate/20201117203224_add_iteration_id_to_boards_table.rb deleted file mode 100644 index 18abe096604..00000000000 --- a/db/migrate/20201117203224_add_iteration_id_to_boards_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIterationIdToBoardsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :boards, :iteration_id, :bigint - end - end - - def down - with_lock_retries do - remove_column :boards, :iteration_id - end - end -end diff --git a/db/migrate/20201117213024_add_iteration_id_index_to_boards_table.rb b/db/migrate/20201117213024_add_iteration_id_index_to_boards_table.rb deleted file mode 100644 index e038b4eacd9..00000000000 --- a/db/migrate/20201117213024_add_iteration_id_index_to_boards_table.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIterationIdIndexToBoardsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_boards_on_iteration_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :boards, :iteration_id, name: INDEX_NAME - end - - def down - remove_concurrent_index :boards, :iteration_id, name: INDEX_NAME - end -end diff --git a/db/migrate/20201118093135_create_namespace_onboarding_actions.rb b/db/migrate/20201118093135_create_namespace_onboarding_actions.rb deleted file mode 100644 index 6b38a0dddca..00000000000 --- a/db/migrate/20201118093135_create_namespace_onboarding_actions.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class CreateNamespaceOnboardingActions < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :namespace_onboarding_actions do |t| - t.references :namespace, index: true, null: false, foreign_key: { on_delete: :cascade } - t.datetime_with_timezone :created_at, null: false - t.integer :action, limit: 2, null: false - end - end - end - - def down - with_lock_retries do - drop_table :namespace_onboarding_actions - end - end -end diff --git a/db/migrate/20201119031515_add_iteration_id_to_lists.rb b/db/migrate/20201119031515_add_iteration_id_to_lists.rb deleted file mode 100644 index 62e13f53e92..00000000000 --- a/db/migrate/20201119031515_add_iteration_id_to_lists.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddIterationIdToLists < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :lists, :iteration_id, :bigint - end -end diff --git a/db/migrate/20201119053603_add_iteration_lists_foreign_key.rb b/db/migrate/20201119053603_add_iteration_lists_foreign_key.rb deleted file mode 100644 index 8d9ec1f2e59..00000000000 --- a/db/migrate/20201119053603_add_iteration_lists_foreign_key.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIterationListsForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = 'index_lists_on_iteration_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :lists, :iteration_id, name: INDEX_NAME - add_concurrent_foreign_key :lists, :sprints, column: :iteration_id, on_delete: :cascade - end - - def down - remove_foreign_key_if_exists :lists, :sprints, column: :iteration_id - remove_concurrent_index_by_name :lists, INDEX_NAME - end -end diff --git a/db/migrate/20201119125730_add_web_hooks_service_foreign_key.rb b/db/migrate/20201119125730_add_web_hooks_service_foreign_key.rb deleted file mode 100644 index d350a7de282..00000000000 --- a/db/migrate/20201119125730_add_web_hooks_service_foreign_key.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddWebHooksServiceForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_web_hooks_on_service_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :web_hooks, :service_id, name: INDEX_NAME - add_concurrent_foreign_key :web_hooks, :services, column: :service_id, on_delete: :cascade, validate: false - end - - def down - with_lock_retries do - remove_foreign_key_if_exists :web_hooks, column: :service_id - end - - remove_concurrent_index_by_name :web_hooks, INDEX_NAME - end -end diff --git a/db/migrate/20201119133534_add_personal_access_token_prefix_to_application_setting.rb b/db/migrate/20201119133534_add_personal_access_token_prefix_to_application_setting.rb deleted file mode 100644 index c6bb6b7d514..00000000000 --- a/db/migrate/20201119133534_add_personal_access_token_prefix_to_application_setting.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddPersonalAccessTokenPrefixToApplicationSetting < ActiveRecord::Migration[6.0] - DOWNTIME = false - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20201119133604_add_text_limit_to_application_setting_personal_access_token_prefix - def change - add_column :application_settings, :personal_access_token_prefix, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20201119133604_add_text_limit_to_application_setting_personal_access_token_prefix.rb b/db/migrate/20201119133604_add_text_limit_to_application_setting_personal_access_token_prefix.rb deleted file mode 100644 index a118da9e3e7..00000000000 --- a/db/migrate/20201119133604_add_text_limit_to_application_setting_personal_access_token_prefix.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToApplicationSettingPersonalAccessTokenPrefix < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :personal_access_token_prefix, 20 - end - - def down - remove_text_limit :application_settings, :personal_access_token_prefix - end -end diff --git a/db/migrate/20201119162801_change_services_inherit_from_id_foreign_key.rb b/db/migrate/20201119162801_change_services_inherit_from_id_foreign_key.rb deleted file mode 100644 index a7f12fcf726..00000000000 --- a/db/migrate/20201119162801_change_services_inherit_from_id_foreign_key.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class ChangeServicesInheritFromIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :services, :services, column: :inherit_from_id, on_delete: :cascade, name: 'fk_services_inherit_from_id' - remove_foreign_key_if_exists :services, name: 'fk_868a8e7ad6' - end - - def down - remove_foreign_key_if_exists :services, name: 'fk_services_inherit_from_id' - add_concurrent_foreign_key :services, :services, column: :inherit_from_id, on_delete: :nullify, name: 'fk_868a8e7ad6' - end -end diff --git a/db/migrate/20201119164605_add_checksum_into_vulnerability_remediations.rb b/db/migrate/20201119164605_add_checksum_into_vulnerability_remediations.rb deleted file mode 100644 index a9ac1ed0676..00000000000 --- a/db/migrate/20201119164605_add_checksum_into_vulnerability_remediations.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddChecksumIntoVulnerabilityRemediations < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :vulnerability_remediations, :checksum, :binary, null: false, comment: 'Stores the SHA256 checksum of the attached diff file' # rubocop:disable Rails/NotNullColumn - - add_index :vulnerability_remediations, :checksum, unique: true # rubocop:disable Migration/AddIndex (Table is empty) - end -end diff --git a/db/migrate/20201119213406_change_terraform_versioning_enabled_default.rb b/db/migrate/20201119213406_change_terraform_versioning_enabled_default.rb deleted file mode 100644 index 490fe481589..00000000000 --- a/db/migrate/20201119213406_change_terraform_versioning_enabled_default.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class ChangeTerraformVersioningEnabledDefault < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_column_default :terraform_states, :versioning_enabled, from: false, to: true - end -end diff --git a/db/migrate/20201120092000_add_kroki_formats_to_application_settings_table.rb b/db/migrate/20201120092000_add_kroki_formats_to_application_settings_table.rb deleted file mode 100644 index a059099dbc4..00000000000 --- a/db/migrate/20201120092000_add_kroki_formats_to_application_settings_table.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddKrokiFormatsToApplicationSettingsTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - change_table :application_settings do |t| - t.jsonb :kroki_formats, null: false, default: {} - end - end -end diff --git a/db/migrate/20201120125953_replace_unused_labels_index.rb b/db/migrate/20201120125953_replace_unused_labels_index.rb deleted file mode 100644 index afddbce618d..00000000000 --- a/db/migrate/20201120125953_replace_unused_labels_index.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class ReplaceUnusedLabelsIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - NEW_INDEX_NAME = 'index_labels_on_group_id_and_title_with_null_project_id' - OLD_INDEX_NAME = 'index_labels_on_group_id_and_title' - - def up - add_concurrent_index :labels, [:group_id, :title], where: 'project_id IS NULL', name: NEW_INDEX_NAME - remove_concurrent_index_by_name :labels, OLD_INDEX_NAME - end - - def down - add_concurrent_index :labels, [:group_id, :title], where: 'project_id = NULL::integer', name: OLD_INDEX_NAME - remove_concurrent_index_by_name :labels, NEW_INDEX_NAME - end -end diff --git a/db/migrate/20201120144823_create_tokens_with_iv.rb b/db/migrate/20201120144823_create_tokens_with_iv.rb deleted file mode 100644 index f8dc75513fb..00000000000 --- a/db/migrate/20201120144823_create_tokens_with_iv.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateTokensWithIv < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def change - create_table :token_with_ivs do |t| - t.binary :hashed_token, null: false - t.binary :hashed_plaintext_token, null: false - t.binary :iv, null: false - - t.index :hashed_token, name: 'index_token_with_ivs_on_hashed_token', unique: true, using: :btree - t.index :hashed_plaintext_token, name: 'index_token_with_ivs_on_hashed_plaintext_token', unique: true, using: :btree - end - end -end diff --git a/db/migrate/20201123081307_add_operations_project_feature_to_metrics.rb b/db/migrate/20201123081307_add_operations_project_feature_to_metrics.rb deleted file mode 100644 index 6801b49fae5..00000000000 --- a/db/migrate/20201123081307_add_operations_project_feature_to_metrics.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddOperationsProjectFeatureToMetrics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :project_features, :operations_access_level, :integer, default: 20, null: false - end - end - - def down - with_lock_retries do - remove_column :project_features, :operations_access_level - end - end -end diff --git a/db/migrate/20201123161611_add_provisioned_by_group_to_user_details.rb b/db/migrate/20201123161611_add_provisioned_by_group_to_user_details.rb deleted file mode 100644 index 6e4d0e84509..00000000000 --- a/db/migrate/20201123161611_add_provisioned_by_group_to_user_details.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class AddProvisionedByGroupToUserDetails < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_user_details_on_provisioned_by_group_id' - - disable_ddl_transaction! - - def up - unless column_exists?(:user_details, :provisioned_by_group_id) - with_lock_retries { add_column(:user_details, :provisioned_by_group_id, :integer, limit: 8) } - end - - add_concurrent_index :user_details, :provisioned_by_group_id, name: INDEX_NAME - add_concurrent_foreign_key :user_details, :namespaces, column: :provisioned_by_group_id, on_delete: :nullify - end - - def down - with_lock_retries { remove_foreign_key_without_error :user_details, column: :provisioned_by_group_id } - - remove_concurrent_index_by_name :user_details, INDEX_NAME - - if column_exists?(:user_details, :provisioned_by_group_id) - with_lock_retries { remove_column(:user_details, :provisioned_by_group_id) } - end - end -end diff --git a/db/migrate/20201124030537_create_incident_management_on_call_rotations.rb b/db/migrate/20201124030537_create_incident_management_on_call_rotations.rb deleted file mode 100644 index 18546d97fd5..00000000000 --- a/db/migrate/20201124030537_create_incident_management_on_call_rotations.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class CreateIncidentManagementOnCallRotations < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:incident_management_oncall_rotations) - with_lock_retries do - create_table :incident_management_oncall_rotations do |t| - t.timestamps_with_timezone - t.references :oncall_schedule, index: false, null: false, foreign_key: { to_table: :incident_management_oncall_schedules, on_delete: :cascade } - t.integer :length, null: false - t.integer :length_unit, limit: 2, null: false - t.datetime_with_timezone :starts_at, null: false - t.text :name, null: false - - t.index %w(oncall_schedule_id id), name: 'index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_id', unique: true, using: :btree - t.index %w(oncall_schedule_id name), name: 'index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_name', unique: true, using: :btree - end - end - end - - add_text_limit :incident_management_oncall_rotations, :name, 200 - end - - def down - with_lock_retries do - drop_table :incident_management_oncall_rotations - end - end -end diff --git a/db/migrate/20201124075951_create_vulnerability_external_links.rb b/db/migrate/20201124075951_create_vulnerability_external_links.rb deleted file mode 100644 index 8200b15559b..00000000000 --- a/db/migrate/20201124075951_create_vulnerability_external_links.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -class CreateVulnerabilityExternalLinks < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - create_table :vulnerability_external_issue_links, if_not_exists: true do |t| - t.timestamps_with_timezone null: false - t.references :author, null: false, index: true, foreign_key: { to_table: :users, on_delete: :nullify }, type: :bigint - t.references :vulnerability, null: false, index: true, type: :bigint - t.integer :link_type, limit: 2, null: false, default: 1 # 'created' - t.integer :external_type, limit: 2, null: false, default: 1 # 'jira' - t.text :external_project_key, null: false - t.text :external_issue_key, null: false - - t.index %i[vulnerability_id external_type external_project_key external_issue_key], - name: 'idx_vulnerability_ext_issue_links_on_vulne_id_and_ext_issue', - unique: true - t.index %i[vulnerability_id link_type], - name: 'idx_vulnerability_ext_issue_links_on_vulne_id_and_link_type', - where: 'link_type = 1', - unique: true # only one 'created' link per vulnerability is allowed - end - end - - add_concurrent_foreign_key :vulnerability_external_issue_links, :vulnerabilities, column: :vulnerability_id, on_delete: :cascade - - add_text_limit :vulnerability_external_issue_links, :external_project_key, 255 - add_text_limit :vulnerability_external_issue_links, :external_issue_key, 255 - end - - def down - with_lock_retries do - drop_table :vulnerability_external_issue_links - end - end -end diff --git a/db/migrate/20201125030847_create_dependency_proxy_manifests.rb b/db/migrate/20201125030847_create_dependency_proxy_manifests.rb deleted file mode 100644 index 6c1a3f23bf3..00000000000 --- a/db/migrate/20201125030847_create_dependency_proxy_manifests.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class CreateDependencyProxyManifests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - create_table :dependency_proxy_manifests, if_not_exists: true do |t| - t.timestamps_with_timezone - t.references :group, index: false, null: false, foreign_key: { to_table: :namespaces, on_delete: :cascade }, type: :bigint - t.bigint :size - t.integer :file_store, limit: 2 - t.text :file_name, null: false - t.text :file, null: false - t.text :digest, null: false - - t.index [:group_id, :digest], name: 'index_dependency_proxy_manifests_on_group_id_and_digest' - end - end - - add_text_limit :dependency_proxy_manifests, :file_name, 255 - add_text_limit :dependency_proxy_manifests, :file, 255 - add_text_limit :dependency_proxy_manifests, :digest, 255 - end - - def down - drop_table :dependency_proxy_manifests - end -end diff --git a/db/migrate/20201125233219_add_incident_management_on_call_participants.rb b/db/migrate/20201125233219_add_incident_management_on_call_participants.rb deleted file mode 100644 index 2a9b1d8b276..00000000000 --- a/db/migrate/20201125233219_add_incident_management_on_call_participants.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class AddIncidentManagementOnCallParticipants < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - PARTICIPANT_ROTATION_INDEX_NAME = 'index_inc_mgmnt_oncall_participants_on_oncall_rotation_id' - PARTICIPANT_USER_INDEX_NAME = 'index_inc_mgmnt_oncall_participants_on_oncall_user_id' - UNIQUE_INDEX_NAME = 'index_inc_mgmnt_oncall_participants_on_user_id_and_rotation_id' - - disable_ddl_transaction! - - def up - unless table_exists?(:incident_management_oncall_participants) - with_lock_retries do - create_table :incident_management_oncall_participants do |t| - t.references :oncall_rotation, index: false, null: false, foreign_key: { to_table: :incident_management_oncall_rotations, on_delete: :cascade } - t.references :user, index: false, null: false, foreign_key: { on_delete: :cascade } - t.integer :color_palette, limit: 2, null: false - t.integer :color_weight, limit: 2, null: false - t.index :user_id, name: PARTICIPANT_USER_INDEX_NAME - t.index :oncall_rotation_id, name: PARTICIPANT_ROTATION_INDEX_NAME - t.index [:user_id, :oncall_rotation_id], unique: true, name: UNIQUE_INDEX_NAME - end - end - end - end - - def down - drop_table :incident_management_oncall_participants - end -end diff --git a/db/migrate/20201126165919_add_epic_boards.rb b/db/migrate/20201126165919_add_epic_boards.rb deleted file mode 100644 index 432b839d6ea..00000000000 --- a/db/migrate/20201126165919_add_epic_boards.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class AddEpicBoards < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - create_table :boards_epic_boards do |t| - t.boolean :hide_backlog_list, default: false, null: false - t.boolean :hide_closed_list, default: false, null: false - t.references :group, index: true, foreign_key: { to_table: :namespaces, on_delete: :cascade }, null: false - t.timestamps_with_timezone - t.text :name, default: 'Development', null: false - end - end - - add_text_limit :boards_epic_boards, :name, 255 - end - - def down - with_lock_retries do - drop_table :boards_epic_boards - end - end -end diff --git a/db/migrate/20201126172030_add_feed_token_off_to_settings.rb b/db/migrate/20201126172030_add_feed_token_off_to_settings.rb deleted file mode 100644 index 04e05c9bd43..00000000000 --- a/db/migrate/20201126172030_add_feed_token_off_to_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddFeedTokenOffToSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :application_settings, :disable_feed_token, :boolean, null: false, default: false - end -end diff --git a/db/migrate/20201126190039_add_epic_board_labels.rb b/db/migrate/20201126190039_add_epic_board_labels.rb deleted file mode 100644 index 519e705ce14..00000000000 --- a/db/migrate/20201126190039_add_epic_board_labels.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddEpicBoardLabels < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - create_table :boards_epic_board_labels do |t| - t.references :epic_board, index: true, foreign_key: { to_table: :boards_epic_boards, on_delete: :cascade }, null: false - t.references :label, index: true, foreign_key: { on_delete: :cascade }, null: false - end - end - end - - def down - with_lock_retries do - drop_table :boards_epic_board_labels - end - end -end diff --git a/db/migrate/20201127104228_add_index_to_security_scans_on_created_at_and_id.rb b/db/migrate/20201127104228_add_index_to_security_scans_on_created_at_and_id.rb deleted file mode 100644 index c9bbe8ab77d..00000000000 --- a/db/migrate/20201127104228_add_index_to_security_scans_on_created_at_and_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToSecurityScansOnCreatedAtAndId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_security_scans_on_date_created_at_and_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :security_scans, "date(timezone('UTC', created_at)), id", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name(:security_scans, INDEX_NAME) - end -end diff --git a/db/migrate/20201127141433_add_other_role_to_user_details.rb b/db/migrate/20201127141433_add_other_role_to_user_details.rb deleted file mode 100644 index 586dbb033fd..00000000000 --- a/db/migrate/20201127141433_add_other_role_to_user_details.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class AddOtherRoleToUserDetails < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless column_exists?(:user_details, :other_role) - with_lock_retries do - add_column :user_details, :other_role, :text - end - end - - add_text_limit :user_details, :other_role, 100 - end - - def down - with_lock_retries do - remove_column :user_details, :other_role - end - end -end diff --git a/db/migrate/20201127170848_add_index_bloat_estimate_view.rb b/db/migrate/20201127170848_add_index_bloat_estimate_view.rb deleted file mode 100644 index ab268f8569e..00000000000 --- a/db/migrate/20201127170848_add_index_bloat_estimate_view.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -class AddIndexBloatEstimateView < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute(<<~SQL) - CREATE VIEW postgres_index_bloat_estimates AS - -- Originally from: https://github.com/ioguix/pgsql-bloat-estimation/blob/master/btree/btree_bloat.sql - -- WARNING: executed with a non-superuser role, the query inspect only index on tables you are granted to read. - -- WARNING: rows with is_na = 't' are known to have bad statistics ("name" type is not supported). - -- This query is compatible with PostgreSQL 8.2 and after - SELECT nspname || '.' || idxname as identifier, - CASE WHEN relpages > est_pages_ff - THEN bs*(relpages-est_pages_ff) - ELSE 0 - END::bigint AS bloat_size_bytes - FROM ( - SELECT - coalesce(1 + - ceil(reltuples/floor((bs-pageopqdata-pagehdr)*fillfactor/(100*(4+nulldatahdrwidth)::float))), 0 - ) AS est_pages_ff, - bs, nspname, tblname, idxname, relpages, is_na - FROM ( - SELECT maxalign, bs, nspname, tblname, idxname, reltuples, relpages, idxoid, fillfactor, - ( index_tuple_hdr_bm + - maxalign - CASE -- Add padding to the index tuple header to align on MAXALIGN - WHEN index_tuple_hdr_bm%maxalign = 0 THEN maxalign - ELSE index_tuple_hdr_bm%maxalign - END - + nulldatawidth + maxalign - CASE -- Add padding to the data to align on MAXALIGN - WHEN nulldatawidth = 0 THEN 0 - WHEN nulldatawidth::integer%maxalign = 0 THEN maxalign - ELSE nulldatawidth::integer%maxalign - END - )::numeric AS nulldatahdrwidth, pagehdr, pageopqdata, is_na - FROM ( - SELECT n.nspname, i.tblname, i.idxname, i.reltuples, i.relpages, - i.idxoid, i.fillfactor, current_setting('block_size')::numeric AS bs, - CASE -- MAXALIGN: 4 on 32bits, 8 on 64bits (and mingw32 ?) - WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 - ELSE 4 - END AS maxalign, - /* per page header, fixed size: 20 for 7.X, 24 for others */ - 24 AS pagehdr, - /* per page btree opaque data */ - 16 AS pageopqdata, - /* per tuple header: add IndexAttributeBitMapData if some cols are null-able */ - CASE WHEN max(coalesce(s.null_frac,0)) = 0 - THEN 2 -- IndexTupleData size - ELSE 2 + (( 32 + 8 - 1 ) / 8) -- IndexTupleData size + IndexAttributeBitMapData size ( max num filed per index + 8 - 1 /8) - END AS index_tuple_hdr_bm, - /* data len: we remove null values save space using it fractionnal part from stats */ - sum( (1-coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS nulldatawidth, - max( CASE WHEN i.atttypid = 'pg_catalog.name'::regtype THEN 1 ELSE 0 END ) > 0 AS is_na - FROM ( - SELECT ct.relname AS tblname, ct.relnamespace, ic.idxname, ic.attpos, ic.indkey, ic.indkey[ic.attpos], ic.reltuples, ic.relpages, ic.tbloid, ic.idxoid, ic.fillfactor, - coalesce(a1.attnum, a2.attnum) AS attnum, coalesce(a1.attname, a2.attname) AS attname, coalesce(a1.atttypid, a2.atttypid) AS atttypid, - CASE WHEN a1.attnum IS NULL - THEN ic.idxname - ELSE ct.relname - END AS attrelname - FROM ( - SELECT idxname, reltuples, relpages, tbloid, idxoid, fillfactor, indkey, - pg_catalog.generate_series(1,indnatts) AS attpos - FROM ( - SELECT ci.relname AS idxname, ci.reltuples, ci.relpages, i.indrelid AS tbloid, - i.indexrelid AS idxoid, - coalesce(substring( - array_to_string(ci.reloptions, ' ') - from 'fillfactor=([0-9]+)')::smallint, 90) AS fillfactor, - i.indnatts, - pg_catalog.string_to_array(pg_catalog.textin( - pg_catalog.int2vectorout(i.indkey)),' ')::int[] AS indkey - FROM pg_catalog.pg_index i - JOIN pg_catalog.pg_class ci ON ci.oid = i.indexrelid - WHERE ci.relam=(SELECT oid FROM pg_am WHERE amname = 'btree') - AND ci.relpages > 0 - ) AS idx_data - ) AS ic - JOIN pg_catalog.pg_class ct ON ct.oid = ic.tbloid - LEFT JOIN pg_catalog.pg_attribute a1 ON - ic.indkey[ic.attpos] <> 0 - AND a1.attrelid = ic.tbloid - AND a1.attnum = ic.indkey[ic.attpos] - LEFT JOIN pg_catalog.pg_attribute a2 ON - ic.indkey[ic.attpos] = 0 - AND a2.attrelid = ic.idxoid - AND a2.attnum = ic.attpos - ) i - JOIN pg_catalog.pg_namespace n ON n.oid = i.relnamespace - JOIN pg_catalog.pg_stats s ON s.schemaname = n.nspname - AND s.tablename = i.attrelname - AND s.attname = i.attname - GROUP BY 1,2,3,4,5,6,7,8,9,10,11 - ) AS rows_data_stats - ) AS rows_hdr_pdg_stats - ) AS relation_stats - WHERE nspname IN ("current_schema"(), 'gitlab_partitions_dynamic', 'gitlab_partitions_static') AND NOT is_na - ORDER BY nspname, tblname, idxname; - SQL - end - - def down - execute(<<~SQL) - DROP VIEW postgres_index_bloat_estimates - SQL - end -end diff --git a/db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb b/db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb deleted file mode 100644 index 52d24de60d5..00000000000 --- a/db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddServiceDeskReplyToIsNotNullIndexOnIssuesFix < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'idx_on_issues_where_service_desk_reply_to_is_not_null' - - disable_ddl_transaction! - - def up - add_concurrent_index(:issues, [:id], name: INDEX_NAME, where: 'service_desk_reply_to IS NOT NULL') - end - - def down - remove_concurrent_index_by_name(:issues, INDEX_NAME) - end -end diff --git a/db/migrate/20201201033202_add_verification_indexes_for_package_files.rb b/db/migrate/20201201033202_add_verification_indexes_for_package_files.rb deleted file mode 100644 index b7f55101682..00000000000 --- a/db/migrate/20201201033202_add_verification_indexes_for_package_files.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddVerificationIndexesForPackageFiles < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - PENDING_VERIFICATION_INDEX_NAME = "packages_packages_pending_verification" - FAILED_VERIFICATION_INDEX_NAME = "packages_packages_failed_verification" - NEEDS_VERIFICATION_INDEX_NAME = "packages_packages_needs_verification" - - disable_ddl_transaction! - - def up - add_concurrent_index :packages_package_files, :verified_at, where: "(verification_state = 0)", order: { verified_at: 'ASC NULLS FIRST' }, name: PENDING_VERIFICATION_INDEX_NAME - add_concurrent_index :packages_package_files, :verification_retry_at, where: "(verification_state = 3)", order: { verification_retry_at: 'ASC NULLS FIRST' }, name: FAILED_VERIFICATION_INDEX_NAME - add_concurrent_index :packages_package_files, :verification_state, where: "(verification_state = 0 OR verification_state = 3)", name: NEEDS_VERIFICATION_INDEX_NAME - end - - def down - remove_concurrent_index_by_name :packages_package_files, PENDING_VERIFICATION_INDEX_NAME - remove_concurrent_index_by_name :packages_package_files, FAILED_VERIFICATION_INDEX_NAME - remove_concurrent_index_by_name :packages_package_files, NEEDS_VERIFICATION_INDEX_NAME - end -end diff --git a/db/migrate/20201201034258_add_index_for_non_system_noteables.rb b/db/migrate/20201201034258_add_index_for_non_system_noteables.rb deleted file mode 100644 index 5927463e767..00000000000 --- a/db/migrate/20201201034258_add_index_for_non_system_noteables.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForNonSystemNoteables < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - LEGACY_INDEX_NAME = "index_notes_on_noteable_id_and_noteable_type" - NEW_INDEX_NAME = "index_notes_on_noteable_id_and_noteable_type_and_system" - - def up - add_concurrent_index :notes, [:noteable_id, :noteable_type, :system], name: NEW_INDEX_NAME - - remove_concurrent_index_by_name :notes, LEGACY_INDEX_NAME - end - - def down - add_concurrent_index :notes, [:noteable_id, :noteable_type], name: LEGACY_INDEX_NAME - - remove_concurrent_index_by_name :notes, NEW_INDEX_NAME - end -end diff --git a/db/migrate/20201201161655_add_primary_key_to_elastic_search_indexed_projects.rb b/db/migrate/20201201161655_add_primary_key_to_elastic_search_indexed_projects.rb deleted file mode 100644 index cf7221693f9..00000000000 --- a/db/migrate/20201201161655_add_primary_key_to_elastic_search_indexed_projects.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class AddPrimaryKeyToElasticSearchIndexedProjects < ActiveRecord::Migration[6.0] - DOWNTIME = false - - UNIQUE_INDEX_NAME = 'index_elasticsearch_indexed_projects_on_project_id' - PRIMARY_KEY_NAME = 'elasticsearch_indexed_projects_pkey' - - def up - execute(<<~SQL) - DELETE FROM elasticsearch_indexed_projects - WHERE project_id IS NULL - SQL - - execute(<<~SQL) - ALTER TABLE elasticsearch_indexed_projects - ALTER COLUMN project_id SET NOT NULL, - ADD CONSTRAINT #{PRIMARY_KEY_NAME} PRIMARY KEY USING INDEX #{UNIQUE_INDEX_NAME} - SQL - end - - def down - add_index :elasticsearch_indexed_projects, :project_id, unique: true, name: UNIQUE_INDEX_NAME # rubocop:disable Migration/AddIndex - - execute(<<~SQL) - ALTER TABLE elasticsearch_indexed_projects - DROP CONSTRAINT #{PRIMARY_KEY_NAME}, - ALTER COLUMN project_id DROP NOT NULL - SQL - end -end diff --git a/db/migrate/20201201163227_add_finding_uuid_to_vulnerability_feedback.rb b/db/migrate/20201201163227_add_finding_uuid_to_vulnerability_feedback.rb deleted file mode 100644 index a2e13806000..00000000000 --- a/db/migrate/20201201163227_add_finding_uuid_to_vulnerability_feedback.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddFindingUuidToVulnerabilityFeedback < ActiveRecord::Migration[6.0] - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - def change - add_column :vulnerability_feedback, :finding_uuid, :uuid - end -end diff --git a/db/migrate/20201201175656_add_index_vulnerabilities_on_project_id_and_state_and_severity.rb b/db/migrate/20201201175656_add_index_vulnerabilities_on_project_id_and_state_and_severity.rb deleted file mode 100644 index d0e8920d7a5..00000000000 --- a/db/migrate/20201201175656_add_index_vulnerabilities_on_project_id_and_state_and_severity.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexVulnerabilitiesOnProjectIdAndStateAndSeverity < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_vulnerabilities_on_project_id_and_state_and_severity' - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerabilities, [:project_id, :state, :severity], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME - end -end diff --git a/db/migrate/20201201190002_add_other_context_to_experiment_user.rb b/db/migrate/20201201190002_add_other_context_to_experiment_user.rb deleted file mode 100644 index c901f049e75..00000000000 --- a/db/migrate/20201201190002_add_other_context_to_experiment_user.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddOtherContextToExperimentUser < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :experiment_users, :context, :jsonb, default: {}, null: false - end - end - - def down - with_lock_retries do - remove_column :experiment_users, :context - end - end -end diff --git a/db/migrate/20201201192112_add_primary_key_to_elastic_search_indexed_namespaces.rb b/db/migrate/20201201192112_add_primary_key_to_elastic_search_indexed_namespaces.rb deleted file mode 100644 index 610cd2828ca..00000000000 --- a/db/migrate/20201201192112_add_primary_key_to_elastic_search_indexed_namespaces.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -class AddPrimaryKeyToElasticSearchIndexedNamespaces < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - UNIQUE_INDEX_NAME = 'index_elasticsearch_indexed_namespaces_on_namespace_id' - PRIMARY_KEY_NAME = 'elasticsearch_indexed_namespaces_pkey' - - disable_ddl_transaction! - - def up - with_lock_retries do - execute(<<~SQL) - LOCK TABLE elasticsearch_indexed_namespaces IN ACCESS EXCLUSIVE MODE; - - DELETE FROM elasticsearch_indexed_namespaces - WHERE namespace_id IS NULL; - - ALTER TABLE elasticsearch_indexed_namespaces - ADD CONSTRAINT #{PRIMARY_KEY_NAME} PRIMARY KEY USING INDEX #{UNIQUE_INDEX_NAME}; - SQL - end - end - - def down - add_concurrent_index :elasticsearch_indexed_namespaces, :namespace_id, unique: true, name: UNIQUE_INDEX_NAME - - with_lock_retries do - execute(<<~SQL) - ALTER TABLE elasticsearch_indexed_namespaces - DROP CONSTRAINT #{PRIMARY_KEY_NAME}, - ALTER COLUMN namespace_id DROP NOT NULL - SQL - end - end -end diff --git a/db/migrate/20201202003042_add_epic_board_positions.rb b/db/migrate/20201202003042_add_epic_board_positions.rb deleted file mode 100644 index 528d5ed3af1..00000000000 --- a/db/migrate/20201202003042_add_epic_board_positions.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class AddEpicBoardPositions < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - create_table :boards_epic_board_positions do |t| - t.references :epic_board, foreign_key: { to_table: :boards_epic_boards, on_delete: :cascade }, null: false, index: false - t.references :epic, foreign_key: { on_delete: :cascade }, null: false, index: true - t.integer :relative_position - - t.timestamps_with_timezone null: false - - t.index [:epic_board_id, :epic_id], unique: true, name: :index_boards_epic_board_positions_on_epic_board_id_and_epic_id - end - end - end - - def down - with_lock_retries do - drop_table :boards_epic_board_positions - end - end -end diff --git a/db/migrate/20201202025644_add_column_to_security_findings.rb b/db/migrate/20201202025644_add_column_to_security_findings.rb deleted file mode 100644 index 0b63b79d949..00000000000 --- a/db/migrate/20201202025644_add_column_to_security_findings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true -# -class AddColumnToSecurityFindings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :security_findings, :uuid, :uuid - end -end diff --git a/db/migrate/20201202025937_add_index_to_security_findings_uuid.rb b/db/migrate/20201202025937_add_index_to_security_findings_uuid.rb deleted file mode 100644 index 4c33809fbfc..00000000000 --- a/db/migrate/20201202025937_add_index_to_security_findings_uuid.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToSecurityFindingsUuid < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_security_findings_on_uuid' - - disable_ddl_transaction! - - def up - add_concurrent_index :security_findings, :uuid, name: INDEX_NAME, unique: true - end - - def down - remove_concurrent_index_by_name :security_findings, INDEX_NAME - end -end diff --git a/db/migrate/20201202133606_add_sorted_to_merge_request_diffs.rb b/db/migrate/20201202133606_add_sorted_to_merge_request_diffs.rb deleted file mode 100644 index 4c0d28d70a1..00000000000 --- a/db/migrate/20201202133606_add_sorted_to_merge_request_diffs.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddSortedToMergeRequestDiffs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :merge_request_diffs, :sorted, :boolean, null: false, default: false - end - end - - def down - with_lock_retries do - remove_column :merge_request_diffs, :sorted - end - end -end diff --git a/db/migrate/20201202142751_drop_index_vulnerabilities_on_project_id.rb b/db/migrate/20201202142751_drop_index_vulnerabilities_on_project_id.rb deleted file mode 100644 index c1ca32a1978..00000000000 --- a/db/migrate/20201202142751_drop_index_vulnerabilities_on_project_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class DropIndexVulnerabilitiesOnProjectId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_vulnerabilities_on_project_id' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME - end - - def down - add_concurrent_index :vulnerabilities, :project_id, name: INDEX_NAME - end -end diff --git a/db/migrate/20201202150001_add_details_to_vulnerability_findings.rb b/db/migrate/20201202150001_add_details_to_vulnerability_findings.rb deleted file mode 100644 index b7639bdfaa3..00000000000 --- a/db/migrate/20201202150001_add_details_to_vulnerability_findings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddDetailsToVulnerabilityFindings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :vulnerability_occurrences, :details, :jsonb, default: {}, null: false - end - end - - def down - with_lock_retries do - remove_column :vulnerability_occurrences, :details - end - end -end diff --git a/db/migrate/20201202155913_add_primary_key_to_merge_request_context_commit_diff_files.rb b/db/migrate/20201202155913_add_primary_key_to_merge_request_context_commit_diff_files.rb deleted file mode 100644 index 90c7b2731c8..00000000000 --- a/db/migrate/20201202155913_add_primary_key_to_merge_request_context_commit_diff_files.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class AddPrimaryKeyToMergeRequestContextCommitDiffFiles < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - execute(<<~SQL) - DELETE FROM merge_request_context_commit_diff_files - WHERE merge_request_context_commit_id IS NULL; - - DELETE FROM merge_request_context_commit_diff_files df1 - USING merge_request_context_commit_diff_files df2 - WHERE df1.ctid < df2.ctid - AND df1.merge_request_context_commit_id = df2.merge_request_context_commit_id - AND df1.relative_order = df2.relative_order; - - ALTER TABLE merge_request_context_commit_diff_files - ADD CONSTRAINT merge_request_context_commit_diff_files_pkey PRIMARY KEY (merge_request_context_commit_id, relative_order); - SQL - end - - def down - execute(<<~SQL) - ALTER TABLE merge_request_context_commit_diff_files - DROP CONSTRAINT merge_request_context_commit_diff_files_pkey, - ALTER COLUMN merge_request_context_commit_id DROP NOT NULL - SQL - end -end diff --git a/db/migrate/20201202160105_add_group_file_name_index_to_dependency_proxy_manifests.rb b/db/migrate/20201202160105_add_group_file_name_index_to_dependency_proxy_manifests.rb deleted file mode 100644 index a0bafeedaec..00000000000 --- a/db/migrate/20201202160105_add_group_file_name_index_to_dependency_proxy_manifests.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddGroupFileNameIndexToDependencyProxyManifests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - NEW_INDEX = 'index_dependency_proxy_manifests_on_group_id_and_file_name' - OLD_INDEX = 'index_dependency_proxy_manifests_on_group_id_and_digest' - - def up - add_concurrent_index :dependency_proxy_manifests, [:group_id, :file_name], name: NEW_INDEX, unique: true - remove_concurrent_index_by_name :dependency_proxy_manifests, OLD_INDEX - end - - def down - add_concurrent_index :dependency_proxy_manifests, [:group_id, :digest], name: OLD_INDEX - remove_concurrent_index_by_name :dependency_proxy_manifests, NEW_INDEX - end -end diff --git a/db/migrate/20201202161021_remove_redundant_index_on_merge_request_context_commit_diff_files.rb b/db/migrate/20201202161021_remove_redundant_index_on_merge_request_context_commit_diff_files.rb deleted file mode 100644 index a9c0a079955..00000000000 --- a/db/migrate/20201202161021_remove_redundant_index_on_merge_request_context_commit_diff_files.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveRedundantIndexOnMergeRequestContextCommitDiffFiles < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :merge_request_context_commit_diff_files, 'idx_mr_cc_diff_files_on_mr_cc_id' - end - - def down - # no-op: this index is not tracked in structure.sql, and is redundant due to idx_mr_cc_diff_files_on_mr_cc_id_and_sha - end -end diff --git a/db/migrate/20201203123524_add_domain_enum_to_alerts.rb b/db/migrate/20201203123524_add_domain_enum_to_alerts.rb deleted file mode 100644 index f1dec91a346..00000000000 --- a/db/migrate/20201203123524_add_domain_enum_to_alerts.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddDomainEnumToAlerts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :alert_management_alerts, :domain, :integer, limit: 2, default: 0 - end - end - - def down - with_lock_retries do - remove_column :alert_management_alerts, :domain, :integer, limit: 2 - end - end -end diff --git a/db/migrate/20201203144655_add_allow_to_edit_commit_to_project_settings.rb b/db/migrate/20201203144655_add_allow_to_edit_commit_to_project_settings.rb deleted file mode 100644 index fb2f7366955..00000000000 --- a/db/migrate/20201203144655_add_allow_to_edit_commit_to_project_settings.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddAllowToEditCommitToProjectSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/migrate/20201203171631_add_index_to_domain.rb b/db/migrate/20201203171631_add_index_to_domain.rb deleted file mode 100644 index dc7b9539e95..00000000000 --- a/db/migrate/20201203171631_add_index_to_domain.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToDomain < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - INDEX_NAME = 'index_alert_management_alerts_on_domain' - - disable_ddl_transaction! - - def up - add_concurrent_index :alert_management_alerts, :domain, name: INDEX_NAME - end - - def down - remove_concurrent_index :alert_management_alerts, :domain, name: INDEX_NAME - end -end diff --git a/db/migrate/20201204085522_add_project_id_into_vulnerability_remediations.rb b/db/migrate/20201204085522_add_project_id_into_vulnerability_remediations.rb deleted file mode 100644 index 6a136ab0389..00000000000 --- a/db/migrate/20201204085522_add_project_id_into_vulnerability_remediations.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddProjectIdIntoVulnerabilityRemediations < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - connection.execute('DELETE FROM vulnerability_remediations') - - add_column :vulnerability_remediations, :project_id, :bigint, null: false # rubocop:disable Rails/NotNullColumn - end - - def down - with_lock_retries do - remove_column :vulnerability_remediations, :project_id - end - end -end diff --git a/db/migrate/20201204090855_add_compound_index_to_vulnerability_remediations_table.rb b/db/migrate/20201204090855_add_compound_index_to_vulnerability_remediations_table.rb deleted file mode 100644 index 0b4b6e552aa..00000000000 --- a/db/migrate/20201204090855_add_compound_index_to_vulnerability_remediations_table.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class AddCompoundIndexToVulnerabilityRemediationsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - NEW_INDEX_NAME = 'index_vulnerability_remediations_on_project_id_and_checksum' - OLD_INDEX_NAME = 'index_vulnerability_remediations_on_checksum' - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerability_remediations, [:project_id, :checksum], unique: true, name: NEW_INDEX_NAME - add_concurrent_foreign_key :vulnerability_remediations, :projects, column: :project_id - - remove_concurrent_index_by_name :vulnerability_remediations, OLD_INDEX_NAME - end - - def down - add_concurrent_index :vulnerability_remediations, :checksum, unique: true, name: OLD_INDEX_NAME - - remove_concurrent_index_by_name :vulnerability_remediations, NEW_INDEX_NAME - - with_lock_retries do - remove_foreign_key_if_exists :vulnerability_remediations, column: :project_id - end - end -end diff --git a/db/migrate/20201204105300_create_packages_debian_file_metadata.rb b/db/migrate/20201204105300_create_packages_debian_file_metadata.rb deleted file mode 100644 index 2bba1b6f38e..00000000000 --- a/db/migrate/20201204105300_create_packages_debian_file_metadata.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesDebianFileMetadata < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - unless table_exists?(:packages_debian_file_metadata) - create_table :packages_debian_file_metadata, id: false do |t| - t.timestamps_with_timezone - t.references :package_file, primary_key: true, index: false, default: nil, null: false, foreign_key: { to_table: :packages_package_files, on_delete: :cascade }, type: :bigint - t.integer :file_type, limit: 2, null: false - t.text :component - t.text :architecture - t.jsonb :fields - end - end - - add_text_limit :packages_debian_file_metadata, :component, 255 - add_text_limit :packages_debian_file_metadata, :architecture, 255 - end - - def down - drop_table :packages_debian_file_metadata - end -end diff --git a/db/migrate/20201204110700_create_packages_debian_project_distributions.rb b/db/migrate/20201204110700_create_packages_debian_project_distributions.rb deleted file mode 100644 index 5fe45c6236f..00000000000 --- a/db/migrate/20201204110700_create_packages_debian_project_distributions.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesDebianProjectDistributions < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - UNIQUE_CODENAME = 'uniq_pkgs_debian_project_distributions_project_id_and_codename' - UNIQUE_SUITE = 'uniq_pkgs_debian_project_distributions_project_id_and_suite' - - disable_ddl_transaction! - - def up - with_lock_retries do - unless table_exists?(:packages_debian_project_distributions) - create_table :packages_debian_project_distributions do |t| - t.timestamps_with_timezone - t.references :project, foreign_key: { to_table: :projects, on_delete: :restrict }, null: false - t.references :creator, foreign_key: { to_table: :users, on_delete: :nullify } - t.integer :valid_time_duration_seconds - t.integer :file_store, limit: 2, default: 1, null: false - t.boolean :automatic, default: true, null: false - t.boolean :automatic_upgrades, default: false, null: false - t.text :codename, null: false - t.text :suite - t.text :origin - t.text :label - t.text :version - t.text :description - t.text :encrypted_signing_keys - t.text :encrypted_signing_keys_iv - t.text :file - t.text :file_signature - - t.index %w(project_id codename), - name: UNIQUE_CODENAME, - unique: true, - using: :btree - t.index %w(project_id suite), - name: UNIQUE_SUITE, - unique: true, - using: :btree - end - end - end - - add_text_limit :packages_debian_project_distributions, :codename, 255 - add_text_limit :packages_debian_project_distributions, :suite, 255 - add_text_limit :packages_debian_project_distributions, :origin, 255 - add_text_limit :packages_debian_project_distributions, :label, 255 - add_text_limit :packages_debian_project_distributions, :version, 255 - add_text_limit :packages_debian_project_distributions, :description, 255 - add_text_limit :packages_debian_project_distributions, :encrypted_signing_keys, 2048 - add_text_limit :packages_debian_project_distributions, :encrypted_signing_keys_iv, 255 - add_text_limit :packages_debian_project_distributions, :file, 255 - add_text_limit :packages_debian_project_distributions, :file_signature, 4096 - end - - def down - drop_table :packages_debian_project_distributions - end -end diff --git a/db/migrate/20201204110800_create_packages_debian_group_distributions.rb b/db/migrate/20201204110800_create_packages_debian_group_distributions.rb deleted file mode 100644 index 9ad9a59b3e9..00000000000 --- a/db/migrate/20201204110800_create_packages_debian_group_distributions.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesDebianGroupDistributions < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - UNIQUE_CODENAME = 'uniq_pkgs_debian_group_distributions_group_id_and_codename' - UNIQUE_SUITE = 'uniq_pkgs_debian_group_distributions_group_id_and_suite' - - disable_ddl_transaction! - - def up - with_lock_retries do - unless table_exists?(:packages_debian_group_distributions) - create_table :packages_debian_group_distributions do |t| - t.timestamps_with_timezone - t.references :group, foreign_key: { to_table: :namespaces, on_delete: :restrict }, null: false - t.references :creator, foreign_key: { to_table: :users, on_delete: :nullify } - t.integer :valid_time_duration_seconds - t.integer :file_store, limit: 2, default: 1, null: false - t.boolean :automatic, default: true, null: false - t.boolean :automatic_upgrades, default: false, null: false - t.text :codename, null: false - t.text :suite - t.text :origin - t.text :label - t.text :version - t.text :description - t.text :encrypted_signing_keys - t.text :encrypted_signing_keys_iv - t.text :file - t.text :file_signature - - t.index %w(group_id codename), - name: UNIQUE_CODENAME, - unique: true, - using: :btree - t.index %w(group_id suite), - name: UNIQUE_SUITE, - unique: true, - using: :btree - end - end - end - - add_text_limit :packages_debian_group_distributions, :codename, 255 - add_text_limit :packages_debian_group_distributions, :suite, 255 - add_text_limit :packages_debian_group_distributions, :origin, 255 - add_text_limit :packages_debian_group_distributions, :label, 255 - add_text_limit :packages_debian_group_distributions, :version, 255 - add_text_limit :packages_debian_group_distributions, :description, 255 - add_text_limit :packages_debian_group_distributions, :encrypted_signing_keys, 2048 - add_text_limit :packages_debian_group_distributions, :encrypted_signing_keys_iv, 255 - add_text_limit :packages_debian_group_distributions, :file, 255 - add_text_limit :packages_debian_group_distributions, :file_signature, 4096 - end - - def down - drop_table :packages_debian_group_distributions - end -end diff --git a/db/migrate/20201204111000_create_packages_debian_project_architectures.rb b/db/migrate/20201204111000_create_packages_debian_project_architectures.rb deleted file mode 100644 index f684a413873..00000000000 --- a/db/migrate/20201204111000_create_packages_debian_project_architectures.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesDebianProjectArchitectures < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = 'idx_pkgs_deb_proj_architectures_on_distribution_id' - UNIQUE_NAME = 'uniq_pkgs_deb_proj_architectures_on_distribution_id_and_name' - - disable_ddl_transaction! - - def up - with_lock_retries do - unless table_exists?(:packages_debian_project_architectures) - create_table :packages_debian_project_architectures do |t| - t.timestamps_with_timezone - t.references :distribution, - foreign_key: { to_table: :packages_debian_project_distributions, on_delete: :cascade }, - null: false, - index: { name: INDEX_NAME } - t.text :name, null: false - - t.index %w(distribution_id name), - name: UNIQUE_NAME, - unique: true, - using: :btree - end - end - end - - add_text_limit :packages_debian_project_architectures, :name, 255 - end - - def down - drop_table :packages_debian_project_architectures - end -end diff --git a/db/migrate/20201204111100_create_packages_debian_group_architectures.rb b/db/migrate/20201204111100_create_packages_debian_group_architectures.rb deleted file mode 100644 index 8a001414c45..00000000000 --- a/db/migrate/20201204111100_create_packages_debian_group_architectures.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesDebianGroupArchitectures < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = 'idx_pkgs_deb_grp_architectures_on_distribution_id' - UNIQUE_NAME = 'uniq_pkgs_deb_grp_architectures_on_distribution_id_and_name' - - disable_ddl_transaction! - - def up - with_lock_retries do - unless table_exists?(:packages_debian_group_architectures) - create_table :packages_debian_group_architectures do |t| - t.timestamps_with_timezone - t.references :distribution, - foreign_key: { to_table: :packages_debian_group_distributions, on_delete: :cascade }, - null: false, - index: { name: INDEX_NAME } - t.text :name, null: false - - t.index %w(distribution_id name), - name: UNIQUE_NAME, - unique: true, - using: :btree - end - end - end - - add_text_limit :packages_debian_group_architectures, :name, 255 - end - - def down - drop_table :packages_debian_group_architectures - end -end diff --git a/db/migrate/20201204111200_create_packages_debian_project_components.rb b/db/migrate/20201204111200_create_packages_debian_project_components.rb deleted file mode 100644 index 76946967357..00000000000 --- a/db/migrate/20201204111200_create_packages_debian_project_components.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesDebianProjectComponents < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - UNIQUE_NAME = 'uniq_pkgs_deb_proj_components_on_distribution_id_and_name' - - disable_ddl_transaction! - - def up - unless table_exists?(:packages_debian_project_components) - create_table :packages_debian_project_components do |t| - t.timestamps_with_timezone - t.references :distribution, - foreign_key: { to_table: :packages_debian_project_distributions, on_delete: :cascade }, - null: false, - index: false - t.text :name, null: false - - t.index %w(distribution_id name), - name: UNIQUE_NAME, - unique: true, - using: :btree - end - end - - add_text_limit :packages_debian_project_components, :name, 255 - end - - def down - drop_table :packages_debian_project_components - end -end diff --git a/db/migrate/20201204111300_create_packages_debian_group_components.rb b/db/migrate/20201204111300_create_packages_debian_group_components.rb deleted file mode 100644 index c69f8d10c2b..00000000000 --- a/db/migrate/20201204111300_create_packages_debian_group_components.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesDebianGroupComponents < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - UNIQUE_NAME = 'uniq_pkgs_deb_grp_components_on_distribution_id_and_name' - - disable_ddl_transaction! - - def up - unless table_exists?(:packages_debian_group_components) - create_table :packages_debian_group_components do |t| - t.timestamps_with_timezone - t.references :distribution, - foreign_key: { to_table: :packages_debian_group_distributions, on_delete: :cascade }, - null: false, - index: false - t.text :name, null: false - - t.index %w(distribution_id name), - name: UNIQUE_NAME, - unique: true, - using: :btree - end - end - - add_text_limit :packages_debian_group_components, :name, 255 - end - - def down - drop_table :packages_debian_group_components - end -end diff --git a/db/migrate/20201204111400_create_packages_debian_project_component_files.rb b/db/migrate/20201204111400_create_packages_debian_project_component_files.rb deleted file mode 100644 index 74ee1e9c4cf..00000000000 --- a/db/migrate/20201204111400_create_packages_debian_project_component_files.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesDebianProjectComponentFiles < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_ARCHITECTURE = 'idx_packages_debian_project_component_files_on_architecture_id' - - disable_ddl_transaction! - - def up - with_lock_retries do - unless table_exists?(:packages_debian_project_component_files) - create_table :packages_debian_project_component_files do |t| - t.timestamps_with_timezone - t.references :component, - foreign_key: { to_table: :packages_debian_project_components, on_delete: :restrict }, - null: false, - index: true - t.references :architecture, - foreign_key: { to_table: :packages_debian_project_architectures, on_delete: :restrict }, - index: { name: INDEX_ARCHITECTURE } - t.integer :size, null: false - t.integer :file_type, limit: 2, null: false - t.integer :compression_type, limit: 2 - t.integer :file_store, limit: 2, default: 1, null: false - t.text :file, null: false - t.binary :file_md5, null: false - t.binary :file_sha256, null: false - end - end - end - - add_text_limit :packages_debian_project_component_files, :file, 255 - end - - def down - drop_table :packages_debian_project_component_files - end -end diff --git a/db/migrate/20201204111500_create_packages_debian_group_component_files.rb b/db/migrate/20201204111500_create_packages_debian_group_component_files.rb deleted file mode 100644 index 2592d5b108a..00000000000 --- a/db/migrate/20201204111500_create_packages_debian_group_component_files.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesDebianGroupComponentFiles < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_ARCHITECTURE = 'idx_packages_debian_group_component_files_on_architecture_id' - - disable_ddl_transaction! - - def up - with_lock_retries do - unless table_exists?(:packages_debian_group_component_files) - create_table :packages_debian_group_component_files do |t| - t.timestamps_with_timezone - t.references :component, - foreign_key: { to_table: :packages_debian_group_components, on_delete: :restrict }, - null: false, - index: true - t.references :architecture, - foreign_key: { to_table: :packages_debian_group_architectures, on_delete: :restrict }, - index: { name: INDEX_ARCHITECTURE } - t.integer :size, null: false - t.integer :file_type, limit: 2, null: false - t.integer :compression_type, limit: 2 - t.integer :file_store, limit: 2, default: 1, null: false - t.text :file, null: false - t.binary :file_md5, null: false - t.binary :file_sha256, null: false - end - end - end - - add_text_limit :packages_debian_group_component_files, :file, 255 - end - - def down - drop_table :packages_debian_group_component_files - end -end diff --git a/db/migrate/20201204111600_create_packages_debian_publications.rb b/db/migrate/20201204111600_create_packages_debian_publications.rb deleted file mode 100644 index 2fd26c2c367..00000000000 --- a/db/migrate/20201204111600_create_packages_debian_publications.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesDebianPublications < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def change - create_table :packages_debian_publications do |t| - t.references :package, - index: { unique: true }, - null: false, - foreign_key: { to_table: :packages_packages, on_delete: :cascade } - t.references :distribution, - null: false, - foreign_key: { to_table: :packages_debian_project_distributions, on_delete: :cascade } - end - end -end diff --git a/db/migrate/20201204141038_add_trace_bytesize_to_ci_build_pending_states.rb b/db/migrate/20201204141038_add_trace_bytesize_to_ci_build_pending_states.rb deleted file mode 100644 index c866493e8d8..00000000000 --- a/db/migrate/20201204141038_add_trace_bytesize_to_ci_build_pending_states.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddTraceBytesizeToCiBuildPendingStates < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :ci_build_pending_states, :trace_bytesize, :bigint - end -end diff --git a/db/migrate/20201204193952_keep_latest_artifact_project_level.rb b/db/migrate/20201204193952_keep_latest_artifact_project_level.rb deleted file mode 100644 index 3fc9fad1dc6..00000000000 --- a/db/migrate/20201204193952_keep_latest_artifact_project_level.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class KeepLatestArtifactProjectLevel < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :project_ci_cd_settings, :keep_latest_artifact, :boolean, default: true, null: false - end - end - - def down - with_lock_retries do - remove_column :project_ci_cd_settings, :keep_latest_artifact - end - end -end diff --git a/db/migrate/20201204205814_add_member_events_to_web_hooks.rb b/db/migrate/20201204205814_add_member_events_to_web_hooks.rb deleted file mode 100644 index edb374f1bdd..00000000000 --- a/db/migrate/20201204205814_add_member_events_to_web_hooks.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddMemberEventsToWebHooks < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :web_hooks, :member_events, :boolean, null: false, default: false - end -end diff --git a/db/migrate/20201204215353_add_pull_mirror_interval_to_plan_limits.rb b/db/migrate/20201204215353_add_pull_mirror_interval_to_plan_limits.rb deleted file mode 100644 index 3484e4c8afa..00000000000 --- a/db/migrate/20201204215353_add_pull_mirror_interval_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPullMirrorIntervalToPlanLimits < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - add_column :plan_limits, :pull_mirror_interval_seconds, :integer, default: 300, null: false - end -end diff --git a/db/migrate/20201208081429_update_internal_ids_last_value_for_epics_renamed.rb b/db/migrate/20201208081429_update_internal_ids_last_value_for_epics_renamed.rb deleted file mode 100644 index fadc365d53c..00000000000 --- a/db/migrate/20201208081429_update_internal_ids_last_value_for_epics_renamed.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class UpdateInternalIdsLastValueForEpicsRenamed < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - ApplicationRecord.connection.execute(<<-SQL.squish) - UPDATE internal_ids - SET last_value = epics_max_iids.maximum_iid - FROM - ( - SELECT - MAX(epics.iid) AS maximum_iid, - epics.group_id AS epics_group_id - FROM epics - GROUP BY epics.group_id - ) epics_max_iids - WHERE internal_ids.last_value < epics_max_iids.maximum_iid - AND namespace_id = epics_max_iids.epics_group_id - AND internal_ids.usage = 4 - SQL - end - - def down - # no-op - end -end diff --git a/db/migrate/20201208143911_add_approvals_created_at_index.rb b/db/migrate/20201208143911_add_approvals_created_at_index.rb deleted file mode 100644 index cfec6b257c2..00000000000 --- a/db/migrate/20201208143911_add_approvals_created_at_index.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddApprovalsCreatedAtIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'index_approvals_on_merge_request_id_and_created_at' - - def up - add_concurrent_index :approvals, [:merge_request_id, :created_at], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :approvals, INDEX_NAME - end -end diff --git a/db/migrate/20201208181411_remove_temporary_blocking_issues_index.rb b/db/migrate/20201208181411_remove_temporary_blocking_issues_index.rb deleted file mode 100644 index ea63d2d1ed3..00000000000 --- a/db/migrate/20201208181411_remove_temporary_blocking_issues_index.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RemoveTemporaryBlockingIssuesIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name(:issue_links, 'tmp_idx_blocking_type_links') - remove_concurrent_index_by_name(:issue_links, 'tmp_idx_blocked_by_type_links') - remove_concurrent_index_by_name(:issues, 'tmp_idx_index_issues_with_outdate_blocking_count') - end - - def down - add_concurrent_index :issue_links, [:source_id], where: 'link_type = 1', name: 'tmp_idx_blocking_type_links' - add_concurrent_index :issue_links, [:target_id], where: 'link_type = 2', name: 'tmp_idx_blocked_by_type_links' - add_concurrent_index :issues, :id, where: '(state_id = 1 AND blocking_issues_count = 0)', name: 'tmp_idx_index_issues_with_outdate_blocking_count' - end -end diff --git a/db/migrate/20201208210209_create_incident_management_oncall_shifts.rb b/db/migrate/20201208210209_create_incident_management_oncall_shifts.rb deleted file mode 100644 index 49cb32ffee0..00000000000 --- a/db/migrate/20201208210209_create_incident_management_oncall_shifts.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class CreateIncidentManagementOncallShifts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - unless table_exists?(:incident_management_oncall_shifts) - with_lock_retries do - create_table :incident_management_oncall_shifts do |t| - t.references :rotation, null: false, foreign_key: { to_table: :incident_management_oncall_rotations, on_delete: :cascade } - t.references :participant, null: false, foreign_key: { to_table: :incident_management_oncall_participants, on_delete: :cascade } - t.datetime_with_timezone :starts_at, null: false - t.datetime_with_timezone :ends_at, null: false - end - - execute <<~SQL - ALTER TABLE incident_management_oncall_shifts - ADD CONSTRAINT inc_mgmnt_no_overlapping_oncall_shifts - EXCLUDE USING gist - ( rotation_id WITH =, - tstzrange(starts_at, ends_at, '[)') WITH && - ) - SQL - end - end - end - - def down - with_lock_retries do - drop_table :incident_management_oncall_shifts - end - end -end diff --git a/db/migrate/20201209154746_expand_ci_pipelines_index_on_ci_ref_id.rb b/db/migrate/20201209154746_expand_ci_pipelines_index_on_ci_ref_id.rb deleted file mode 100644 index b88763a30f9..00000000000 --- a/db/migrate/20201209154746_expand_ci_pipelines_index_on_ci_ref_id.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class ExpandCiPipelinesIndexOnCiRefId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - NEW_NAME = 'index_ci_pipelines_on_ci_ref_id_and_more' - OLD_NAME = 'index_ci_pipelines_on_ci_ref_id' - - def up - add_concurrent_index :ci_pipelines, %i[ci_ref_id id source status], order: { id: :desc }, where: 'ci_ref_id IS NOT NULL', name: NEW_NAME - - remove_concurrent_index_by_name :ci_pipelines, OLD_NAME - end - - def down - add_concurrent_index :ci_pipelines, :ci_ref_id, where: 'ci_ref_id IS NOT NULL', name: OLD_NAME - - remove_concurrent_index_by_name :ci_pipelines, NEW_NAME - end -end diff --git a/db/migrate/20201209163113_recreate_index_issue_email_participants_on_issue_id_and_email.rb b/db/migrate/20201209163113_recreate_index_issue_email_participants_on_issue_id_and_email.rb deleted file mode 100644 index 9cbf68fd63a..00000000000 --- a/db/migrate/20201209163113_recreate_index_issue_email_participants_on_issue_id_and_email.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class RecreateIndexIssueEmailParticipantsOnIssueIdAndEmail < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - OLD_INDEX_NAME = 'index_issue_email_participants_on_issue_id_and_email' - NEW_INDEX_NAME = 'index_issue_email_participants_on_issue_id_and_lower_email' - - def up - # This table is currently empty, so no need to worry about unique index violations - add_concurrent_index :issue_email_participants, 'issue_id, lower(email)', unique: true, name: NEW_INDEX_NAME - remove_concurrent_index_by_name :issue_email_participants, OLD_INDEX_NAME - end - - def down - add_concurrent_index :issue_email_participants, [:issue_id, :email], unique: true, name: OLD_INDEX_NAME - remove_concurrent_index_by_name :issue_email_participants, NEW_INDEX_NAME - end -end diff --git a/db/migrate/20201209163958_add_code_challenge_to_oauth_access_grants.rb b/db/migrate/20201209163958_add_code_challenge_to_oauth_access_grants.rb deleted file mode 100644 index 48292cce55b..00000000000 --- a/db/migrate/20201209163958_add_code_challenge_to_oauth_access_grants.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class AddCodeChallengeToOauthAccessGrants < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_column(:oauth_access_grants, :code_challenge, :text, null: true) unless column_exists?(:oauth_access_grants, :code_challenge) - # If `code_challenge_method` is 'plain' the length is at most 128 characters as per the spec - # https://tools.ietf.org/html/rfc7636#section-4.1 - # Otherwise the max length of base64(SHA256(code_verifier)) is 44 characters - add_text_limit(:oauth_access_grants, :code_challenge, 128, constraint_name: 'oauth_access_grants_code_challenge') - - add_column(:oauth_access_grants, :code_challenge_method, :text, null: true) unless column_exists?(:oauth_access_grants, :code_challenge_method) - # Values are either 'plain' or 'S256' - add_text_limit(:oauth_access_grants, :code_challenge_method, 5, constraint_name: 'oauth_access_grants_code_challenge_method') - end - - def down - remove_column(:oauth_access_grants, :code_challenge) - remove_column(:oauth_access_grants, :code_challenge_method) - end -end diff --git a/db/migrate/20201209193551_add_version_sha_cache_to_composer_metadata.rb b/db/migrate/20201209193551_add_version_sha_cache_to_composer_metadata.rb deleted file mode 100644 index 62d0cdae8bc..00000000000 --- a/db/migrate/20201209193551_add_version_sha_cache_to_composer_metadata.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddVersionShaCacheToComposerMetadata < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - add_column :packages_composer_metadata, :version_cache_sha, :binary, null: true - end - end - - def down - with_lock_retries do - remove_column :packages_composer_metadata, :version_cache_sha, :binary - end - end -end diff --git a/db/migrate/20201210101250_add_index_projects_on_import_type_and_creator_id.rb b/db/migrate/20201210101250_add_index_projects_on_import_type_and_creator_id.rb deleted file mode 100644 index 5eb8f1d658e..00000000000 --- a/db/migrate/20201210101250_add_index_projects_on_import_type_and_creator_id.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexProjectsOnImportTypeAndCreatorId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, [:creator_id, :import_type, :created_at], - where: 'import_type IS NOT NULL', - name: 'index_projects_on_creator_id_import_type_and_created_at_partial' - end - - def down - remove_concurrent_index_by_name :projects, 'index_projects_on_creator_id_import_type_and_created_at_partial' - end -end diff --git a/db/migrate/20201210175044_add_index_to_snippet_on_project_id.rb b/db/migrate/20201210175044_add_index_to_snippet_on_project_id.rb deleted file mode 100644 index 6de4a840409..00000000000 --- a/db/migrate/20201210175044_add_index_to_snippet_on_project_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToSnippetOnProjectId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - INDEX_NAME = "index_snippet_on_id_and_project_id" - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :snippets, [:id, :project_id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :snippets, INDEX_NAME - end -end diff --git a/db/migrate/20201211042306_add_deployments_finder_by_finished_at_index.rb b/db/migrate/20201211042306_add_deployments_finder_by_finished_at_index.rb deleted file mode 100644 index f937ff7a436..00000000000 --- a/db/migrate/20201211042306_add_deployments_finder_by_finished_at_index.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddDeploymentsFinderByFinishedAtIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = "index_deployments_on_project_and_finished" - - disable_ddl_transaction! - - def up - add_concurrent_index :deployments, - [:project_id, :finished_at], - where: 'status = 2', - name: INDEX_NAME - end - - def down - remove_concurrent_index :deployments, - [:project_id, :finished_at], - where: 'status = 2', - name: INDEX_NAME - end -end diff --git a/db/migrate/20210629031900_associate_existing_dast_builds_with_variables.rb b/db/migrate/20210629031900_associate_existing_dast_builds_with_variables.rb index 3d81db87143..5db39334550 100644 --- a/db/migrate/20210629031900_associate_existing_dast_builds_with_variables.rb +++ b/db/migrate/20210629031900_associate_existing_dast_builds_with_variables.rb @@ -20,7 +20,6 @@ class AssociateExistingDastBuildsWithVariables < ActiveRecord::Migration[6.1] class Build < ApplicationRecord self.table_name = 'ci_builds' self.inheritance_column = :_type_disabled - self.gitlab_schema = :gitlab_ci default_scope { where(name: :dast, stage: :dast) } # rubocop:disable Cop/DefaultScope end diff --git a/db/migrate/20211004122540_create_member_tasks.rb b/db/migrate/20211004122540_create_member_tasks.rb new file mode 100644 index 00000000000..e1141873bcb --- /dev/null +++ b/db/migrate/20211004122540_create_member_tasks.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class CreateMemberTasks < Gitlab::Database::Migration[1.0] + def change + create_table :member_tasks do |t| + t.references :member, index: true, null: false + t.references :project, index: true, null: false + t.timestamps_with_timezone null: false + t.integer :tasks, limit: 2, array: true, null: false, default: [] + t.index [:member_id, :project_id], unique: true + end + end +end diff --git a/db/migrate/20211005112404_add_member_id_foreign_key_to_member_tasks.rb b/db/migrate/20211005112404_add_member_id_foreign_key_to_member_tasks.rb new file mode 100644 index 00000000000..f3447918ad3 --- /dev/null +++ b/db/migrate/20211005112404_add_member_id_foreign_key_to_member_tasks.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddMemberIdForeignKeyToMemberTasks < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + add_concurrent_foreign_key :member_tasks, :members, column: :member_id, on_delete: :cascade + end + + def down + with_lock_retries do + remove_foreign_key :member_tasks, column: :member_id + end + end +end diff --git a/db/migrate/20211005112645_add_project_id_foreign_key_to_member_tasks.rb b/db/migrate/20211005112645_add_project_id_foreign_key_to_member_tasks.rb new file mode 100644 index 00000000000..ead6bb88e60 --- /dev/null +++ b/db/migrate/20211005112645_add_project_id_foreign_key_to_member_tasks.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddProjectIdForeignKeyToMemberTasks < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + add_concurrent_foreign_key :member_tasks, :projects, column: :project_id, on_delete: :cascade + end + + def down + with_lock_retries do + remove_foreign_key :member_tasks, column: :project_id + end + end +end diff --git a/db/migrate/20211008193137_add_health_status_column_on_clusters_integration_prometheus.rb b/db/migrate/20211008193137_add_health_status_column_on_clusters_integration_prometheus.rb new file mode 100644 index 00000000000..a69d12d4e52 --- /dev/null +++ b/db/migrate/20211008193137_add_health_status_column_on_clusters_integration_prometheus.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +class AddHealthStatusColumnOnClustersIntegrationPrometheus < Gitlab::Database::Migration[1.0] + def change + # For now, health checks will only run on monitor demo projects + add_column :clusters_integration_prometheus, :health_status, :smallint, limit: 2, default: 0, null: false + end +end diff --git a/db/migrate/20211011004242_create_content_blocked_states.rb b/db/migrate/20211011004242_create_content_blocked_states.rb new file mode 100644 index 00000000000..d70717f9786 --- /dev/null +++ b/db/migrate/20211011004242_create_content_blocked_states.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class CreateContentBlockedStates < Gitlab::Database::Migration[1.0] + def change + create_table :content_blocked_states, comment: 'JiHu-specific table' do |t| + t.timestamps_with_timezone null: false + t.binary :commit_sha, null: false + t.binary :blob_sha, null: false + t.text :path, null: false, limit: 2048 + t.text :container_identifier, null: false, limit: 255 + + t.index [:container_identifier, :commit_sha, :path], name: 'index_content_blocked_states_on_container_id_commit_sha_path', unique: true + end + end +end diff --git a/db/migrate/20211012015903_next_traversal_ids_sibling_function.rb b/db/migrate/20211012015903_next_traversal_ids_sibling_function.rb new file mode 100644 index 00000000000..f32b8fc5a65 --- /dev/null +++ b/db/migrate/20211012015903_next_traversal_ids_sibling_function.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +class NextTraversalIdsSiblingFunction < Gitlab::Database::Migration[1.0] + include Gitlab::Database::SchemaHelpers + + FUNCTION_NAME = 'next_traversal_ids_sibling' + + def up + # Given array [1,2,3,4,5], concatenate the first part of the array [1,2,3,4] + # with the last element in the array (5) after being incremented ([6]). + # + # [1,2,3,4,5] => [1,2,3,4,6] + execute(<<~SQL) + CREATE OR REPLACE FUNCTION #{FUNCTION_NAME}(traversal_ids INT[]) RETURNS INT[] + AS $$ + BEGIN + return traversal_ids[1:array_length(traversal_ids, 1)-1] || + ARRAY[traversal_ids[array_length(traversal_ids, 1)]+1]; + END; + $$ + LANGUAGE plpgsql + IMMUTABLE + RETURNS NULL ON NULL INPUT; + SQL + end + + def down + execute("DROP FUNCTION #{FUNCTION_NAME}(traversal_ids INT[])") + end +end diff --git a/db/migrate/20211012134316_clean_up_migrate_merge_request_diff_commit_users.rb b/db/migrate/20211012134316_clean_up_migrate_merge_request_diff_commit_users.rb new file mode 100644 index 00000000000..443dbe37c0b --- /dev/null +++ b/db/migrate/20211012134316_clean_up_migrate_merge_request_diff_commit_users.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +class CleanUpMigrateMergeRequestDiffCommitUsers < Gitlab::Database::Migration[1.0] + def up + jobs = Gitlab::Database::BackgroundMigrationJob + .for_migration_class('MigrateMergeRequestDiffCommitUsers') + .pending + .to_a + + return if jobs.empty? + + say("#{jobs.length} MigrateMergeRequestDiffCommitUsers are still pending") + + # Normally we don't process background migrations in a regular migration, as + # this could take a while to complete and thus block a deployment. + # + # In this case the jobs have all been processed for GitLab.com at the time + # of writing. In addition, it's been a few releases since this migration was + # introduced. As a result, self-hosted instances should have their + # migrations finished a long time ago. + # + # For these reasons we clean up any pending jobs (just in case) before + # deploying the code. This also allows us to immediately start using the new + # setup only, instead of having to support both the old and new approach for + # at least one more release. + jobs.each do |job| + Gitlab::BackgroundMigration::MigrateMergeRequestDiffCommitUsers + .new + .perform(*job.arguments) + end + end + + def down + end +end diff --git a/db/migrate/20211013014228_add_content_validation_endpoint_to_application_settings.rb b/db/migrate/20211013014228_add_content_validation_endpoint_to_application_settings.rb new file mode 100644 index 00000000000..9a79fdca192 --- /dev/null +++ b/db/migrate/20211013014228_add_content_validation_endpoint_to_application_settings.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class AddContentValidationEndpointToApplicationSettings < Gitlab::Database::Migration[1.0] + def up + # rubocop:disable Migration/AddLimitToTextColumns + add_column :application_settings, :content_validation_endpoint_url, :text, comment: 'JiHu-specific column' + # rubocop:disable Migration/AddLimitToTextColumns + + add_column :application_settings, :encrypted_content_validation_api_key, :binary, comment: 'JiHu-specific column' + add_column :application_settings, :encrypted_content_validation_api_key_iv, :binary, comment: 'JiHu-specific column' + add_column :application_settings, :content_validation_endpoint_enabled, :boolean, null: false, default: false, comment: 'JiHu-specific column' + end + + def down + remove_column :application_settings, :content_validation_endpoint_url + remove_column :application_settings, :encrypted_content_validation_api_key + remove_column :application_settings, :encrypted_content_validation_api_key_iv + remove_column :application_settings, :content_validation_endpoint_enabled + end +end diff --git a/db/migrate/20211013080714_add_network_to_user_credit_card_validations.rb b/db/migrate/20211013080714_add_network_to_user_credit_card_validations.rb new file mode 100644 index 00000000000..eee4cbad796 --- /dev/null +++ b/db/migrate/20211013080714_add_network_to_user_credit_card_validations.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddNetworkToUserCreditCardValidations < Gitlab::Database::Migration[1.0] + # rubocop:disable Migration/AddLimitToTextColumns + def change + add_column :user_credit_card_validations, :network, :text + end + # rubocop:enable Migration/AddLimitToTextColumns +end diff --git a/db/migrate/20211013080715_limit_network_on_user_credit_card_validations.rb b/db/migrate/20211013080715_limit_network_on_user_credit_card_validations.rb new file mode 100644 index 00000000000..38a019e718d --- /dev/null +++ b/db/migrate/20211013080715_limit_network_on_user_credit_card_validations.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class LimitNetworkOnUserCreditCardValidations < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + add_text_limit :user_credit_card_validations, :network, 32 + end + + def down + remove_text_limit :user_credit_card_validations, :network + end +end diff --git a/db/migrate/20211013080716_index_include_network_on_user_credit_card_validations.rb b/db/migrate/20211013080716_index_include_network_on_user_credit_card_validations.rb new file mode 100644 index 00000000000..849dbab77db --- /dev/null +++ b/db/migrate/20211013080716_index_include_network_on_user_credit_card_validations.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class IndexIncludeNetworkOnUserCreditCardValidations < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + INDEX_NAME = 'index_user_credit_card_validations_meta_data_partial_match' + + def up + add_concurrent_index :user_credit_card_validations, + [:expiration_date, :last_digits, :network, :credit_card_validated_at], + name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :user_credit_card_validations, INDEX_NAME + end +end diff --git a/db/migrate/20211013192749_add_states_into_approval_project_rules.rb b/db/migrate/20211013192749_add_states_into_approval_project_rules.rb new file mode 100644 index 00000000000..98fefbab12c --- /dev/null +++ b/db/migrate/20211013192749_add_states_into_approval_project_rules.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class AddStatesIntoApprovalProjectRules < Gitlab::Database::Migration[1.0] + def up + add_column :approval_project_rules, :vulnerability_states, :text, array: true, null: false, default: ['newly_detected'] + end + + def down + remove_column :approval_project_rules, :vulnerability_states + end +end diff --git a/db/migrate/20211015021114_add_merge_commit_template_to_project_settings.rb b/db/migrate/20211015021114_add_merge_commit_template_to_project_settings.rb new file mode 100644 index 00000000000..adf2fdb2da7 --- /dev/null +++ b/db/migrate/20211015021114_add_merge_commit_template_to_project_settings.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddMergeCommitTemplateToProjectSettings < Gitlab::Database::Migration[1.0] + enable_lock_retries! + + def change + add_column :project_settings, :merge_commit_template, :text # rubocop:disable Migration/AddLimitToTextColumns + end +end diff --git a/db/migrate/20211015024135_add_merge_commit_template_limit_to_project_settings.rb b/db/migrate/20211015024135_add_merge_commit_template_limit_to_project_settings.rb new file mode 100644 index 00000000000..972872b8d2a --- /dev/null +++ b/db/migrate/20211015024135_add_merge_commit_template_limit_to_project_settings.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class AddMergeCommitTemplateLimitToProjectSettings < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + add_text_limit :project_settings, :merge_commit_template, 500 + end + + def down + remove_text_limit :project_settings, :merge_commit_template + end +end diff --git a/db/migrate/20211018101034_add_tmp_project_id_column_to_namespaces.rb b/db/migrate/20211018101034_add_tmp_project_id_column_to_namespaces.rb new file mode 100644 index 00000000000..cc73cb5047b --- /dev/null +++ b/db/migrate/20211018101034_add_tmp_project_id_column_to_namespaces.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class AddTmpProjectIdColumnToNamespaces < Gitlab::Database::Migration[1.0] + enable_lock_retries! + + def change + # this is a temporary column to be able to batch insert records into namespaces table and then be able to link these + # to projects table. + add_column :namespaces, :tmp_project_id, :integer # rubocop: disable Migration/AddColumnsToWideTables + end +end diff --git a/db/migrate/20211018161447_fix_double_entries_in_postgres_index_view.rb b/db/migrate/20211018161447_fix_double_entries_in_postgres_index_view.rb new file mode 100644 index 00000000000..574f54bc60e --- /dev/null +++ b/db/migrate/20211018161447_fix_double_entries_in_postgres_index_view.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +class FixDoubleEntriesInPostgresIndexView < Gitlab::Database::Migration[1.0] + def up + execute(<<~SQL) + DROP VIEW IF EXISTS postgres_indexes; + + CREATE VIEW postgres_indexes AS + SELECT (pg_namespace.nspname::text || '.'::text) || i.relname::text AS identifier, + pg_index.indexrelid, + pg_namespace.nspname AS schema, + i.relname AS name, + pg_indexes.tablename, + a.amname AS type, + pg_index.indisunique AS "unique", + pg_index.indisvalid AS valid_index, + i.relispartition AS partitioned, + pg_index.indisexclusion AS exclusion, + pg_index.indexprs IS NOT NULL AS expression, + pg_index.indpred IS NOT NULL AS partial, + pg_indexes.indexdef AS definition, + pg_relation_size(i.oid::regclass) AS ondisk_size_bytes + FROM pg_index + JOIN pg_class i ON i.oid = pg_index.indexrelid + JOIN pg_namespace ON i.relnamespace = pg_namespace.oid + JOIN pg_indexes ON i.relname = pg_indexes.indexname AND pg_namespace.nspname = pg_indexes.schemaname + JOIN pg_am a ON i.relam = a.oid + WHERE pg_namespace.nspname <> 'pg_catalog'::name AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name])); + SQL + end + + def down + execute(<<~SQL) + DROP VIEW IF EXISTS postgres_indexes; + + CREATE VIEW postgres_indexes AS + SELECT (pg_namespace.nspname::text || '.'::text) || i.relname::text AS identifier, + pg_index.indexrelid, + pg_namespace.nspname AS schema, + i.relname AS name, + pg_indexes.tablename, + a.amname AS type, + pg_index.indisunique AS "unique", + pg_index.indisvalid AS valid_index, + i.relispartition AS partitioned, + pg_index.indisexclusion AS exclusion, + pg_index.indexprs IS NOT NULL AS expression, + pg_index.indpred IS NOT NULL AS partial, + pg_indexes.indexdef AS definition, + pg_relation_size(i.oid::regclass) AS ondisk_size_bytes + FROM pg_index + JOIN pg_class i ON i.oid = pg_index.indexrelid + JOIN pg_namespace ON i.relnamespace = pg_namespace.oid + JOIN pg_indexes ON i.relname = pg_indexes.indexname + JOIN pg_am a ON i.relam = a.oid + WHERE pg_namespace.nspname <> 'pg_catalog'::name AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name])); + SQL + end +end diff --git a/db/migrate/20211019153615_add_state_to_merge_request_assignees.rb b/db/migrate/20211019153615_add_state_to_merge_request_assignees.rb new file mode 100644 index 00000000000..0eb8d0989a5 --- /dev/null +++ b/db/migrate/20211019153615_add_state_to_merge_request_assignees.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +class AddStateToMergeRequestAssignees < Gitlab::Database::Migration[1.0] + REVIEW_DEFAULT_STATE = 0 + + def change + add_column :merge_request_assignees, :state, :smallint, default: REVIEW_DEFAULT_STATE, null: false + end +end diff --git a/db/migrate/20211020030948_add_runtime_runner_features_to_ci_builds_metadata.rb b/db/migrate/20211020030948_add_runtime_runner_features_to_ci_builds_metadata.rb new file mode 100644 index 00000000000..970c018df46 --- /dev/null +++ b/db/migrate/20211020030948_add_runtime_runner_features_to_ci_builds_metadata.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddRuntimeRunnerFeaturesToCiBuildsMetadata < Gitlab::Database::Migration[1.0] + enable_lock_retries! + + def change + add_column :ci_builds_metadata, :runtime_runner_features, :jsonb, default: {}, null: false + end +end diff --git a/db/migrate/20211020095357_add_group_traversal_id_index.rb b/db/migrate/20211020095357_add_group_traversal_id_index.rb new file mode 100644 index 00000000000..e4739ff217e --- /dev/null +++ b/db/migrate/20211020095357_add_group_traversal_id_index.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddGroupTraversalIdIndex < Gitlab::Database::Migration[1.0] + INDEX_NAME = 'index_namespaces_on_traversal_ids_for_groups' + + disable_ddl_transaction! + + def up + add_concurrent_index :namespaces, :traversal_ids, using: :gin, where: "type='Group'", name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :namespaces, INDEX_NAME + end +end diff --git a/db/migrate/20211021125908_add_sentry_settings_to_application_settings.rb b/db/migrate/20211021125908_add_sentry_settings_to_application_settings.rb new file mode 100644 index 00000000000..d8b40893b47 --- /dev/null +++ b/db/migrate/20211021125908_add_sentry_settings_to_application_settings.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class AddSentrySettingsToApplicationSettings < Gitlab::Database::Migration[1.0] + # rubocop:disable Migration/AddLimitToTextColumns + def change + add_column :application_settings, :sentry_enabled, :boolean, default: false, null: false + add_column :application_settings, :sentry_dsn, :text + add_column :application_settings, :sentry_clientside_dsn, :text + add_column :application_settings, :sentry_environment, :text + end + # rubocop:enable Migration/AddLimitToTextColumns +end diff --git a/db/migrate/20211021134458_add_limits_to_sentry_settings_on_application_settings.rb b/db/migrate/20211021134458_add_limits_to_sentry_settings_on_application_settings.rb new file mode 100644 index 00000000000..34d18741788 --- /dev/null +++ b/db/migrate/20211021134458_add_limits_to_sentry_settings_on_application_settings.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddLimitsToSentrySettingsOnApplicationSettings < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + add_text_limit :application_settings, :sentry_dsn, 255 + add_text_limit :application_settings, :sentry_clientside_dsn, 255 + add_text_limit :application_settings, :sentry_environment, 255 + end + + def down + remove_text_limit :application_settings, :sentry_dsn + remove_text_limit :application_settings, :sentry_clientside_dsn + remove_text_limit :application_settings, :sentry_environment + end +end diff --git a/db/migrate/20211025103744_add_state_id_to_vsa_issue_stage_events.rb b/db/migrate/20211025103744_add_state_id_to_vsa_issue_stage_events.rb new file mode 100644 index 00000000000..345cd1785ea --- /dev/null +++ b/db/migrate/20211025103744_add_state_id_to_vsa_issue_stage_events.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddStateIdToVsaIssueStageEvents < Gitlab::Database::Migration[1.0] + def change + add_column :analytics_cycle_analytics_issue_stage_events, :state_id, :smallint, default: 1, null: false + end +end diff --git a/db/migrate/20211025103758_add_state_id_to_vsa_merge_request_stage_events.rb b/db/migrate/20211025103758_add_state_id_to_vsa_merge_request_stage_events.rb new file mode 100644 index 00000000000..be28d56e19d --- /dev/null +++ b/db/migrate/20211025103758_add_state_id_to_vsa_merge_request_stage_events.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddStateIdToVsaMergeRequestStageEvents < Gitlab::Database::Migration[1.0] + def change + add_column :analytics_cycle_analytics_merge_request_stage_events, :state_id, :smallint, default: 1, null: false + end +end diff --git a/db/migrate/20211026143238_remove_index_releases_on_author_id.rb b/db/migrate/20211026143238_remove_index_releases_on_author_id.rb new file mode 100644 index 00000000000..7cd086dbf7d --- /dev/null +++ b/db/migrate/20211026143238_remove_index_releases_on_author_id.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class RemoveIndexReleasesOnAuthorId < Gitlab::Database::Migration[1.0] + INDEX_NAME = 'index_releases_on_author_id' + + disable_ddl_transaction! + + def up + remove_concurrent_index_by_name :releases, INDEX_NAME + end + + def down + add_concurrent_index :releases, [:author_id], name: INDEX_NAME + end +end diff --git a/db/migrate/20211027203950_add_updated_index_for_dormant_users.rb b/db/migrate/20211027203950_add_updated_index_for_dormant_users.rb new file mode 100644 index 00000000000..8b004af06c0 --- /dev/null +++ b/db/migrate/20211027203950_add_updated_index_for_dormant_users.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddUpdatedIndexForDormantUsers < Gitlab::Database::Migration[1.0] + INDEX_NAME = 'index_users_on_id_and_last_activity_on_for_active_human_service' + + disable_ddl_transaction! + + def up + index_condition = "state = 'active' AND (users.user_type IS NULL OR users.user_type = 4)" + + add_concurrent_index :users, [:id, :last_activity_on], where: index_condition, name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :users, INDEX_NAME + end +end diff --git a/db/migrate/20211028132247_create_packages_npm_metadata.rb b/db/migrate/20211028132247_create_packages_npm_metadata.rb new file mode 100644 index 00000000000..cbe5429fca1 --- /dev/null +++ b/db/migrate/20211028132247_create_packages_npm_metadata.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class CreatePackagesNpmMetadata < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + with_lock_retries do + create_table :packages_npm_metadata, id: false do |t| + t.references :package, primary_key: true, default: nil, index: false, foreign_key: { to_table: :packages_packages, on_delete: :cascade }, type: :bigint + t.jsonb :package_json, default: {}, null: false + + t.check_constraint 'char_length(package_json::text) < 20000' + end + end + end + + def down + with_lock_retries do + drop_table :packages_npm_metadata + end + end +end diff --git a/db/migrate/20211028212259_add_default_to_personal_access_tokens_prefix.rb b/db/migrate/20211028212259_add_default_to_personal_access_tokens_prefix.rb new file mode 100644 index 00000000000..d9949863a92 --- /dev/null +++ b/db/migrate/20211028212259_add_default_to_personal_access_tokens_prefix.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddDefaultToPersonalAccessTokensPrefix < Gitlab::Database::Migration[1.0] + def change + change_column_default(:application_settings, :personal_access_token_prefix, from: nil, to: 'glpat-') + end +end diff --git a/db/migrate/20211101132310_add_reindexing_queue.rb b/db/migrate/20211101132310_add_reindexing_queue.rb new file mode 100644 index 00000000000..d9d1f9dce89 --- /dev/null +++ b/db/migrate/20211101132310_add_reindexing_queue.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class AddReindexingQueue < Gitlab::Database::Migration[1.0] + def change + create_table :postgres_reindex_queued_actions do |t| + t.text :index_identifier, null: false, limit: 255 + t.integer :state, limit: 2, null: false, default: 0 + t.timestamps_with_timezone null: false + + t.index :state + end + + change_column_default :postgres_reindex_queued_actions, :created_at, from: nil, to: -> { 'NOW()' } + change_column_default :postgres_reindex_queued_actions, :updated_at, from: nil, to: -> { 'NOW()' } + end +end diff --git a/db/migrate/20211103062728_add_with_highest_role_minimal_access_to_users_statistics.rb b/db/migrate/20211103062728_add_with_highest_role_minimal_access_to_users_statistics.rb new file mode 100644 index 00000000000..43cd7afbf06 --- /dev/null +++ b/db/migrate/20211103062728_add_with_highest_role_minimal_access_to_users_statistics.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddWithHighestRoleMinimalAccessToUsersStatistics < Gitlab::Database::Migration[1.0] + def change + add_column :users_statistics, :with_highest_role_minimal_access, :integer, null: false, default: 0 + end +end diff --git a/db/migrate/20211104012209_add_text_limit_to_application_settings_content_validation_endpoint_url.rb b/db/migrate/20211104012209_add_text_limit_to_application_settings_content_validation_endpoint_url.rb new file mode 100644 index 00000000000..4062fd1be01 --- /dev/null +++ b/db/migrate/20211104012209_add_text_limit_to_application_settings_content_validation_endpoint_url.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class AddTextLimitToApplicationSettingsContentValidationEndpointUrl < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + add_text_limit :application_settings, :content_validation_endpoint_url, 255 + end + + def down + remove_text_limit :application_settings, :content_validation_endpoint_url + end +end diff --git a/db/migrate/20211105010101_add_archived_column_to_deployments.rb b/db/migrate/20211105010101_add_archived_column_to_deployments.rb new file mode 100644 index 00000000000..f9ac81915b4 --- /dev/null +++ b/db/migrate/20211105010101_add_archived_column_to_deployments.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddArchivedColumnToDeployments < Gitlab::Database::Migration[1.0] + enable_lock_retries! + + def change + add_column :deployments, :archived, :boolean, default: false, null: false + end +end diff --git a/db/migrate/20211105125756_add_read_at_to_dependency_proxy_manifests.rb b/db/migrate/20211105125756_add_read_at_to_dependency_proxy_manifests.rb new file mode 100644 index 00000000000..a594674f470 --- /dev/null +++ b/db/migrate/20211105125756_add_read_at_to_dependency_proxy_manifests.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddReadAtToDependencyProxyManifests < Gitlab::Database::Migration[1.0] + def change + add_column :dependency_proxy_manifests, :read_at, :datetime_with_timezone, null: false, default: -> { 'NOW()' } + end +end diff --git a/db/migrate/20211105125813_add_read_at_to_dependency_proxy_blobs.rb b/db/migrate/20211105125813_add_read_at_to_dependency_proxy_blobs.rb new file mode 100644 index 00000000000..1808a541498 --- /dev/null +++ b/db/migrate/20211105125813_add_read_at_to_dependency_proxy_blobs.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddReadAtToDependencyProxyBlobs < Gitlab::Database::Migration[1.0] + def change + add_column :dependency_proxy_blobs, :read_at, :datetime_with_timezone, null: false, default: -> { 'NOW()' } + end +end diff --git a/db/migrate/20211105160316_create_dotenv_application_limits.rb b/db/migrate/20211105160316_create_dotenv_application_limits.rb new file mode 100644 index 00000000000..3ea94fd60fc --- /dev/null +++ b/db/migrate/20211105160316_create_dotenv_application_limits.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +class CreateDotenvApplicationLimits < Gitlab::Database::Migration[1.0] + def change + add_column(:plan_limits, :dotenv_variables, :integer, default: 20, null: false) + add_column(:plan_limits, :dotenv_size, :integer, default: 5.kilobytes, null: false) + end +end diff --git a/db/migrate/20211105161404_insert_dotenv_application_limits.rb b/db/migrate/20211105161404_insert_dotenv_application_limits.rb new file mode 100644 index 00000000000..2749cf4a019 --- /dev/null +++ b/db/migrate/20211105161404_insert_dotenv_application_limits.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +class InsertDotenvApplicationLimits < Gitlab::Database::Migration[1.0] + def up + create_or_update_plan_limit('dotenv_variables', 'default', 150) + create_or_update_plan_limit('dotenv_variables', 'free', 50) + create_or_update_plan_limit('dotenv_variables', 'opensource', 150) + create_or_update_plan_limit('dotenv_variables', 'premium', 100) + create_or_update_plan_limit('dotenv_variables', 'premium_trial', 100) + create_or_update_plan_limit('dotenv_variables', 'ultimate', 150) + create_or_update_plan_limit('dotenv_variables', 'ultimate_trial', 150) + + create_or_update_plan_limit('dotenv_size', 'default', 5.kilobytes) + end + + def down + create_or_update_plan_limit('dotenv_variables', 'default', 20) + create_or_update_plan_limit('dotenv_variables', 'free', 20) + create_or_update_plan_limit('dotenv_variables', 'opensource', 20) + create_or_update_plan_limit('dotenv_variables', 'premium', 20) + create_or_update_plan_limit('dotenv_variables', 'premium_trial', 20) + create_or_update_plan_limit('dotenv_variables', 'ultimate', 20) + create_or_update_plan_limit('dotenv_variables', 'ultimate_trial', 20) + + create_or_update_plan_limit('dotenv_size', 'default', 5.kilobytes) + end +end diff --git a/db/migrate/20211108154510_create_pipeline_triggers_application_limits.rb b/db/migrate/20211108154510_create_pipeline_triggers_application_limits.rb new file mode 100644 index 00000000000..38671c75e0c --- /dev/null +++ b/db/migrate/20211108154510_create_pipeline_triggers_application_limits.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class CreatePipelineTriggersApplicationLimits < Gitlab::Database::Migration[1.0] + def change + add_column(:plan_limits, :pipeline_triggers, :integer, default: 25_000, null: false) + end +end diff --git a/db/migrate/20211108154841_insert_pipeline_triggers_application_limits.rb b/db/migrate/20211108154841_insert_pipeline_triggers_application_limits.rb new file mode 100644 index 00000000000..c1341fad729 --- /dev/null +++ b/db/migrate/20211108154841_insert_pipeline_triggers_application_limits.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class InsertPipelineTriggersApplicationLimits < Gitlab::Database::Migration[1.0] + def up + create_or_update_plan_limit('pipeline_triggers', 'default', 0) + create_or_update_plan_limit('pipeline_triggers', 'free', 25_000) + create_or_update_plan_limit('pipeline_triggers', 'opensource', 0) + create_or_update_plan_limit('pipeline_triggers', 'premium', 0) + create_or_update_plan_limit('pipeline_triggers', 'premium_trial', 0) + create_or_update_plan_limit('pipeline_triggers', 'ultimate', 0) + create_or_update_plan_limit('pipeline_triggers', 'ultimate_trial', 0) + end + + def down + create_or_update_plan_limit('pipeline_triggers', 'default', 0) + create_or_update_plan_limit('pipeline_triggers', 'free', 0) + create_or_update_plan_limit('pipeline_triggers', 'opensource', 0) + create_or_update_plan_limit('pipeline_triggers', 'premium', 0) + create_or_update_plan_limit('pipeline_triggers', 'premium_trial', 0) + create_or_update_plan_limit('pipeline_triggers', 'ultimate', 0) + create_or_update_plan_limit('pipeline_triggers', 'ultimate_trial', 0) + end +end diff --git a/db/migrate/20211108203248_update_dependency_proxy_indexes_with_read_at.rb b/db/migrate/20211108203248_update_dependency_proxy_indexes_with_read_at.rb new file mode 100644 index 00000000000..ac0f0ddca17 --- /dev/null +++ b/db/migrate/20211108203248_update_dependency_proxy_indexes_with_read_at.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +class UpdateDependencyProxyIndexesWithReadAt < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + NEW_BLOB_INDEX = 'index_dependency_proxy_blobs_on_group_id_status_read_at_id' + OLD_BLOB_INDEX = 'index_dependency_proxy_blobs_on_group_id_status_and_id' + + NEW_MANIFEST_INDEX = 'index_dependency_proxy_manifests_on_group_id_status_read_at_id' + OLD_MANIFEST_INDEX = 'index_dependency_proxy_manifests_on_group_id_status_and_id' + + def up + add_concurrent_index :dependency_proxy_blobs, [:group_id, :status, :read_at, :id], name: NEW_BLOB_INDEX + add_concurrent_index :dependency_proxy_manifests, [:group_id, :status, :read_at, :id], name: NEW_MANIFEST_INDEX + + remove_concurrent_index_by_name :dependency_proxy_blobs, OLD_BLOB_INDEX + remove_concurrent_index_by_name :dependency_proxy_manifests, OLD_MANIFEST_INDEX + end + + def down + add_concurrent_index :dependency_proxy_blobs, [:group_id, :status, :id], name: OLD_BLOB_INDEX + add_concurrent_index :dependency_proxy_manifests, [:group_id, :status, :id], name: OLD_MANIFEST_INDEX + + remove_concurrent_index_by_name :dependency_proxy_blobs, NEW_BLOB_INDEX + remove_concurrent_index_by_name :dependency_proxy_manifests, NEW_MANIFEST_INDEX + end +end diff --git a/db/migrate/20211108211434_remove_index_for_resource_group.rb b/db/migrate/20211108211434_remove_index_for_resource_group.rb new file mode 100644 index 00000000000..8b03f12d08b --- /dev/null +++ b/db/migrate/20211108211434_remove_index_for_resource_group.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class RemoveIndexForResourceGroup < Gitlab::Database::Migration[1.0] + INDEX_NAME = 'index_for_resource_group' + + disable_ddl_transaction! + + def up + remove_concurrent_index_by_name :ci_builds, INDEX_NAME + end + + def down + # rubocop:disable Migration/PreventIndexCreation + add_concurrent_index :ci_builds, [:resource_group_id, :id], where: 'resource_group_id IS NOT NULL', name: INDEX_NAME + # rubocop:enable Migration/PreventIndexCreation + end +end diff --git a/db/migrate/20211109100050_add_consume_after_to_loose_fk_deleted_records.rb b/db/migrate/20211109100050_add_consume_after_to_loose_fk_deleted_records.rb new file mode 100644 index 00000000000..6b8e8c0d4f3 --- /dev/null +++ b/db/migrate/20211109100050_add_consume_after_to_loose_fk_deleted_records.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class AddConsumeAfterToLooseFkDeletedRecords < Gitlab::Database::Migration[1.0] + enable_lock_retries! + + def up + add_column :loose_foreign_keys_deleted_records, :consume_after, :datetime_with_timezone, default: -> { 'NOW()' } + end + + def down + remove_column :loose_foreign_keys_deleted_records, :consume_after + end +end diff --git a/db/migrate/20211109101010_support_partition_query_in_loose_fk_table.rb b/db/migrate/20211109101010_support_partition_query_in_loose_fk_table.rb new file mode 100644 index 00000000000..fccb1fc5cac --- /dev/null +++ b/db/migrate/20211109101010_support_partition_query_in_loose_fk_table.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class SupportPartitionQueryInLooseFkTable < Gitlab::Database::Migration[1.0] + include Gitlab::Database::PartitioningMigrationHelpers + + disable_ddl_transaction! + + INDEX_NAME = 'index_loose_foreign_keys_deleted_records_for_partitioned_query' + + def up + add_concurrent_partitioned_index :loose_foreign_keys_deleted_records, + %I[partition fully_qualified_table_name consume_after id], + where: 'status = 1', + name: INDEX_NAME + end + + def down + remove_concurrent_partitioned_index_by_name :loose_foreign_keys_deleted_records, INDEX_NAME + end +end diff --git a/db/migrate/20211110010101_add_index_on_unarchived_deployments.rb b/db/migrate/20211110010101_add_index_on_unarchived_deployments.rb new file mode 100644 index 00000000000..0bfafb94d0b --- /dev/null +++ b/db/migrate/20211110010101_add_index_on_unarchived_deployments.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddIndexOnUnarchivedDeployments < Gitlab::Database::Migration[1.0] + INDEX_NAME = 'index_deployments_on_archived_project_id_iid' + + disable_ddl_transaction! + + def up + add_concurrent_index :deployments, %i[archived project_id iid], name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :deployments, INDEX_NAME + end +end diff --git a/db/migrate/20211110100050_add_has_shimo_to_project_settings.rb b/db/migrate/20211110100050_add_has_shimo_to_project_settings.rb new file mode 100644 index 00000000000..01507908e0f --- /dev/null +++ b/db/migrate/20211110100050_add_has_shimo_to_project_settings.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddHasShimoToProjectSettings < Gitlab::Database::Migration[1.0] + enable_lock_retries! + + def change + add_column :project_settings, :has_shimo, :boolean, default: false, null: false + end +end diff --git a/db/migrate/20211112155416_populate_default_value_for_personal_access_tokens_prefix.rb b/db/migrate/20211112155416_populate_default_value_for_personal_access_tokens_prefix.rb new file mode 100644 index 00000000000..8dd23e1a72e --- /dev/null +++ b/db/migrate/20211112155416_populate_default_value_for_personal_access_tokens_prefix.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class PopulateDefaultValueForPersonalAccessTokensPrefix < Gitlab::Database::Migration[1.0] + def up + execute( + <<-SQL + UPDATE + application_settings + SET + personal_access_token_prefix = default + WHERE + personal_access_token_prefix IS NULL + SQL + ) + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20200106071113_update_fingerprint_sha256_within_keys.rb b/db/post_migrate/20200106071113_update_fingerprint_sha256_within_keys.rb deleted file mode 100644 index 06f5c881006..00000000000 --- a/db/post_migrate/20200106071113_update_fingerprint_sha256_within_keys.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class UpdateFingerprintSha256WithinKeys < ActiveRecord::Migration[5.0] - include Gitlab::Database::MigrationHelpers - - class Key < ActiveRecord::Base - include EachBatch - - self.table_name = 'keys' - self.inheritance_column = :_type_disabled - end - - disable_ddl_transaction! - - def up - queue_background_migration_jobs_by_range_at_intervals(Key, 'MigrateFingerprintSha256WithinKeys', 5.minutes) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200110121314_schedule_update_existing_subgroup_to_match_visibility_level_of_parent.rb b/db/post_migrate/20200110121314_schedule_update_existing_subgroup_to_match_visibility_level_of_parent.rb deleted file mode 100644 index 813cd600ddc..00000000000 --- a/db/post_migrate/20200110121314_schedule_update_existing_subgroup_to_match_visibility_level_of_parent.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class ScheduleUpdateExistingSubgroupToMatchVisibilityLevelOfParent < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - MIGRATION = 'UpdateExistingSubgroupToMatchVisibilityLevelOfParent' - DELAY_INTERVAL = 5.minutes.to_i - BATCH_SIZE = 1000 - VISIBILITY_LEVELS = { - internal: 10, - private: 0 - } - - disable_ddl_transaction! - - def up - offset = update_groups(VISIBILITY_LEVELS[:internal]) - update_groups(VISIBILITY_LEVELS[:private], offset: offset) - end - - def down - # no-op - end - - private - - def update_groups(level, offset: 0) - groups = exec_query <<~SQL - SELECT id - FROM namespaces - WHERE visibility_level = #{level} - AND type = 'Group' - AND EXISTS (SELECT 1 - FROM namespaces AS children - WHERE children.parent_id = namespaces.id) - SQL - - ids = groups.rows.flatten - - iterator = 1 - - ids.in_groups_of(BATCH_SIZE, false) do |batch_of_ids| - delay = DELAY_INTERVAL * (iterator + offset) - BackgroundMigrationWorker.perform_in(delay, MIGRATION, [batch_of_ids, level]) - iterator += 1 - end - - say("Background jobs for visibility level #{level} scheduled in #{iterator} iterations") - - offset + iterator - end -end diff --git a/db/post_migrate/20200113151354_remove_creations_in_gitlab_subscription_histories.rb b/db/post_migrate/20200113151354_remove_creations_in_gitlab_subscription_histories.rb deleted file mode 100644 index 39ca5124b32..00000000000 --- a/db/post_migrate/20200113151354_remove_creations_in_gitlab_subscription_histories.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class RemoveCreationsInGitlabSubscriptionHistories < ActiveRecord::Migration[5.2] - DOWNTIME = false - GITLAB_SUBSCRIPTION_CREATED = 0 - - def up - return unless Gitlab.com? - - delete_sql = "DELETE FROM gitlab_subscription_histories WHERE change_type=#{GITLAB_SUBSCRIPTION_CREATED} RETURNING *" - - records = execute(delete_sql) - - logger = Gitlab::BackgroundMigration::Logger.build - records.to_a.each do |record| - logger.info record.as_json.merge(message: "gitlab_subscription_histories with change_type=0 was deleted") - end - end - - def down - # There's no way to restore, and the data is useless - # all the data to be deleted in case needed https://gitlab.com/gitlab-org/gitlab/uploads/7409379b0ed658624f5d33202b5668a1/gitlab_subscription_histories_change_type_0.sql.txt - end -end diff --git a/db/post_migrate/20200114112932_add_temporary_partial_index_on_project_id_to_services.rb b/db/post_migrate/20200114112932_add_temporary_partial_index_on_project_id_to_services.rb deleted file mode 100644 index 55494f1e4ac..00000000000 --- a/db/post_migrate/20200114112932_add_temporary_partial_index_on_project_id_to_services.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddTemporaryPartialIndexOnProjectIdToServices < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'tmp_index_on_project_id_partial_with_prometheus_services' - PARTIAL_FILTER = "type = 'PrometheusService'" - - disable_ddl_transaction! - - def up - add_concurrent_index :services, :project_id, where: PARTIAL_FILTER, name: INDEX_NAME - end - - def down - remove_concurrent_index :services, :project_id, where: PARTIAL_FILTER, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20200114113341_patch_prometheus_services_for_shared_cluster_applications.rb b/db/post_migrate/20200114113341_patch_prometheus_services_for_shared_cluster_applications.rb deleted file mode 100644 index d49bd10887c..00000000000 --- a/db/post_migrate/20200114113341_patch_prometheus_services_for_shared_cluster_applications.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class PatchPrometheusServicesForSharedClusterApplications < ActiveRecord::Migration[5.2] - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200117194850_backfill_operations_feature_flags_iid.rb b/db/post_migrate/20200117194850_backfill_operations_feature_flags_iid.rb deleted file mode 100644 index bc97bd6062d..00000000000 --- a/db/post_migrate/20200117194850_backfill_operations_feature_flags_iid.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class BackfillOperationsFeatureFlagsIid < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - ### - # This should update about 700 rows on gitlab.com - # Execution time is predicted to take less than a second based on #database-lab results - # https://gitlab.com/gitlab-org/gitlab/merge_requests/22175#migration-performance - ### - def up - execute('LOCK operations_feature_flags IN ACCESS EXCLUSIVE MODE') - - backfill_iids('operations_feature_flags') - - change_column_null :operations_feature_flags, :iid, false - end - - def down - change_column_null :operations_feature_flags, :iid, true - end -end diff --git a/db/post_migrate/20200117194900_delete_internal_ids_where_feature_flags_usage.rb b/db/post_migrate/20200117194900_delete_internal_ids_where_feature_flags_usage.rb deleted file mode 100644 index 0cf1ab03622..00000000000 --- a/db/post_migrate/20200117194900_delete_internal_ids_where_feature_flags_usage.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class DeleteInternalIdsWhereFeatureFlagsUsage < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - sql = <<~SQL - DELETE FROM internal_ids WHERE usage = 6 - SQL - - execute(sql) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200120083607_remove_storage_version_column_from_snippets.rb b/db/post_migrate/20200120083607_remove_storage_version_column_from_snippets.rb deleted file mode 100644 index 62bb3f46cae..00000000000 --- a/db/post_migrate/20200120083607_remove_storage_version_column_from_snippets.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class RemoveStorageVersionColumnFromSnippets < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - return unless column_exists?(:snippets, :storage_version) - - remove_column :snippets, :storage_version - end - - def down - return if column_exists?(:snippets, :storage_version) - - add_column_with_default( # rubocop:disable Migration/AddColumnWithDefault - :snippets, - :storage_version, - :integer, - default: 2, - allow_null: false - ) - end -end diff --git a/db/post_migrate/20200122123016_backfill_project_settings.rb b/db/post_migrate/20200122123016_backfill_project_settings.rb deleted file mode 100644 index 80ca79e979e..00000000000 --- a/db/post_migrate/20200122123016_backfill_project_settings.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class BackfillProjectSettings < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - MIGRATION = 'BackfillProjectSettings' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 10_000 - - disable_ddl_transaction! - - class Project < ActiveRecord::Base - include EachBatch - - self.table_name = 'projects' - end - - def up - say "Scheduling `#{MIGRATION}` jobs" - - queue_background_migration_jobs_by_range_at_intervals(Project, MIGRATION, DELAY_INTERVAL, batch_size: BATCH_SIZE) - end - - def down - # NOOP - end -end diff --git a/db/post_migrate/20200122144759_drop_kibana_column.rb b/db/post_migrate/20200122144759_drop_kibana_column.rb deleted file mode 100644 index ce94ca2dc27..00000000000 --- a/db/post_migrate/20200122144759_drop_kibana_column.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class DropKibanaColumn < ActiveRecord::Migration[5.2] - DOWNTIME = false - - def change - remove_column :clusters_applications_elastic_stacks, :kibana_hostname, :string, limit: 255 - end -end diff --git a/db/post_migrate/20200123155929_remove_invalid_jira_data.rb b/db/post_migrate/20200123155929_remove_invalid_jira_data.rb deleted file mode 100644 index 7ddac15c3fb..00000000000 --- a/db/post_migrate/20200123155929_remove_invalid_jira_data.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class RemoveInvalidJiraData < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - sql = "DELETE FROM jira_tracker_data WHERE \ - (length(encrypted_api_url) > 0 AND encrypted_api_url_iv IS NULL) \ - OR (length(encrypted_url) > 0 AND encrypted_url_iv IS NULL) \ - OR (length(encrypted_username) > 0 AND encrypted_username_iv IS NULL) \ - OR (length(encrypted_password) > 0 AND encrypted_password_iv IS NULL)" - - execute(sql) - end - - def down - # We need to figure out why migrating data to jira_tracker_data table - # failed and then can recreate the data - end -end diff --git a/db/post_migrate/20200124110831_migrate_design_notes_mentions_to_db.rb b/db/post_migrate/20200124110831_migrate_design_notes_mentions_to_db.rb deleted file mode 100644 index f1e4ee9807b..00000000000 --- a/db/post_migrate/20200124110831_migrate_design_notes_mentions_to_db.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -class MigrateDesignNotesMentionsToDb < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - DELAY = 2.minutes.to_i - BATCH_SIZE = 10000 - MIGRATION = 'UserMentions::CreateResourceUserMention' - - INDEX_NAME = 'design_mentions_temp_index' - INDEX_CONDITION = "note LIKE '%@%'::text AND notes.noteable_type = 'DesignManagement::Design'" - QUERY_CONDITIONS = "#{INDEX_CONDITION} AND design_user_mentions.design_id IS NULL" - JOIN = 'INNER JOIN design_management_designs ON design_management_designs.id = notes.noteable_id LEFT JOIN design_user_mentions ON notes.id = design_user_mentions.note_id' - - class DesignUserMention < ActiveRecord::Base - include EachBatch - - self.table_name = 'design_user_mentions' - end - - class Note < ActiveRecord::Base - include EachBatch - - self.table_name = 'notes' - end - - def up - return unless Gitlab.ee? - - # cleanup design user mentions with no actual mentions, - # re https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24586#note_285982468 - DesignUserMention - .where(mentioned_users_ids: nil) - .where(mentioned_groups_ids: nil) - .where(mentioned_projects_ids: nil) - .each_batch(of: BATCH_SIZE) do |batch| - batch.delete_all - end - - # create temporary index for notes with mentions, may take well over 1h - add_concurrent_index(:notes, :id, where: INDEX_CONDITION, name: INDEX_NAME) - - Note - .joins(JOIN) - .where(QUERY_CONDITIONS) - .each_batch(of: BATCH_SIZE) do |batch, index| - range = batch.pluck(Arel.sql('MIN(notes.id)'), Arel.sql('MAX(notes.id)')).first - BackgroundMigrationWorker.perform_in(index * DELAY, MIGRATION, ['DesignManagement::Design', JOIN, QUERY_CONDITIONS, true, *range]) - end - end - - def down - # no-op - # temporary index is to be dropped in a different migration in an upcoming release: - # https://gitlab.com/gitlab-org/gitlab/issues/196842 - end -end diff --git a/db/post_migrate/20200127090233_remove_invalid_issue_tracker_data.rb b/db/post_migrate/20200127090233_remove_invalid_issue_tracker_data.rb deleted file mode 100644 index 6d64dd3d0d1..00000000000 --- a/db/post_migrate/20200127090233_remove_invalid_issue_tracker_data.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class RemoveInvalidIssueTrackerData < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - sql = "DELETE FROM issue_tracker_data WHERE \ - (length(encrypted_issues_url) > 0 AND encrypted_issues_url_iv IS NULL) \ - OR (length(encrypted_new_issue_url) > 0 AND encrypted_new_issue_url_iv IS NULL) \ - OR (length(encrypted_project_url) > 0 AND encrypted_project_url_iv IS NULL)" - - execute(sql) - end - - def down - # We need to figure out why migrating data to issue_tracker_data table - # failed and then can recreate the data - end -end diff --git a/db/post_migrate/20200127111840_fix_projects_without_project_feature.rb b/db/post_migrate/20200127111840_fix_projects_without_project_feature.rb deleted file mode 100644 index 66e892444d1..00000000000 --- a/db/post_migrate/20200127111840_fix_projects_without_project_feature.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class FixProjectsWithoutProjectFeature < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - BATCH_SIZE = 50_000 - MIGRATION = 'FixProjectsWithoutProjectFeature' - - disable_ddl_transaction! - - class Project < ActiveRecord::Base - include EachBatch - end - - def up - queue_background_migration_jobs_by_range_at_intervals(Project, MIGRATION, 2.minutes, batch_size: BATCH_SIZE) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200128132510_add_temporary_index_for_notes_with_mentions.rb b/db/post_migrate/20200128132510_add_temporary_index_for_notes_with_mentions.rb deleted file mode 100644 index bd55485f871..00000000000 --- a/db/post_migrate/20200128132510_add_temporary_index_for_notes_with_mentions.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class AddTemporaryIndexForNotesWithMentions < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - INDEX_CONDITION = "note LIKE '%@%'::text" - INDEX_NAME = 'note_mentions_temp_index' - - EPIC_MENTIONS_INDEX_NAME = 'epic_mentions_temp_index' - DESIGN_MENTIONS_INDEX_NAME = 'design_mentions_temp_index' - - def up - # create temporary index for notes with mentions, may take well over 1h - add_concurrent_index(:notes, [:id, :noteable_type], where: INDEX_CONDITION, name: INDEX_NAME) - - # cleanup previous temporary indexes, as we'll be usig the single one - remove_concurrent_index(:notes, :id, name: EPIC_MENTIONS_INDEX_NAME) - remove_concurrent_index(:notes, :id, name: DESIGN_MENTIONS_INDEX_NAME) - end - - def down - remove_concurrent_index(:notes, :id, name: INDEX_NAME) - - add_concurrent_index(:notes, :id, where: "#{INDEX_CONDITION} AND noteable_type='Epic'", name: EPIC_MENTIONS_INDEX_NAME) - add_concurrent_index(:notes, :id, where: "#{INDEX_CONDITION} AND noteable_type='DesignManagement::Design'", name: DESIGN_MENTIONS_INDEX_NAME) - end -end diff --git a/db/post_migrate/20200128133510_cleanup_empty_commit_user_mentions.rb b/db/post_migrate/20200128133510_cleanup_empty_commit_user_mentions.rb deleted file mode 100644 index 362aa3a60f7..00000000000 --- a/db/post_migrate/20200128133510_cleanup_empty_commit_user_mentions.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class CleanupEmptyCommitUserMentions < ActiveRecord::Migration[5.2] - DOWNTIME = false - BATCH_SIZE = 10_000 - - class CommitUserMention < ActiveRecord::Base - include EachBatch - - self.table_name = 'commit_user_mentions' - end - - def up - # cleanup commit user mentions with no actual mentions, - # re https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24586#note_285982468 - CommitUserMention - .where(mentioned_users_ids: nil) - .where(mentioned_groups_ids: nil) - .where(mentioned_projects_ids: nil) - .each_batch(of: BATCH_SIZE) do |batch| - batch.delete_all - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200128134110_migrate_commit_notes_mentions_to_db.rb b/db/post_migrate/20200128134110_migrate_commit_notes_mentions_to_db.rb deleted file mode 100644 index 5b8ed99fb7a..00000000000 --- a/db/post_migrate/20200128134110_migrate_commit_notes_mentions_to_db.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class MigrateCommitNotesMentionsToDb < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - DELAY = 3.minutes.to_i - BATCH_SIZE = 1_000 - MIGRATION = 'UserMentions::CreateResourceUserMention' - - QUERY_CONDITIONS = "note LIKE '%@%'::text AND notes.noteable_type = 'Commit' AND commit_user_mentions.commit_id IS NULL" - JOIN = 'LEFT JOIN commit_user_mentions ON notes.id = commit_user_mentions.note_id' - - class Note < ActiveRecord::Base - include EachBatch - - self.table_name = 'notes' - end - - def up - Note - .joins(JOIN) - .where(QUERY_CONDITIONS) - .each_batch(of: BATCH_SIZE) do |batch, index| - range = batch.pluck(Arel.sql('MIN(notes.id)'), Arel.sql('MAX(notes.id)')).first - migrate_in(index * DELAY, MIGRATION, ['Commit', JOIN, QUERY_CONDITIONS, true, *range]) - end - end - - def down - # no-op - # temporary index is to be dropped in a different migration in an upcoming release: - # https://gitlab.com/gitlab-org/gitlab/issues/196842 - end -end diff --git a/db/post_migrate/20200128210353_cleanup_optimistic_locking_nulls.rb b/db/post_migrate/20200128210353_cleanup_optimistic_locking_nulls.rb deleted file mode 100644 index 5c172159561..00000000000 --- a/db/post_migrate/20200128210353_cleanup_optimistic_locking_nulls.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class CleanupOptimisticLockingNulls < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - TABLES = %w(epics merge_requests issues).freeze - BATCH_SIZE = 10_000 - - def declare_class(table) - Class.new(ActiveRecord::Base) do - include EachBatch - - self.table_name = table - self.inheritance_column = :_type_disabled # Disable STI - end - end - - def up - TABLES.each do |table| - add_concurrent_index table.to_sym, :lock_version, where: "lock_version IS NULL" - - queue_background_migration_jobs_by_range_at_intervals( - declare_class(table).where(lock_version: nil), - 'CleanupOptimisticLockingNulls', - 2.minutes, - batch_size: BATCH_SIZE, - other_job_arguments: [table] - ) - end - end - - def down - TABLES.each do |table| - remove_concurrent_index table.to_sym, :lock_version, where: "lock_version IS NULL" - end - end -end diff --git a/db/post_migrate/20200129035708_cleanup_rename_pages_domains_domain_type_to_scope.rb b/db/post_migrate/20200129035708_cleanup_rename_pages_domains_domain_type_to_scope.rb deleted file mode 100644 index d1d2b4962dd..00000000000 --- a/db/post_migrate/20200129035708_cleanup_rename_pages_domains_domain_type_to_scope.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class CleanupRenamePagesDomainsDomainTypeToScope < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - cleanup_concurrent_column_rename :pages_domains, :domain_type, :scope - end - - def down - undo_cleanup_concurrent_column_rename :pages_domains, :domain_type, :scope - end -end diff --git a/db/post_migrate/20200130145430_reschedule_migrate_issue_trackers_data.rb b/db/post_migrate/20200130145430_reschedule_migrate_issue_trackers_data.rb deleted file mode 100644 index 312a8c95b92..00000000000 --- a/db/post_migrate/20200130145430_reschedule_migrate_issue_trackers_data.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -class RescheduleMigrateIssueTrackersData < ActiveRecord::Migration[5.1] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INTERVAL = 3.minutes.to_i - BATCH_SIZE = 5_000 - MIGRATION = 'MigrateIssueTrackersSensitiveData' - - disable_ddl_transaction! - - class Service < ActiveRecord::Base - self.table_name = 'services' - self.inheritance_column = :_type_disabled - - include ::EachBatch - end - - def up - relation = Service.where(category: 'issue_tracker').where("properties IS NOT NULL AND properties != '{}' AND properties != ''") - queue_background_migration_jobs_by_range_at_intervals(relation, - MIGRATION, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - remove_issue_tracker_data_sql = "DELETE FROM issue_tracker_data WHERE \ - (length(encrypted_issues_url) > 0 AND encrypted_issues_url_iv IS NULL) \ - OR (length(encrypted_new_issue_url) > 0 AND encrypted_new_issue_url_iv IS NULL) \ - OR (length(encrypted_project_url) > 0 AND encrypted_project_url_iv IS NULL)" - - execute(remove_issue_tracker_data_sql) - - remove_jira_tracker_data_sql = "DELETE FROM jira_tracker_data WHERE \ - (length(encrypted_api_url) > 0 AND encrypted_api_url_iv IS NULL) \ - OR (length(encrypted_url) > 0 AND encrypted_url_iv IS NULL) \ - OR (length(encrypted_username) > 0 AND encrypted_username_iv IS NULL) \ - OR (length(encrypted_password) > 0 AND encrypted_password_iv IS NULL)" - - execute(remove_jira_tracker_data_sql) - end -end diff --git a/db/post_migrate/20200203104214_services_remove_temporary_index_on_project_id.rb b/db/post_migrate/20200203104214_services_remove_temporary_index_on_project_id.rb deleted file mode 100644 index c9566d0256c..00000000000 --- a/db/post_migrate/20200203104214_services_remove_temporary_index_on_project_id.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class ServicesRemoveTemporaryIndexOnProjectId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'tmp_index_on_project_id_partial_with_prometheus_services' - PARTIAL_FILTER = "type = 'PrometheusService'" - - disable_ddl_transaction! - - def up - remove_concurrent_index :services, :project_id, where: PARTIAL_FILTER, name: INDEX_NAME - end - - def down - add_concurrent_index :services, :project_id, where: PARTIAL_FILTER, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20200204113223_schedule_recalculate_project_authorizations.rb b/db/post_migrate/20200204113223_schedule_recalculate_project_authorizations.rb deleted file mode 100644 index 83b58300115..00000000000 --- a/db/post_migrate/20200204113223_schedule_recalculate_project_authorizations.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -class ScheduleRecalculateProjectAuthorizations < ActiveRecord::Migration[5.1] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - MIGRATION = 'RecalculateProjectAuthorizations' - BATCH_SIZE = 2_500 - DELAY_INTERVAL = 2.minutes.to_i - - disable_ddl_transaction! - - class Namespace < ActiveRecord::Base - include ::EachBatch - - self.table_name = 'namespaces' - end - - class ProjectAuthorization < ActiveRecord::Base - include ::EachBatch - - self.table_name = 'project_authorizations' - end - - def up - say "Scheduling #{MIGRATION} jobs" - - max_group_id = Namespace.where(type: 'Group').maximum(:id) - project_authorizations = ProjectAuthorization.where('project_id <= ?', max_group_id) - .select(:user_id) - .distinct - - project_authorizations.each_batch(of: BATCH_SIZE, column: :user_id) do |authorizations, index| - delay = index * DELAY_INTERVAL - user_ids = authorizations.map(&:user_id) - BackgroundMigrationWorker.perform_in(delay, MIGRATION, [user_ids]) - end - end - - def down - end -end diff --git a/db/post_migrate/20200204113224_schedule_recalculate_project_authorizations_second_run.rb b/db/post_migrate/20200204113224_schedule_recalculate_project_authorizations_second_run.rb deleted file mode 100644 index 8f4a347b5e2..00000000000 --- a/db/post_migrate/20200204113224_schedule_recalculate_project_authorizations_second_run.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class ScheduleRecalculateProjectAuthorizationsSecondRun < ActiveRecord::Migration[5.1] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - MIGRATION = 'RecalculateProjectAuthorizationsWithMinMaxUserId' - BATCH_SIZE = 2_500 - DELAY_INTERVAL = 2.minutes.to_i - - disable_ddl_transaction! - - class User < ActiveRecord::Base - include ::EachBatch - - self.table_name = 'users' - end - - def up - say "Scheduling #{MIGRATION} jobs" - - User.each_batch(of: BATCH_SIZE) do |batch, index| - delay = index * DELAY_INTERVAL - range = batch.pluck('MIN(id)', 'MAX(id)').first - BackgroundMigrationWorker.perform_in(delay, MIGRATION, range) - end - end - - def down - end -end diff --git a/db/post_migrate/20200204113225_schedule_recalculate_project_authorizations_third_run.rb b/db/post_migrate/20200204113225_schedule_recalculate_project_authorizations_third_run.rb deleted file mode 100644 index 47b22b4800a..00000000000 --- a/db/post_migrate/20200204113225_schedule_recalculate_project_authorizations_third_run.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class ScheduleRecalculateProjectAuthorizationsThirdRun < ActiveRecord::Migration[5.1] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - MIGRATION = 'RecalculateProjectAuthorizationsWithMinMaxUserId' - BATCH_SIZE = 2_500 - DELAY_INTERVAL = 2.minutes.to_i - - disable_ddl_transaction! - - class User < ActiveRecord::Base - include ::EachBatch - - self.table_name = 'users' - end - - def up - say "Scheduling #{MIGRATION} jobs" - - queue_background_migration_jobs_by_range_at_intervals(User, MIGRATION, DELAY_INTERVAL, batch_size: BATCH_SIZE) - end - - def down - end -end diff --git a/db/post_migrate/20200206091544_migrate_create_commit_signature_worker_sidekiq_queue.rb b/db/post_migrate/20200206091544_migrate_create_commit_signature_worker_sidekiq_queue.rb deleted file mode 100644 index eec9abf4a31..00000000000 --- a/db/post_migrate/20200206091544_migrate_create_commit_signature_worker_sidekiq_queue.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class MigrateCreateCommitSignatureWorkerSidekiqQueue < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - sidekiq_queue_migrate 'create_gpg_signature', to: 'create_commit_signature' - end - - def down - sidekiq_queue_migrate 'create_commit_signature', to: 'create_gpg_signature' - end -end diff --git a/db/post_migrate/20200206135203_udpate_index_ci_builds_on_name_for_security_products.rb b/db/post_migrate/20200206135203_udpate_index_ci_builds_on_name_for_security_products.rb deleted file mode 100644 index ddaa3049543..00000000000 --- a/db/post_migrate/20200206135203_udpate_index_ci_builds_on_name_for_security_products.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class UdpateIndexCiBuildsOnNameForSecurityProducts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_ci_builds_on_name_for_security_products_values' - INDEX_NAME_NEW = 'index_ci_builds_on_name_for_security_reports_values' - INITIAL_INDEX = "((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text" - - disable_ddl_transaction! - - def up - add_concurrent_index(:ci_builds, - :name, - name: INDEX_NAME_NEW, - where: INITIAL_INDEX + ", ('license_scanning'::character varying)::text]))") - - remove_concurrent_index_by_name(:ci_builds, INDEX_NAME) - end - - def down - add_concurrent_index(:ci_builds, - :name, - name: INDEX_NAME, - where: INITIAL_INDEX + ']))') - - remove_concurrent_index_by_name(:ci_builds, INDEX_NAME_NEW) - end -end diff --git a/db/post_migrate/20200207184023_add_temporary_index_to_promotion_notes.rb b/db/post_migrate/20200207184023_add_temporary_index_to_promotion_notes.rb deleted file mode 100644 index 44a32938483..00000000000 --- a/db/post_migrate/20200207184023_add_temporary_index_to_promotion_notes.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class AddTemporaryIndexToPromotionNotes < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :notes, - :note, - where: "noteable_type = 'Issue' AND system IS TRUE AND note LIKE 'promoted to epic%'", - name: 'tmp_idx_on_promoted_notes' - end - - def down - # NO OP - end -end diff --git a/db/post_migrate/20200207185149_schedule_fix_orphan_promoted_issues.rb b/db/post_migrate/20200207185149_schedule_fix_orphan_promoted_issues.rb deleted file mode 100644 index d25d6ed2dc7..00000000000 --- a/db/post_migrate/20200207185149_schedule_fix_orphan_promoted_issues.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class ScheduleFixOrphanPromotedIssues < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - BATCH_SIZE = 100 - BACKGROUND_MIGRATION = 'FixOrphanPromotedIssues' - - disable_ddl_transaction! - - class Note < ActiveRecord::Base - include EachBatch - - self.table_name = 'notes' - - scope :of_promotion, -> do - where(noteable_type: 'Issue') - .where('notes.system IS TRUE') - .where("notes.note LIKE 'promoted to epic%'") - end - end - - def up - Note.of_promotion.each_batch(of: BATCH_SIZE) do |notes, index| - jobs = notes.map { |note| [BACKGROUND_MIGRATION, [note.id]] } - - BackgroundMigrationWorker.bulk_perform_async(jobs) - end - end - - def down - # NO OP - end -end diff --git a/db/post_migrate/20200210062432_schedule_link_lfs_objects.rb b/db/post_migrate/20200210062432_schedule_link_lfs_objects.rb deleted file mode 100644 index b401065dd94..00000000000 --- a/db/post_migrate/20200210062432_schedule_link_lfs_objects.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class ScheduleLinkLfsObjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - # no-op as background migration being schedule times out in some instances - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200210092405_save_instance_administrators_group_id.rb b/db/post_migrate/20200210092405_save_instance_administrators_group_id.rb deleted file mode 100644 index e539a187672..00000000000 --- a/db/post_migrate/20200210092405_save_instance_administrators_group_id.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -class SaveInstanceAdministratorsGroupId < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute( - <<-SQL - UPDATE - application_settings - SET - instance_administrators_group_id = ( - SELECT - namespace_id - FROM - projects - WHERE - id = application_settings.instance_administration_project_id - ) - WHERE - instance_administrators_group_id IS NULL - AND - instance_administration_project_id IS NOT NULL - AND - ID in ( - SELECT - max(id) - FROM - application_settings - ) - SQL - ) - end - - def down - # no-op - - # The change performed by `up` cannot be reversed because once the migration runs, - # we do not know what value application_settings.instance_administrators_group_id - # had before the migration was run. - end -end diff --git a/db/post_migrate/20200211152410_remove_instance_from_services.rb b/db/post_migrate/20200211152410_remove_instance_from_services.rb deleted file mode 100644 index 1f27455b541..00000000000 --- a/db/post_migrate/20200211152410_remove_instance_from_services.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RemoveInstanceFromServices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - return unless column_exists?(:services, :instance) - - undo_rename_column_concurrently :services, :template, :instance - end - - def down - # This migration should not be rolled back because it - # removes a column that got added in migrations that - # have been reverted in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24857 - end -end diff --git a/db/post_migrate/20200211155000_cleanup_empty_merge_request_mentions.rb b/db/post_migrate/20200211155000_cleanup_empty_merge_request_mentions.rb deleted file mode 100644 index e90d192388b..00000000000 --- a/db/post_migrate/20200211155000_cleanup_empty_merge_request_mentions.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class CleanupEmptyMergeRequestMentions < ActiveRecord::Migration[5.2] - DOWNTIME = false - BATCH_SIZE = 1_000 - - class MergeRequestUserMention < ActiveRecord::Base - include EachBatch - - self.table_name = 'merge_request_user_mentions' - end - - def up - # cleanup merge request user mentions with no actual mentions, - # re https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24586#note_285982468 - MergeRequestUserMention - .where(mentioned_users_ids: nil) - .where(mentioned_groups_ids: nil) - .where(mentioned_projects_ids: nil).each_batch(of: BATCH_SIZE) do |batch| - batch.delete_all - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200211155100_add_temporary_merge_request_with_mentions_index.rb b/db/post_migrate/20200211155100_add_temporary_merge_request_with_mentions_index.rb deleted file mode 100644 index 5b25f29d5f7..00000000000 --- a/db/post_migrate/20200211155100_add_temporary_merge_request_with_mentions_index.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddTemporaryMergeRequestWithMentionsIndex < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_CONDITION = "description like '%@%' OR title like '%@%'" - INDEX_NAME = 'merge_request_mentions_temp_index' - - disable_ddl_transaction! - - def up - # create temporary index for notes with mentions, may take well over 1h - add_concurrent_index(:merge_requests, :id, where: INDEX_CONDITION, name: INDEX_NAME) - end - - def down - remove_concurrent_index(:merge_requests, :id, where: INDEX_CONDITION, name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20200211155539_migrate_merge_request_mentions_to_db.rb b/db/post_migrate/20200211155539_migrate_merge_request_mentions_to_db.rb deleted file mode 100644 index b622badb561..00000000000 --- a/db/post_migrate/20200211155539_migrate_merge_request_mentions_to_db.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class MigrateMergeRequestMentionsToDb < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - DELAY = 3.minutes.to_i - BATCH_SIZE = 1_000 - MIGRATION = 'UserMentions::CreateResourceUserMention' - - JOIN = "LEFT JOIN merge_request_user_mentions on merge_requests.id = merge_request_user_mentions.merge_request_id" - QUERY_CONDITIONS = "(description like '%@%' OR title like '%@%') AND merge_request_user_mentions.merge_request_id IS NULL" - - disable_ddl_transaction! - - class MergeRequest < ActiveRecord::Base - include EachBatch - - self.table_name = 'merge_requests' - end - - def up - MergeRequest - .joins(JOIN) - .where(QUERY_CONDITIONS) - .each_batch(of: BATCH_SIZE) do |batch, index| - range = batch.pluck(Arel.sql('MIN(merge_requests.id)'), Arel.sql('MAX(merge_requests.id)')).first - migrate_in(index * DELAY, MIGRATION, ['MergeRequest', JOIN, QUERY_CONDITIONS, false, *range]) - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200212052620_readd_template_column_to_services.rb b/db/post_migrate/20200212052620_readd_template_column_to_services.rb deleted file mode 100644 index c636cb0a07b..00000000000 --- a/db/post_migrate/20200212052620_readd_template_column_to_services.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class ReaddTemplateColumnToServices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - # rubocop:disable Migration/UpdateLargeTable - def up - return if column_exists? :services, :template - - # The migration to drop the template column never actually shipped - # to production, so we should be okay to re-add it without worrying - # about doing a data migration. If we needed to restore the value - # of `template`, we would look for entries with `project_id IS NULL`. - add_column_with_default :services, :template, :boolean, default: false, allow_null: true # rubocop:disable Migration/AddColumnWithDefault - end - # rubocop:enable Migration/UpdateLargeTable - - def down - # NOP since the column is expected to exist - end -end diff --git a/db/post_migrate/20200213204737_remove_unnecessary_milestone_join_tables.rb b/db/post_migrate/20200213204737_remove_unnecessary_milestone_join_tables.rb deleted file mode 100644 index 19b3af53836..00000000000 --- a/db/post_migrate/20200213204737_remove_unnecessary_milestone_join_tables.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class RemoveUnnecessaryMilestoneJoinTables < ActiveRecord::Migration[6.0] - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - def up - drop_table :issue_milestones - drop_table :merge_request_milestones - end - - def down - create_table :issue_milestones, id: false do |t| - t.references :issue, foreign_key: { on_delete: :cascade }, index: { unique: true }, null: false - t.references :milestone, foreign_key: { on_delete: :cascade }, index: true, null: false - end - - add_index :issue_milestones, [:issue_id, :milestone_id], unique: true - - create_table :merge_request_milestones, id: false do |t| - t.references :merge_request, foreign_key: { on_delete: :cascade }, index: { unique: true }, null: false - t.references :milestone, foreign_key: { on_delete: :cascade }, index: true, null: false - end - - add_index :merge_request_milestones, [:merge_request_id, :milestone_id], name: 'index_mrs_milestones_on_mr_id_and_milestone_id', unique: true - end -end diff --git a/db/post_migrate/20200213220159_migrate_store_security_reports_sidekiq_queue.rb b/db/post_migrate/20200213220159_migrate_store_security_reports_sidekiq_queue.rb deleted file mode 100644 index 5bba4c95328..00000000000 --- a/db/post_migrate/20200213220159_migrate_store_security_reports_sidekiq_queue.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class MigrateStoreSecurityReportsSidekiqQueue < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - sidekiq_queue_migrate 'pipeline_default:store_security_reports', to: 'security_scans:store_security_reports' - end - - def down - sidekiq_queue_migrate 'security_scans:store_security_reports', to: 'pipeline_default:store_security_reports' - end -end diff --git a/db/post_migrate/20200213220211_migrate_sync_security_reports_to_report_approval_rules_sidekiq_queue.rb b/db/post_migrate/20200213220211_migrate_sync_security_reports_to_report_approval_rules_sidekiq_queue.rb deleted file mode 100644 index e3ed4c60f21..00000000000 --- a/db/post_migrate/20200213220211_migrate_sync_security_reports_to_report_approval_rules_sidekiq_queue.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class MigrateSyncSecurityReportsToReportApprovalRulesSidekiqQueue < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - sidekiq_queue_migrate 'pipeline_default:sync_security_reports_to_report_approval_rules', - to: 'security_scans:sync_security_reports_to_report_approval_rules' - end - - def down - sidekiq_queue_migrate 'security_scans:sync_security_reports_to_report_approval_rules', - to: 'pipeline_default:sync_security_reports_to_report_approval_rules' - end -end diff --git a/db/post_migrate/20200214034836_remove_security_dashboard_feature_flag.rb b/db/post_migrate/20200214034836_remove_security_dashboard_feature_flag.rb deleted file mode 100644 index 79723619533..00000000000 --- a/db/post_migrate/20200214034836_remove_security_dashboard_feature_flag.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class RemoveSecurityDashboardFeatureFlag < ActiveRecord::Migration[6.0] - DOWNTIME = false - - class FeatureGate < ApplicationRecord - self.table_name = 'feature_gates' - end - - def up - FeatureGate.find_by(feature_key: :security_dashboard, key: :boolean)&.delete - end - - def down - instance_security_dashboard_feature = FeatureGate.find_by(feature_key: :instance_security_dashboard, key: :boolean) - - if instance_security_dashboard_feature.present? - FeatureGate.safe_find_or_create_by!( - feature_key: :security_dashboard, - key: instance_security_dashboard_feature.key, - value: instance_security_dashboard_feature.value - ) - end - end -end diff --git a/db/post_migrate/20200214214934_create_environment_for_self_monitoring_project.rb b/db/post_migrate/20200214214934_create_environment_for_self_monitoring_project.rb deleted file mode 100644 index a44efa3c460..00000000000 --- a/db/post_migrate/20200214214934_create_environment_for_self_monitoring_project.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class CreateEnvironmentForSelfMonitoringProject < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute <<~SQL - INSERT INTO environments (project_id, name, slug, created_at, updated_at) - SELECT instance_administration_project_id, 'production', 'production', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP - FROM application_settings - WHERE instance_administration_project_id IS NOT NULL - AND NOT EXISTS ( - SELECT 1 - FROM environments - INNER JOIN application_settings - ON application_settings.instance_administration_project_id = environments.project_id - ) - SQL - end - - def down - # no-op - - # This migration cannot be reversed because it cannot be ensured that the environment for the Self Monitoring Project - # did not already exist before the migration ran - in that case, the migration does nothing, and it would be unexpected - # behavior for that environment to be deleted by reversing this migration. - end -end diff --git a/db/post_migrate/20200217210353_cleanup_optimistic_locking_nulls_pt2.rb b/db/post_migrate/20200217210353_cleanup_optimistic_locking_nulls_pt2.rb deleted file mode 100644 index 1ec3e817e8e..00000000000 --- a/db/post_migrate/20200217210353_cleanup_optimistic_locking_nulls_pt2.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class CleanupOptimisticLockingNullsPt2 < ActiveRecord::Migration[5.2] - def change - # no-op: the MR that contained this migration was reverted - end -end diff --git a/db/post_migrate/20200217223651_add_index_to_job_artifact_secure_reports.rb b/db/post_migrate/20200217223651_add_index_to_job_artifact_secure_reports.rb deleted file mode 100644 index ca297272f8e..00000000000 --- a/db/post_migrate/20200217223651_add_index_to_job_artifact_secure_reports.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToJobArtifactSecureReports < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'job_artifacts_secure_reports_temp_index' - PARTIAL_FILTER = "file_type BETWEEN 5 AND 8" - - disable_ddl_transaction! - - def up - # This is a temporary index used for the migration of Security Reports to Security Scans - add_concurrent_index(:ci_job_artifacts, - [:id, :file_type, :job_id, :created_at, :updated_at], - name: INDEX_NAME, - where: PARTIAL_FILTER) - end - - def down - remove_concurrent_index(:ci_job_artifacts, - [:id, :file_type, :job_id, :created_at, :updated_at]) - end -end diff --git a/db/post_migrate/20200217225719_schedule_migrate_security_scans.rb b/db/post_migrate/20200217225719_schedule_migrate_security_scans.rb deleted file mode 100644 index 087c189f9fd..00000000000 --- a/db/post_migrate/20200217225719_schedule_migrate_security_scans.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class ScheduleMigrateSecurityScans < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INTERVAL = 2.minutes.to_i - BATCH_SIZE = 10_000 - MIGRATION = 'MigrateSecurityScans' - - disable_ddl_transaction! - - class JobArtifact < ActiveRecord::Base - include ::EachBatch - - self.table_name = 'ci_job_artifacts' - - scope :security_reports, -> { where('file_type BETWEEN 5 and 8') } - end - - def up - queue_background_migration_jobs_by_range_at_intervals(JobArtifact.security_reports, - MIGRATION, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # intentionally blank - end -end diff --git a/db/post_migrate/20200219183456_remove_issue_state_indexes.rb b/db/post_migrate/20200219183456_remove_issue_state_indexes.rb deleted file mode 100644 index cdf10b8172e..00000000000 --- a/db/post_migrate/20200219183456_remove_issue_state_indexes.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class RemoveIssueStateIndexes < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - # issues state column is ignored since 12.6 and will be removed on a following migration - def up - remove_concurrent_index_by_name :issues, 'index_issues_on_state' - remove_concurrent_index_by_name :issues, 'index_issues_on_project_id_and_created_at_and_id_and_state' - remove_concurrent_index_by_name :issues, 'idx_issues_on_project_id_and_due_date_and_id_and_state_partial' - remove_concurrent_index_by_name :issues, 'index_issues_on_project_id_and_rel_position_and_state_and_id' - remove_concurrent_index_by_name :issues, 'index_issues_on_project_id_and_updated_at_and_id_and_state' - end - - def down - add_concurrent_index :issues, :state, name: 'index_issues_on_state' - - add_concurrent_index :issues, - [:project_id, :created_at, :id, :state], - name: 'index_issues_on_project_id_and_created_at_and_id_and_state' - - add_concurrent_index :issues, - [:project_id, :due_date, :id, :state], - where: 'due_date IS NOT NULL', - name: 'idx_issues_on_project_id_and_due_date_and_id_and_state_partial' - - add_concurrent_index :issues, - [:project_id, :relative_position, :state, :id], - order: { id: :desc }, - name: 'index_issues_on_project_id_and_rel_position_and_state_and_id' - - add_concurrent_index :issues, - [:project_id, :updated_at, :id, :state], - name: 'index_issues_on_project_id_and_updated_at_and_id_and_state' - end -end diff --git a/db/post_migrate/20200219184219_remove_merge_request_state_indexes.rb b/db/post_migrate/20200219184219_remove_merge_request_state_indexes.rb deleted file mode 100644 index deb95acc1cf..00000000000 --- a/db/post_migrate/20200219184219_remove_merge_request_state_indexes.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -class RemoveMergeRequestStateIndexes < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - # merge_requests state column is ignored since 12.6 and will be removed on a following migration - def up - remove_concurrent_index_by_name :merge_requests, 'index_merge_requests_on_id_and_merge_jid' - remove_concurrent_index_by_name :merge_requests, 'index_merge_requests_on_source_project_and_branch_state_opened' - remove_concurrent_index_by_name :merge_requests, 'index_merge_requests_on_state_and_merge_status' - remove_concurrent_index_by_name :merge_requests, 'index_merge_requests_on_target_project_id_and_iid_opened' - end - - def down - add_concurrent_index :merge_requests, - [:id, :merge_jid], - where: "merge_jid IS NOT NULL and state = 'locked'", - name: 'index_merge_requests_on_id_and_merge_jid' - - add_concurrent_index :merge_requests, - [:source_project_id, :source_branch], - where: "state = 'opened'", - name: 'index_merge_requests_on_source_project_and_branch_state_opened' - - add_concurrent_index :merge_requests, - [:state, :merge_status], - where: "state = 'opened' AND merge_status = 'can_be_merged'", - name: 'index_merge_requests_on_state_and_merge_status' - - add_concurrent_index :merge_requests, - [:target_project_id, :iid], - where: "state = 'opened'", - name: 'index_merge_requests_on_target_project_id_and_iid_opened' - end -end diff --git a/db/post_migrate/20200219193058_remove_state_from_issues.rb b/db/post_migrate/20200219193058_remove_state_from_issues.rb deleted file mode 100644 index 007ba600ce7..00000000000 --- a/db/post_migrate/20200219193058_remove_state_from_issues.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class RemoveStateFromIssues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - return unless issue_state_column_exists? - - # Ignored in 12.6 - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/19574 - with_lock_retries do - remove_column :issues, :state, :string - end - end - - def down - return if issue_state_column_exists? - - with_lock_retries do - add_column :issues, :state, :string - end - end - - private - - def issue_state_column_exists? - column_exists?(:issues, :state) - end -end diff --git a/db/post_migrate/20200219193117_remove_state_from_merge_requests.rb b/db/post_migrate/20200219193117_remove_state_from_merge_requests.rb deleted file mode 100644 index 384a694b549..00000000000 --- a/db/post_migrate/20200219193117_remove_state_from_merge_requests.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class RemoveStateFromMergeRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - return unless merge_requests_state_column_exists? - - # Ignored in 12.6 - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/19574 - with_lock_retries do - remove_column :merge_requests, :state, :string - end - end - - def down - return if merge_requests_state_column_exists? - - with_lock_retries do - add_column :merge_requests, :state, :string - end - end - - private - - def merge_requests_state_column_exists? - column_exists?(:merge_requests, :state) - end -end diff --git a/db/post_migrate/20200220115023_fix_projects_without_prometheus_service.rb b/db/post_migrate/20200220115023_fix_projects_without_prometheus_service.rb deleted file mode 100644 index 274a392a52a..00000000000 --- a/db/post_migrate/20200220115023_fix_projects_without_prometheus_service.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class FixProjectsWithoutPrometheusService < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - BATCH_SIZE = 50_000 - MIGRATION = 'FixProjectsWithoutPrometheusService' - - disable_ddl_transaction! - - class Project < ActiveRecord::Base - include EachBatch - end - - def up - queue_background_migration_jobs_by_range_at_intervals(Project, MIGRATION, 2.minutes, batch_size: BATCH_SIZE) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200221142216_remove_repository_storage_from_snippets.rb b/db/post_migrate/20200221142216_remove_repository_storage_from_snippets.rb deleted file mode 100644 index f9ef985218b..00000000000 --- a/db/post_migrate/20200221142216_remove_repository_storage_from_snippets.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class RemoveRepositoryStorageFromSnippets < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - return unless column_exists?(:snippets, :repository_storage) - - remove_column :snippets, :repository_storage - end - - def down - return if column_exists?(:snippets, :repository_storage) - - add_column_with_default( # rubocop:disable Migration/AddColumnWithDefault - :snippets, - :repository_storage, - :string, - default: 'default', - limit: 255, - allow_null: false - ) - end -end diff --git a/db/post_migrate/20200226124757_remove_health_status_from_epics.rb b/db/post_migrate/20200226124757_remove_health_status_from_epics.rb deleted file mode 100644 index e59edbacd2b..00000000000 --- a/db/post_migrate/20200226124757_remove_health_status_from_epics.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RemoveHealthStatusFromEpics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - remove_column :epics, :health_status - end - end - - def down - with_lock_retries do - add_column :epics, :health_status, :integer, limit: 2 - end - end -end diff --git a/db/post_migrate/20200226162239_cleanup_closed_at_rename_in_vulnerabilities.rb b/db/post_migrate/20200226162239_cleanup_closed_at_rename_in_vulnerabilities.rb deleted file mode 100644 index eb7df0b8d22..00000000000 --- a/db/post_migrate/20200226162239_cleanup_closed_at_rename_in_vulnerabilities.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class CleanupClosedAtRenameInVulnerabilities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - cleanup_concurrent_column_rename :vulnerabilities, :closed_at, :dismissed_at - end - - def down - undo_cleanup_concurrent_column_rename :vulnerabilities, :closed_at, :dismissed_at - end -end diff --git a/db/post_migrate/20200226162723_cleanup_closed_by_rename_in_vulnerabilities.rb b/db/post_migrate/20200226162723_cleanup_closed_by_rename_in_vulnerabilities.rb deleted file mode 100644 index 4aa3568db14..00000000000 --- a/db/post_migrate/20200226162723_cleanup_closed_by_rename_in_vulnerabilities.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class CleanupClosedByRenameInVulnerabilities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - cleanup_concurrent_column_rename :vulnerabilities, :closed_by_id, :dismissed_by_id - end - - def down - undo_cleanup_concurrent_column_rename :vulnerabilities, :closed_by_id, :dismissed_by_id - end -end diff --git a/db/post_migrate/20200227140242_update_occurrence_severity_column.rb b/db/post_migrate/20200227140242_update_occurrence_severity_column.rb deleted file mode 100644 index 6d250532383..00000000000 --- a/db/post_migrate/20200227140242_update_occurrence_severity_column.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -class UpdateOccurrenceSeverityColumn < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - BATCH_SIZE = 1_000 - INTERVAL = 5.minutes - - # 23_044 records to be updated on GitLab.com, - def up - # create temporary index for undefined vulnerabilities - add_concurrent_index(:vulnerability_occurrences, :id, where: 'severity = 0', name: 'undefined_vulnerabilities') - - return unless Gitlab.ee? - - migration = Gitlab::BackgroundMigration::RemoveUndefinedOccurrenceSeverityLevel - migration_name = migration.to_s.demodulize - relation = migration::Occurrence.undefined_severity - queue_background_migration_jobs_by_range_at_intervals(relation, - migration_name, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # no-op - # temporary index is to be dropped in a different migration in an upcoming release - remove_concurrent_index(:vulnerability_occurrences, :id, where: 'severity = 0', name: 'undefined_vulnerabilities') - # This migration can not be reversed because we can not know which records had undefined severity - end -end diff --git a/db/post_migrate/20200302142052_update_vulnerability_severity_column.rb b/db/post_migrate/20200302142052_update_vulnerability_severity_column.rb deleted file mode 100644 index fa38569f35d..00000000000 --- a/db/post_migrate/20200302142052_update_vulnerability_severity_column.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class UpdateVulnerabilitySeverityColumn < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - BATCH_SIZE = 1_000 - INTERVAL = 2.minutes - - def up - # create temporary index for undefined vulnerabilities - add_concurrent_index(:vulnerabilities, :id, where: 'severity = 0', name: 'undefined_vulnerability') - - return unless Gitlab.ee? - - migration = Gitlab::BackgroundMigration::RemoveUndefinedVulnerabilitySeverityLevel - migration_name = migration.to_s.demodulize - relation = migration::Vulnerability.undefined_severity - queue_background_migration_jobs_by_range_at_intervals(relation, - migration_name, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # no-op - # This migration can not be reversed because we can not know which records had undefined severity - end -end diff --git a/db/post_migrate/20200304211738_remove_file_type_from_packages_package_files.rb b/db/post_migrate/20200304211738_remove_file_type_from_packages_package_files.rb deleted file mode 100644 index 98bce8845ab..00000000000 --- a/db/post_migrate/20200304211738_remove_file_type_from_packages_package_files.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class RemoveFileTypeFromPackagesPackageFiles < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - remove_column :packages_package_files, :file_type, :integer - end -end diff --git a/db/post_migrate/20200305082754_remove_duplicate_labels_from_project.rb b/db/post_migrate/20200305082754_remove_duplicate_labels_from_project.rb deleted file mode 100644 index f7df9f28187..00000000000 --- a/db/post_migrate/20200305082754_remove_duplicate_labels_from_project.rb +++ /dev/null @@ -1,132 +0,0 @@ -# frozen_string_literal: true - -class RemoveDuplicateLabelsFromProject < ActiveRecord::Migration[6.0] - DOWNTIME = false - - CREATE = 1 - RENAME = 2 - - disable_ddl_transaction! - - class BackupLabel < Label - self.inheritance_column = :_type_disabled - - self.table_name = 'backup_labels' - end - - class Label < ApplicationRecord - self.table_name = 'labels' - end - - class Project < ApplicationRecord - include EachBatch - - self.table_name = 'projects' - end - - BATCH_SIZE = 100_000 - - def up - # Split to smaller chunks - # Loop rather than background job, every 100,000 - # there are 45,000,000 projects in total - Project.each_batch(of: BATCH_SIZE) do |batch| - range = batch.pluck('MIN(id)', 'MAX(id)').first - - transaction do - remove_full_duplicates(*range) - end - - transaction do - rename_partial_duplicates(*range) - end - end - end - - def down - Project.each_batch(of: BATCH_SIZE) do |batch| - range = batch.pluck('MIN(id)', 'MAX(id)').first - - restore_renamed_labels(*range) - restore_deleted_labels(*range) - end - end - - def remove_full_duplicates(start_id, stop_id) - # Fields that are considered duplicate: - # project_id title template description type color - - duplicate_labels = ApplicationRecord.connection.execute(<<-SQL.squish) -WITH data AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( - SELECT labels.*, - row_number() OVER (PARTITION BY labels.project_id, labels.title, labels.template, labels.description, labels.type, labels.color ORDER BY labels.id) AS row_number, - #{CREATE} AS restore_action - FROM labels - WHERE labels.project_id BETWEEN #{start_id} AND #{stop_id} - AND NOT EXISTS (SELECT * FROM board_labels WHERE board_labels.label_id = labels.id) - AND NOT EXISTS (SELECT * FROM label_links WHERE label_links.label_id = labels.id) - AND NOT EXISTS (SELECT * FROM label_priorities WHERE label_priorities.label_id = labels.id) - AND NOT EXISTS (SELECT * FROM lists WHERE lists.label_id = labels.id) - AND NOT EXISTS (SELECT * FROM resource_label_events WHERE resource_label_events.label_id = labels.id) -) SELECT * FROM data WHERE row_number > 1; - SQL - - if duplicate_labels.any? - # create backup records - BackupLabel.insert_all!(duplicate_labels.map { |label| label.except("row_number") }) - - Label.where(id: duplicate_labels.pluck("id")).delete_all - end - end - - def rename_partial_duplicates(start_id, stop_id) - # We need to ensure that the new title (with `_duplicate#{ID}`) doesn't exceed the limit. - # Truncate the original title (if needed) to 245 characters minus the length of the ID - # then add `_duplicate#{ID}` - - soft_duplicates = ApplicationRecord.connection.execute(<<-SQL.squish) -WITH data AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( - SELECT - *, - substring(title from 1 for 245 - length(id::text)) || '_duplicate' || id::text as new_title, - #{RENAME} AS restore_action, - row_number() OVER (PARTITION BY project_id, title ORDER BY id) AS row_number - FROM labels - WHERE project_id BETWEEN #{start_id} AND #{stop_id} -) SELECT * FROM data WHERE row_number > 1; - SQL - - if soft_duplicates.any? - # create backup records - BackupLabel.insert_all!(soft_duplicates.map { |label| label.except("row_number") }) - - ApplicationRecord.connection.execute(<<-SQL.squish) -UPDATE labels SET title = substring(title from 1 for 245 - length(id::text)) || '_duplicate' || id::text -WHERE labels.id IN (#{soft_duplicates.map { |dup| dup["id"] }.join(", ")}); - SQL - end - end - - def restore_renamed_labels(start_id, stop_id) - # the backup label IDs are not incremental, they are copied directly from the Labels table - ApplicationRecord.connection.execute(<<-SQL.squish) -WITH backups AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( - SELECT id, title - FROM backup_labels - WHERE project_id BETWEEN #{start_id} AND #{stop_id} AND - restore_action = #{RENAME} -) UPDATE labels SET title = backups.title -FROM backups -WHERE labels.id = backups.id; - SQL - end - - def restore_deleted_labels(start_id, stop_id) - ActiveRecord::Base.connection.execute(<<-SQL.squish) -INSERT INTO labels -SELECT id, title, color, project_id, created_at, updated_at, template, description, description_html, type, group_id, cached_markdown_version FROM backup_labels - WHERE backup_labels.project_id BETWEEN #{start_id} AND #{stop_id} - AND backup_labels.restore_action = #{CREATE} - SQL - end -end diff --git a/db/post_migrate/20200305082858_add_uniqueness_index_to_label_title_and_project.rb b/db/post_migrate/20200305082858_add_uniqueness_index_to_label_title_and_project.rb deleted file mode 100644 index ce235ba4aea..00000000000 --- a/db/post_migrate/20200305082858_add_uniqueness_index_to_label_title_and_project.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddUniquenessIndexToLabelTitleAndProject < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - PROJECT_AND_TITLE = [:project_id, :title] - - def up - add_concurrent_index :labels, PROJECT_AND_TITLE, where: "labels.group_id IS NULL", unique: true, name: "index_labels_on_project_id_and_title_unique" - remove_concurrent_index :labels, PROJECT_AND_TITLE, name: "index_labels_on_project_id_and_title" - end - - def down - add_concurrent_index :labels, PROJECT_AND_TITLE, where: "labels.group_id IS NULL", unique: false, name: "index_labels_on_project_id_and_title" - remove_concurrent_index :labels, PROJECT_AND_TITLE, name: "index_labels_on_project_id_and_title_unique" - end -end diff --git a/db/post_migrate/20200310075115_schedule_link_lfs_objects_projects.rb b/db/post_migrate/20200310075115_schedule_link_lfs_objects_projects.rb deleted file mode 100644 index d1ed53d8e70..00000000000 --- a/db/post_migrate/20200310075115_schedule_link_lfs_objects_projects.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class ScheduleLinkLfsObjectsProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - MIGRATION = 'LinkLfsObjectsProjects' - BATCH_SIZE = 1000 - - disable_ddl_transaction! - - def up - lfs_objects_projects = Gitlab::BackgroundMigration::LinkLfsObjectsProjects::LfsObjectsProject.linkable - - queue_background_migration_jobs_by_range_at_intervals( - lfs_objects_projects, - MIGRATION, - BackgroundMigrationWorker.minimum_interval, - batch_size: BATCH_SIZE - ) - end - - def down - # No-op. No need to make this reversible. In case the jobs enqueued runs and - # fails at some point, some records will be created. When rescheduled, those - # records won't be re-created. It's also hard to track which records to clean - # up if ever. - end -end diff --git a/db/post_migrate/20200310135818_remove_temporary_promoted_notes_index.rb b/db/post_migrate/20200310135818_remove_temporary_promoted_notes_index.rb deleted file mode 100644 index 0b9bbf1e17b..00000000000 --- a/db/post_migrate/20200310135818_remove_temporary_promoted_notes_index.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -# Removes temporary index to fix orphan promoted issues. -# For more information check: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23916 -class RemoveTemporaryPromotedNotesIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :notes, 'tmp_idx_on_promoted_notes' - end - - def down - add_concurrent_index :notes, - :note, - where: "noteable_type = 'Issue' AND system IS TRUE AND note LIKE 'promoted to epic%'", - name: 'tmp_idx_on_promoted_notes' - end -end diff --git a/db/post_migrate/20200310215714_migrate_saml_identities_to_scim_identities.rb b/db/post_migrate/20200310215714_migrate_saml_identities_to_scim_identities.rb deleted file mode 100644 index 570eec53be3..00000000000 --- a/db/post_migrate/20200310215714_migrate_saml_identities_to_scim_identities.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class MigrateSamlIdentitiesToScimIdentities < ActiveRecord::Migration[6.0] - DOWNTIME = false - - class Identity < ActiveRecord::Base - self.table_name = 'identities' - - include ::EachBatch - end - - def up - Identity - .joins('INNER JOIN saml_providers ON saml_providers.id = identities.saml_provider_id') - .where('saml_providers.group_id IN (SELECT group_id FROM scim_oauth_access_tokens)') - .select('identities.extern_uid, identities.user_id, saml_providers.group_id, TRUE AS active, - identities.created_at, CURRENT_TIMESTAMP AS updated_at') - .each_batch do |batch| - data_to_insert = batch.map do |record| - record.attributes.extract!("extern_uid", "user_id", "group_id", "active", "created_at", "updated_at") - end - - Gitlab::Database.main.bulk_insert(:scim_identities, data_to_insert, on_conflict: :do_nothing) # rubocop:disable Gitlab/BulkInsert - end - end - - def down - end -end diff --git a/db/post_migrate/20200311130802_schedule_populate_user_highest_roles_table.rb b/db/post_migrate/20200311130802_schedule_populate_user_highest_roles_table.rb deleted file mode 100644 index 36f0d42a855..00000000000 --- a/db/post_migrate/20200311130802_schedule_populate_user_highest_roles_table.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class SchedulePopulateUserHighestRolesTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - BATCH_SIZE = 10_000 - DELAY = 5.minutes.to_i - DOWNTIME = false - MIGRATION = 'PopulateUserHighestRolesTable' - - disable_ddl_transaction! - - class User < ActiveRecord::Base - include EachBatch - - scope :active, -> { - where(state: 'active', user_type: nil, bot_type: nil) - .where('ghost IS NOT TRUE') - } - end - - def up - # We currently have ~5_300_000 users with the state active on GitLab.com. - # This means it'll schedule ~530 jobs (10k Users each) with a 5 minutes gap, - # so this should take ~44 hours for all background migrations to complete. - User.active.each_batch(of: BATCH_SIZE) do |batch, index| - range = batch.pluck(Arel.sql('MIN(id)'), Arel.sql('MAX(id)')).first - delay = index * DELAY - - migrate_in(delay.seconds, MIGRATION, [*range]) - end - end - - def down - # nothing - end -end diff --git a/db/post_migrate/20200311192351_add_index_on_noteable_type_and_noteable_id_to_sent_notifications.rb b/db/post_migrate/20200311192351_add_index_on_noteable_type_and_noteable_id_to_sent_notifications.rb deleted file mode 100644 index fa0246218c3..00000000000 --- a/db/post_migrate/20200311192351_add_index_on_noteable_type_and_noteable_id_to_sent_notifications.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnNoteableTypeAndNoteableIdToSentNotifications < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_sent_notifications_on_noteable_type_noteable_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :sent_notifications, - [:noteable_id], - name: INDEX_NAME, - where: "noteable_type = 'Issue'" - end - - def down - remove_concurrent_index_by_name :sent_notifications, INDEX_NAME - end -end diff --git a/db/post_migrate/20200312134637_backfill_environment_id_on_deployment_merge_requests.rb b/db/post_migrate/20200312134637_backfill_environment_id_on_deployment_merge_requests.rb deleted file mode 100644 index 77cb1ae8508..00000000000 --- a/db/post_migrate/20200312134637_backfill_environment_id_on_deployment_merge_requests.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class BackfillEnvironmentIdOnDeploymentMergeRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - # no-op - - # this migration is deleted because there is no foreign key for - # deployments.environment_id and this caused a failure upgrading - # deployments_merge_requests.environment_id - # - # Details on the following issues: - # * https://gitlab.com/gitlab-org/gitlab/-/issues/217191 - # * https://gitlab.com/gitlab-org/gitlab/-/issues/26229 - end - - def down - # no-op - - # this migration is designed to delete duplicated data - end -end diff --git a/db/post_migrate/20200313203550_remove_orphaned_chat_names.rb b/db/post_migrate/20200313203550_remove_orphaned_chat_names.rb deleted file mode 100644 index 59cd2b31772..00000000000 --- a/db/post_migrate/20200313203550_remove_orphaned_chat_names.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RemoveOrphanedChatNames < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute("DELETE FROM chat_names WHERE service_id NOT IN(SELECT id FROM services WHERE services.type = 'chat')") - end - - def down - say 'Orphaned user chat names were removed as a part of this migration and are non-recoverable' - end -end diff --git a/db/post_migrate/20200313204021_validate_foreign_key_from_chat_name_to_service.rb b/db/post_migrate/20200313204021_validate_foreign_key_from_chat_name_to_service.rb deleted file mode 100644 index fd9feab17db..00000000000 --- a/db/post_migrate/20200313204021_validate_foreign_key_from_chat_name_to_service.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class ValidateForeignKeyFromChatNameToService < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - def up - validate_foreign_key :chat_names, :service_id - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200319071702_consume_remaining_link_lfs_objects_projects_jobs.rb b/db/post_migrate/20200319071702_consume_remaining_link_lfs_objects_projects_jobs.rb deleted file mode 100644 index 63fa0234a5b..00000000000 --- a/db/post_migrate/20200319071702_consume_remaining_link_lfs_objects_projects_jobs.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class ConsumeRemainingLinkLfsObjectsProjectsJobs < ActiveRecord::Migration[6.0] - DOWNTIME = false - - disable_ddl_transaction! - - def up - Gitlab::BackgroundMigration.steal('LinkLfsObjectsProjects') - end - - def down - # no-op as there is no need to do anything if this gets rolled back - end -end diff --git a/db/post_migrate/20200323011225_complete_migrate_security_scans.rb b/db/post_migrate/20200323011225_complete_migrate_security_scans.rb deleted file mode 100644 index 39c9a78b1b6..00000000000 --- a/db/post_migrate/20200323011225_complete_migrate_security_scans.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class CompleteMigrateSecurityScans < ActiveRecord::Migration[6.0] - disable_ddl_transaction! - - def up - Gitlab::BackgroundMigration.steal('MigrateSecurityScans') - end - - def down - # intentionally blank - end -end diff --git a/db/post_migrate/20200323011955_remove_index_used_for_scan_migration.rb b/db/post_migrate/20200323011955_remove_index_used_for_scan_migration.rb deleted file mode 100644 index 0568cdb8483..00000000000 --- a/db/post_migrate/20200323011955_remove_index_used_for_scan_migration.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexUsedForScanMigration < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'job_artifacts_secure_reports_temp_index' - COLUMNS = [:id, :file_type, :job_id, :created_at, :updated_at] - - disable_ddl_transaction! - - def up - if index_exists?(:ci_job_artifacts, COLUMNS, name: INDEX_NAME) - remove_concurrent_index(:ci_job_artifacts, COLUMNS, name: INDEX_NAME) - end - end - - def down - add_concurrent_index(:ci_job_artifacts, - COLUMNS, - name: INDEX_NAME, - where: 'file_type BETWEEN 5 AND 8') - end -end diff --git a/db/post_migrate/20200323080714_trigger_background_migration_for_users_bio.rb b/db/post_migrate/20200323080714_trigger_background_migration_for_users_bio.rb deleted file mode 100644 index 31ab41a6b88..00000000000 --- a/db/post_migrate/20200323080714_trigger_background_migration_for_users_bio.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class TriggerBackgroundMigrationForUsersBio < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INTERVAL = 2.minutes.to_i - BATCH_SIZE = 500 - MIGRATION = 'MigrateUsersBioToUserDetails' - - disable_ddl_transaction! - - class User < ActiveRecord::Base - self.table_name = 'users' - - include ::EachBatch - end - - def up - relation = User.where("(COALESCE(bio, '') IS DISTINCT FROM '')") - - queue_background_migration_jobs_by_range_at_intervals(relation, - MIGRATION, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200325162730_schedule_backfill_push_rules_id_in_projects.rb b/db/post_migrate/20200325162730_schedule_backfill_push_rules_id_in_projects.rb deleted file mode 100644 index 984f4f20441..00000000000 --- a/db/post_migrate/20200325162730_schedule_backfill_push_rules_id_in_projects.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -class ScheduleBackfillPushRulesIdInProjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - MIGRATION = 'BackfillPushRulesIdInProjects' - BATCH_SIZE = 1_000 - - class PushRules < ActiveRecord::Base - include EachBatch - - self.table_name = 'push_rules' - end - - def up - # Update one record that is connected to the instance - value_to_be_updated_to = ScheduleBackfillPushRulesIdInProjects::PushRules.find_by(is_sample: true)&.id - - if value_to_be_updated_to - execute "UPDATE application_settings SET push_rule_id = #{value_to_be_updated_to} - WHERE id IN (SELECT MAX(id) FROM application_settings);" - end - - ApplicationSetting.expire - - queue_background_migration_jobs_by_range_at_intervals(ScheduleBackfillPushRulesIdInProjects::PushRules, - MIGRATION, - 5.minutes, - batch_size: BATCH_SIZE) - end - - def down - execute "UPDATE application_settings SET push_rule_id = NULL" - - ApplicationSetting.expire - end -end diff --git a/db/post_migrate/20200401091051_remove_reference_columns_from_resource_milestone_events.rb b/db/post_migrate/20200401091051_remove_reference_columns_from_resource_milestone_events.rb deleted file mode 100644 index 639ab93cf18..00000000000 --- a/db/post_migrate/20200401091051_remove_reference_columns_from_resource_milestone_events.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class RemoveReferenceColumnsFromResourceMilestoneEvents < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - remove_column :resource_milestone_events, :reference, :text - remove_column :resource_milestone_events, :reference_html, :text - remove_column :resource_milestone_events, :cached_markdown_version, :integer - end -end diff --git a/db/post_migrate/20200403132349_remove_old_index_pages_domains_need_auto_ssl_renewal.rb b/db/post_migrate/20200403132349_remove_old_index_pages_domains_need_auto_ssl_renewal.rb deleted file mode 100644 index b36dce188df..00000000000 --- a/db/post_migrate/20200403132349_remove_old_index_pages_domains_need_auto_ssl_renewal.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RemoveOldIndexPagesDomainsNeedAutoSslRenewal < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = 'index_pages_domains_need_auto_ssl_renewal' - - disable_ddl_transaction! - - def up - remove_concurrent_index(:pages_domains, [:certificate_source, :certificate_valid_not_after], - where: "auto_ssl_enabled = true", name: INDEX_NAME) - end - - def down - add_concurrent_index(:pages_domains, [:certificate_source, :certificate_valid_not_after], - where: "auto_ssl_enabled = true", name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20200406102120_backfill_deployment_clusters_from_deployments.rb b/db/post_migrate/20200406102120_backfill_deployment_clusters_from_deployments.rb deleted file mode 100644 index ab217ba92ab..00000000000 --- a/db/post_migrate/20200406102120_backfill_deployment_clusters_from_deployments.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class BackfillDeploymentClustersFromDeployments < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - MIGRATION = 'BackfillDeploymentClustersFromDeployments' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 10_000 - - disable_ddl_transaction! - - class Deployment < ActiveRecord::Base - include EachBatch - - default_scope { where.not(cluster_id: nil) } # rubocop:disable Cop/DefaultScope - - self.table_name = 'deployments' - end - - def up - say "Scheduling `#{MIGRATION}` jobs" - - queue_background_migration_jobs_by_range_at_intervals(Deployment, MIGRATION, DELAY_INTERVAL, batch_size: BATCH_SIZE) - end - - def down - # NOOP - end -end diff --git a/db/post_migrate/20200406193427_add_index_to_issues_health_status.rb b/db/post_migrate/20200406193427_add_index_to_issues_health_status.rb deleted file mode 100644 index 83baf5b6d75..00000000000 --- a/db/post_migrate/20200406193427_add_index_to_issues_health_status.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToIssuesHealthStatus < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'idx_issues_on_health_status_not_null' - - disable_ddl_transaction! - - def up - add_concurrent_index( - :issues, - :health_status, - where: 'health_status IS NOT NULL', - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index_by_name(:issues, INDEX_NAME) - end -end diff --git a/db/post_migrate/20200407094005_drop_vulnerability_severity_index.rb b/db/post_migrate/20200407094005_drop_vulnerability_severity_index.rb deleted file mode 100644 index 14e6ce32097..00000000000 --- a/db/post_migrate/20200407094005_drop_vulnerability_severity_index.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class DropVulnerabilitySeverityIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - INDEX_NAME = 'undefined_vulnerabilities' - - def up - remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME - end - - def down - add_concurrent_index(:vulnerability_occurrences, :id, where: 'severity = 0', name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20200407094923_drop_vulnerabilities_severity_index.rb b/db/post_migrate/20200407094923_drop_vulnerabilities_severity_index.rb deleted file mode 100644 index 90ec7dc7ec2..00000000000 --- a/db/post_migrate/20200407094923_drop_vulnerabilities_severity_index.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class DropVulnerabilitiesSeverityIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - INDEX_NAME = 'undefined_vulnerability' - - def up - remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME - end - - def down - add_concurrent_index(:vulnerabilities, :id, where: 'severity = 0', name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20200408110856_add_nginx_five_hundred_percentage_metric.rb b/db/post_migrate/20200408110856_add_nginx_five_hundred_percentage_metric.rb deleted file mode 100644 index a99e0291fe8..00000000000 --- a/db/post_migrate/20200408110856_add_nginx_five_hundred_percentage_metric.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddNginxFiveHundredPercentageMetric < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - ::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200408132152_remove_namespaces_trial_ends_on.rb b/db/post_migrate/20200408132152_remove_namespaces_trial_ends_on.rb deleted file mode 100644 index a303b9d1869..00000000000 --- a/db/post_migrate/20200408132152_remove_namespaces_trial_ends_on.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class RemoveNamespacesTrialEndsOn < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :namespaces, 'index_namespaces_on_trial_ends_on' - - with_lock_retries do - remove_column :namespaces, :trial_ends_on - end - end - - def down - unless column_exists?(:namespaces, :trial_ends_on) - with_lock_retries do - add_column :namespaces, :trial_ends_on, :datetime_with_timezone # rubocop:disable Migration/AddColumnsToWideTables - end - end - - add_concurrent_index :namespaces, :trial_ends_on, using: 'btree', where: 'trial_ends_on IS NOT NULL' - end -end diff --git a/db/post_migrate/20200409211607_migrate_legacy_attachments.rb b/db/post_migrate/20200409211607_migrate_legacy_attachments.rb deleted file mode 100644 index fb4a996d3b7..00000000000 --- a/db/post_migrate/20200409211607_migrate_legacy_attachments.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class MigrateLegacyAttachments < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - - MIGRATION = 'LegacyUploadsMigrator' - BATCH_SIZE = 5000 - INTERVAL = 5.minutes.to_i - - class Upload < ActiveRecord::Base - self.table_name = 'uploads' - - include ::EachBatch - end - - def up - queue_background_migration_jobs_by_range_at_intervals(Upload.where(uploader: 'AttachmentUploader', model_type: 'Note'), - MIGRATION, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200416111111_migrate_vulnerability_dismissals.rb b/db/post_migrate/20200416111111_migrate_vulnerability_dismissals.rb deleted file mode 100644 index 6ca3db8902b..00000000000 --- a/db/post_migrate/20200416111111_migrate_vulnerability_dismissals.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class MigrateVulnerabilityDismissals < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - MIGRATION = 'UpdateVulnerabilitiesToDismissed' - BATCH_SIZE = 500 - DELAY_INTERVAL = 2.minutes.to_i - - class Vulnerability < ActiveRecord::Base - self.table_name = 'vulnerabilities' - self.inheritance_column = :_type_disabled - - include ::EachBatch - end - - def up - return unless Gitlab.ee? - - Vulnerability.select('project_id').group(:project_id).each_batch(of: BATCH_SIZE, column: "project_id") do |project_batch, index| - batch_delay = (index - 1) * BATCH_SIZE * DELAY_INTERVAL - - project_batch.each_with_index do |project, project_batch_index| - project_delay = project_batch_index * DELAY_INTERVAL - migrate_in(batch_delay + project_delay, MIGRATION, project[:project_id]) - end - end - end - - def down - # nothing to do - end -end diff --git a/db/post_migrate/20200420094444_backfill_snippet_repositories.rb b/db/post_migrate/20200420094444_backfill_snippet_repositories.rb deleted file mode 100644 index 452a1a5330f..00000000000 --- a/db/post_migrate/20200420094444_backfill_snippet_repositories.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class BackfillSnippetRepositories < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INTERVAL = 3.minutes - BATCH_SIZE = 100 - MIGRATION = 'BackfillSnippetRepositories' - - disable_ddl_transaction! - - class Snippet < ActiveRecord::Base - include EachBatch - - self.table_name = 'snippets' - self.inheritance_column = :_type_disabled - end - - def up - queue_background_migration_jobs_by_range_at_intervals(Snippet, - MIGRATION, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200420162730_remove_additional_application_settings_rows.rb b/db/post_migrate/20200420162730_remove_additional_application_settings_rows.rb deleted file mode 100644 index e4a0ec1eb4a..00000000000 --- a/db/post_migrate/20200420162730_remove_additional_application_settings_rows.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveAdditionalApplicationSettingsRows < ActiveRecord::Migration[6.0] - class ApplicationSetting < ActiveRecord::Base - self.table_name = 'application_settings' - end - - def up - return if ApplicationSetting.count == 1 - - execute "DELETE from application_settings WHERE id NOT IN (SELECT MAX(id) FROM application_settings);" - end - - def down - # no changes - end -end diff --git a/db/post_migrate/20200421195234_backfill_status_page_published_incidents.rb b/db/post_migrate/20200421195234_backfill_status_page_published_incidents.rb deleted file mode 100644 index fa7a5a9d924..00000000000 --- a/db/post_migrate/20200421195234_backfill_status_page_published_incidents.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -class BackfillStatusPagePublishedIncidents < ActiveRecord::Migration[6.0] - DOWNTIME = false - - disable_ddl_transaction! - - class Incident < ActiveRecord::Base - self.table_name = 'status_page_published_incidents' - end - - class StatusPageIssue < ActiveRecord::Base - include ::EachBatch - - self.table_name = 'issues' - - scope :published_only, -> do - joins('INNER JOIN status_page_settings ON status_page_settings.project_id = issues.project_id') - .where('status_page_settings.enabled = true') - .where(confidential: false) - end - end - - def up - current_time = Time.current - - StatusPageIssue.published_only.each_batch do |batch| - incidents = batch.map do |status_page_issue| - { - issue_id: status_page_issue.id, - created_at: current_time, - updated_at: current_time - } - end - - Incident.insert_all(incidents, unique_by: :issue_id) - end - end - - def down - # no op - - # While we expect this table to be empty at the point of - # the up migration, there is no reliable way to determine - # whether records were added as a part of the migration - # or after it has run. - end -end diff --git a/db/post_migrate/20200424043515_drop_namespaces_plan_id.rb b/db/post_migrate/20200424043515_drop_namespaces_plan_id.rb deleted file mode 100644 index b05f2da648a..00000000000 --- a/db/post_migrate/20200424043515_drop_namespaces_plan_id.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class DropNamespacesPlanId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - remove_column :namespaces, :plan_id - end - end - - def down - unless column_exists?(:namespaces, :plan_id) - with_lock_retries do - add_column :namespaces, :plan_id, :integer # rubocop:disable Migration/AddColumnsToWideTables - end - end - - add_concurrent_index :namespaces, :plan_id - add_concurrent_foreign_key :namespaces, :plans, column: :plan_id, on_delete: :nullify - end -end diff --git a/db/post_migrate/20200427064130_cleanup_optimistic_locking_nulls_pt2_fixed.rb b/db/post_migrate/20200427064130_cleanup_optimistic_locking_nulls_pt2_fixed.rb deleted file mode 100644 index 63f85fc7156..00000000000 --- a/db/post_migrate/20200427064130_cleanup_optimistic_locking_nulls_pt2_fixed.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -class CleanupOptimisticLockingNullsPt2Fixed < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - TABLES = %w(ci_stages ci_builds ci_pipelines).freeze - BATCH_SIZE = 10_000 - - def declare_class(table) - Class.new(ActiveRecord::Base) do - include EachBatch - - self.table_name = table - self.inheritance_column = :_type_disabled # Disable STI - end - end - - def up - last_table_final_delay = 0 - - TABLES.each do |table| - # cleanup wrong index created in the previous migration, it might be there on staging - remove_concurrent_index table.to_sym, :lock_version, where: "lock_version IS NULL" - - add_concurrent_index table.to_sym, :id, where: "lock_version IS NULL", name: "tmp_index_#{table}_lock_version" - - last_table_final_delay = queue_background_migration_jobs_by_range_at_intervals( - declare_class(table).where(lock_version: nil), - 'CleanupOptimisticLockingNulls', - 2.minutes, - batch_size: BATCH_SIZE, - other_job_arguments: [table], - initial_delay: last_table_final_delay - ) - end - end - - def down - TABLES.each do |table| - remove_concurrent_index table.to_sym, :id, where: "lock_version IS NULL", name: "tmp_index_#{table}_lock_version" - end - end -end diff --git a/db/post_migrate/20200428134356_remove_elastic_experimental_indexer_from_application_settings.rb b/db/post_migrate/20200428134356_remove_elastic_experimental_indexer_from_application_settings.rb deleted file mode 100644 index a9baf6fd8e3..00000000000 --- a/db/post_migrate/20200428134356_remove_elastic_experimental_indexer_from_application_settings.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -class RemoveElasticExperimentalIndexerFromApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - remove_column :application_settings, :elasticsearch_experimental_indexer, :boolean - end -end diff --git a/db/post_migrate/20200429002150_cleanup_sprints_state_rename.rb b/db/post_migrate/20200429002150_cleanup_sprints_state_rename.rb deleted file mode 100644 index 7f67a55a19d..00000000000 --- a/db/post_migrate/20200429002150_cleanup_sprints_state_rename.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class CleanupSprintsStateRename < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - cleanup_concurrent_column_rename :sprints, :state, :state_enum - end - - def down - undo_cleanup_concurrent_column_rename :sprints, :state, :state_enum - end -end diff --git a/db/post_migrate/20200506085748_update_undefined_confidence_from_occurrences.rb b/db/post_migrate/20200506085748_update_undefined_confidence_from_occurrences.rb deleted file mode 100644 index 06c82ad404b..00000000000 --- a/db/post_migrate/20200506085748_update_undefined_confidence_from_occurrences.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class UpdateUndefinedConfidenceFromOccurrences < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - INDEX_NAME = 'index_vulnerability_occurrences_on_id_and_confidence_eq_zero' - DOWNTIME = false - - disable_ddl_transaction! - BATCH_SIZE = 1_000 - INTERVAL = 2.minutes - - # 286_159 records to be updated on GitLab.com - def up - # create temporary index for undefined vulnerabilities - add_concurrent_index(:vulnerability_occurrences, :id, where: 'confidence = 0', name: INDEX_NAME) - - return unless Gitlab.ee? - - migration = Gitlab::BackgroundMigration::RemoveUndefinedOccurrenceConfidenceLevel - migration_name = migration.to_s.demodulize - relation = migration::Occurrence.undefined_confidence - queue_background_migration_jobs_by_range_at_intervals(relation, - migration_name, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # no-op - # temporary index is to be dropped in a different migration in an upcoming release - remove_concurrent_index(:vulnerability_occurrences, :id, where: 'confidence = 0', name: INDEX_NAME) - # This migration can not be reversed because we can not know which records had undefined confidence - end -end diff --git a/db/post_migrate/20200506125731_cleanup_user_highest_roles_population.rb b/db/post_migrate/20200506125731_cleanup_user_highest_roles_population.rb deleted file mode 100644 index 5e613228c56..00000000000 --- a/db/post_migrate/20200506125731_cleanup_user_highest_roles_population.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class CleanupUserHighestRolesPopulation < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_for_migrating_user_highest_roles_table' - - disable_ddl_transaction! - - def up - Gitlab::BackgroundMigration.steal('PopulateUserHighestRolesTable') - - remove_concurrent_index(:users, :id, name: INDEX_NAME) - end - - def down - add_concurrent_index(:users, - :id, - where: "state = 'active' AND user_type IS NULL AND bot_type IS NULL AND ghost IS NOT TRUE", - name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20200506154421_migrate_scim_identities_to_saml_for_new_users.rb b/db/post_migrate/20200506154421_migrate_scim_identities_to_saml_for_new_users.rb deleted file mode 100644 index 718e788aad7..00000000000 --- a/db/post_migrate/20200506154421_migrate_scim_identities_to_saml_for_new_users.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class MigrateScimIdentitiesToSamlForNewUsers < ActiveRecord::Migration[6.0] - DOWNTIME = false - - class ScimIdentity < ActiveRecord::Base - self.table_name = 'scim_identities' - - belongs_to :user - - include ::EachBatch - end - - class Identity < ActiveRecord::Base - self.table_name = 'identities' - - belongs_to :saml_provider - end - - def up - users_with_saml_provider = Identity.select('user_id').joins(:saml_provider) - - ScimIdentity.each_batch do |relation| - identity_records = relation - .select("scim_identities.extern_uid, 'group_saml', scim_identities.user_id, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, saml_providers.id") - .joins(:user) - .joins('inner join saml_providers on saml_providers.group_id=scim_identities.group_id') - .where("date_trunc('second',scim_identities.created_at) at time zone 'UTC' = date_trunc('second',users.created_at)") - .where.not(user_id: users_with_saml_provider) - - execute "insert into identities (extern_uid, provider, user_id, created_at, updated_at, saml_provider_id) #{identity_records.to_sql} on conflict do nothing" - end - end - - def down - end -end diff --git a/db/post_migrate/20200508091106_remove_bot_type.rb b/db/post_migrate/20200508091106_remove_bot_type.rb deleted file mode 100644 index 2afcf5308e7..00000000000 --- a/db/post_migrate/20200508091106_remove_bot_type.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class RemoveBotType < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :users, 'index_users_on_bot_type' - - with_lock_retries do - remove_column :users, :bot_type - end - end - - def down - unless column_exists?(:users, :bot_type) - with_lock_retries do - add_column :users, :bot_type, :integer, limit: 2 # rubocop:disable Migration/AddColumnsToWideTables - end - end - - execute 'UPDATE users set bot_type = user_type WHERE user_type IN(1,2,3,6)' - - add_concurrent_index :users, :bot_type - end -end diff --git a/db/post_migrate/20200511080113_add_projects_foreign_key_to_namespaces.rb b/db/post_migrate/20200511080113_add_projects_foreign_key_to_namespaces.rb deleted file mode 100644 index a7f67a3b5cd..00000000000 --- a/db/post_migrate/20200511080113_add_projects_foreign_key_to_namespaces.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class AddProjectsForeignKeyToNamespaces < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - FK_NAME = 'fk_projects_namespace_id' - - def up - with_lock_retries do - add_foreign_key( - :projects, - :namespaces, - column: :namespace_id, - on_delete: :restrict, - validate: false, - name: FK_NAME - ) - end - end - - def down - with_lock_retries do - remove_foreign_key_if_exists :projects, column: :namespace_id, name: FK_NAME - end - end -end diff --git a/db/post_migrate/20200511083541_cleanup_projects_with_missing_namespace.rb b/db/post_migrate/20200511083541_cleanup_projects_with_missing_namespace.rb deleted file mode 100644 index 8e6ee0f35ca..00000000000 --- a/db/post_migrate/20200511083541_cleanup_projects_with_missing_namespace.rb +++ /dev/null @@ -1,261 +0,0 @@ -# frozen_string_literal: true - -# rubocop:disable Migration/PreventStrings - -# This migration cleans up Projects that were orphaned when their namespace was deleted -# Instead of deleting them, we: -# - Find (or create) the Ghost User -# - Create (if not already exists) a `lost-and-found` group owned by the Ghost User -# - Find orphaned projects --> namespace_id can not be found in namespaces -# - Move the orphaned projects to the `lost-and-found` group -# (while making them private and setting `archived=true`) -# -# On GitLab.com (2020-05-11) this migration will update 66 orphaned projects -class CleanupProjectsWithMissingNamespace < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - VISIBILITY_PRIVATE = 0 - ACCESS_LEVEL_OWNER = 50 - - # The batch size of projects to check in each iteration - # We expect the selectivity for orphaned projects to be very low: - # (66 orphaned projects out of a total 13.6M) - # so 10K should be a safe choice - BATCH_SIZE = 10000 - - disable_ddl_transaction! - - class UserDetail < ActiveRecord::Base - self.table_name = 'user_details' - - belongs_to :user, class_name: 'CleanupProjectsWithMissingNamespace::User' - end - - class User < ActiveRecord::Base - self.table_name = 'users' - - LOST_AND_FOUND_GROUP = 'lost-and-found' - USER_TYPE_GHOST = 5 - DEFAULT_PROJECTS_LIMIT = 100000 - - default_value_for :admin, false - default_value_for :can_create_group, true # we need this to create the group - default_value_for :can_create_team, false - default_value_for :project_view, :files - default_value_for :notified_of_own_activity, false - default_value_for :preferred_language, I18n.default_locale - - has_one :user_detail, class_name: 'CleanupProjectsWithMissingNamespace::UserDetail' - has_one :namespace, -> { where(type: nil) }, - foreign_key: :owner_id, inverse_of: :owner, autosave: true, - class_name: 'CleanupProjectsWithMissingNamespace::Namespace' - - before_save :ensure_namespace_correct - before_save :ensure_bio_is_assigned_to_user_details, if: :bio_changed? - - enum project_view: { readme: 0, activity: 1, files: 2 } - - def ensure_namespace_correct - if namespace - namespace.path = username if username_changed? - namespace.name = name if name_changed? - else - build_namespace(path: username, name: name) - end - end - - def ensure_bio_is_assigned_to_user_details - user_detail.bio = bio.to_s[0...255] - end - - def user_detail - super.presence || build_user_detail - end - - # Return (or create if necessary) the `lost-and-found` group - def lost_and_found_group - existing_lost_and_found_group || Group.create_unique_group(self, LOST_AND_FOUND_GROUP) - end - - def existing_lost_and_found_group - # There should only be one Group for User Ghost starting with LOST_AND_FOUND_GROUP - Group - .joins('INNER JOIN members ON namespaces.id = members.source_id') - .where(namespaces: { type: 'Group' }) - .where(members: { type: 'GroupMember' }) - .where(members: { source_type: 'Namespace' }) - .where(members: { user_id: self.id }) - .where(members: { requested_at: nil }) - .where(members: { access_level: ACCESS_LEVEL_OWNER }) - .find_by(Group.arel_table[:name].matches("#{LOST_AND_FOUND_GROUP}%")) - end - - class << self - # Return (or create if necessary) the ghost user - def ghost - email = 'ghost%s@example.com' - - unique_internal(where(user_type: USER_TYPE_GHOST), 'ghost', email) do |u| - u.bio = _('This is a "Ghost User", created to hold all issues authored by users that have since been deleted. This user cannot be removed.') - u.name = 'Ghost User' - end - end - - def unique_internal(scope, username, email_pattern, &block) - scope.first || create_unique_internal(scope, username, email_pattern, &block) - end - - def create_unique_internal(scope, username, email_pattern, &creation_block) - # Since we only want a single one of these in an instance, we use an - # exclusive lease to ensure that this block is never run concurrently. - lease_key = "user:unique_internal:#{username}" - lease = Gitlab::ExclusiveLease.new(lease_key, timeout: 1.minute.to_i) - - until uuid = lease.try_obtain - # Keep trying until we obtain the lease. To prevent hammering Redis too - # much we'll wait for a bit between retries. - sleep(1) - end - - # Recheck if the user is already present. One might have been - # added between the time we last checked (first line of this method) - # and the time we acquired the lock. - existing_user = uncached { scope.first } - return existing_user if existing_user.present? - - uniquify = Uniquify.new - - username = uniquify.string(username) { |s| User.find_by_username(s) } - - email = uniquify.string(-> (n) { Kernel.sprintf(email_pattern, n) }) do |s| - User.find_by_email(s) - end - - User.create!( - username: username, - email: email, - user_type: USER_TYPE_GHOST, - projects_limit: DEFAULT_PROJECTS_LIMIT, - state: :active, - &creation_block - ) - ensure - Gitlab::ExclusiveLease.cancel(lease_key, uuid) - end - end - end - - class Namespace < ActiveRecord::Base - self.table_name = 'namespaces' - - belongs_to :owner, class_name: 'CleanupProjectsWithMissingNamespace::User' - end - - class Group < Namespace - # Disable STI to allow us to manually set "type = 'Group'" - # Otherwise rails forces "type = CleanupProjectsWithMissingNamespace::Group" - self.inheritance_column = :_type_disabled - - def self.create_unique_group(user, group_name) - # 'lost-and-found' may be already defined, find a unique one - group_name = Uniquify.new.string(group_name) do |str| - Group.where(parent_id: nil, name: str).exists? - end - - group = Group.create!( - name: group_name, - path: group_name, - type: 'Group', - description: 'Group to store orphaned projects', - visibility_level: VISIBILITY_PRIVATE - ) - - # No need to create a route for the lost-and-found group - - GroupMember.add_user(group, user, ACCESS_LEVEL_OWNER) - - group - end - end - - class Member < ActiveRecord::Base - self.table_name = 'members' - end - - class GroupMember < Member - NOTIFICATION_SETTING_GLOBAL = 3 - - # Disable STI to allow us to manually set "type = 'GroupMember'" - # Otherwise rails forces "type = CleanupProjectsWithMissingNamespace::GroupMember" - self.inheritance_column = :_type_disabled - - def self.add_user(source, user, access_level) - GroupMember.create!( - type: 'GroupMember', - source_id: source.id, - user_id: user.id, - source_type: 'Namespace', - access_level: access_level, - notification_level: NOTIFICATION_SETTING_GLOBAL - ) - end - end - - class Project < ActiveRecord::Base - self.table_name = 'projects' - - include ::EachBatch - - def self.without_namespace - where( - 'NOT EXISTS ( - SELECT 1 - FROM namespaces - WHERE projects.namespace_id = namespaces.id - )' - ) - end - end - - def up - # Reset the column information of all the models that update the database - # to ensure the Active Record's knowledge of the table structure is current - User.reset_column_information - Namespace.reset_column_information - Member.reset_column_information - Project.reset_column_information - - # Find or Create the ghost user - ghost_user = User.ghost - - # Find or Create the `lost-and-found` - lost_and_found = ghost_user.lost_and_found_group - - # With BATCH_SIZE=10K and projects.count=13.6M - # ~1360 iterations will be run: - # - each requires on average ~160ms for relation.without_namespace - # - worst case scenario is that 66 of those batches will trigger an update (~200ms each) - # In general, we expect less than 5% (=66/13.6M x 10K) to trigger an update - # Expected total run time: ~235 seconds (== 220 seconds + 14 seconds) - Project.each_batch(of: BATCH_SIZE) do |relation| - relation.without_namespace.update_all <<~SQL - namespace_id = #{lost_and_found.id}, - archived = TRUE, - visibility_level = #{VISIBILITY_PRIVATE}, - - -- Names are expected to be unique inside their namespace - -- (uniqueness validation on namespace_id, name) - -- Attach the id to the name and path to make sure that they are unique - name = name || '_' || id::text, - path = path || '_' || id::text - SQL - end - end - - def down - # no-op: the original state for those projects was inconsistent - # Also, the original namespace_id for each project is lost during the update - end -end -# rubocop:enable Migration/PreventStrings diff --git a/db/post_migrate/20200511092714_update_undefined_confidence_from_vulnerabilities.rb b/db/post_migrate/20200511092714_update_undefined_confidence_from_vulnerabilities.rb deleted file mode 100644 index d6611ddbd66..00000000000 --- a/db/post_migrate/20200511092714_update_undefined_confidence_from_vulnerabilities.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class UpdateUndefinedConfidenceFromVulnerabilities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - INDEX_NAME = 'index_vulnerability_on_id_and_confidence_eq_zero' - DOWNTIME = false - - disable_ddl_transaction! - BATCH_SIZE = 1_000 - INTERVAL = 2.minutes - - # 87_602 records to be updated on GitLab.com - def up - # create temporary index for undefined vulnerabilities - add_concurrent_index(:vulnerabilities, :id, where: 'confidence = 0', name: INDEX_NAME) - - return unless Gitlab.ee? - - migration = Gitlab::BackgroundMigration::RemoveUndefinedVulnerabilityConfidenceLevel - migration_name = migration.to_s.demodulize - relation = migration::Vulnerability.undefined_confidence - queue_background_migration_jobs_by_range_at_intervals(relation, - migration_name, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # no-op - # temporary index is to be dropped in a different migration in an upcoming release - remove_concurrent_index(:vulnerabilities, :id, where: 'confidence = 0', name: INDEX_NAME) - # This migration can not be reversed because we can not know which records had undefined confidence - end -end diff --git a/db/post_migrate/20200511130130_ensure_deprecated_jenkins_service_records_removal.rb b/db/post_migrate/20200511130130_ensure_deprecated_jenkins_service_records_removal.rb deleted file mode 100644 index 4c1f29f8e47..00000000000 --- a/db/post_migrate/20200511130130_ensure_deprecated_jenkins_service_records_removal.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class EnsureDeprecatedJenkinsServiceRecordsRemoval < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute <<~SQL.strip - DELETE FROM services WHERE type = 'JenkinsDeprecatedService'; - SQL - end - - def down - # no-op - - # The records were removed by `up` - end -end diff --git a/db/post_migrate/20200511145545_change_variable_interpolation_format_in_common_metrics.rb b/db/post_migrate/20200511145545_change_variable_interpolation_format_in_common_metrics.rb deleted file mode 100644 index ac3c545350d..00000000000 --- a/db/post_migrate/20200511145545_change_variable_interpolation_format_in_common_metrics.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class ChangeVariableInterpolationFormatInCommonMetrics < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - ::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute - end - - def down - # no-op - # The import cannot be reversed since we do not know the state that the - # common metrics in the PrometheusMetric table were in before the import. - end -end diff --git a/db/post_migrate/20200511162057_add_missing_instance_to_servicess.rb b/db/post_migrate/20200511162057_add_missing_instance_to_servicess.rb deleted file mode 100644 index efaef085e8c..00000000000 --- a/db/post_migrate/20200511162057_add_missing_instance_to_servicess.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class AddMissingInstanceToServicess < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - # This is a corrective migration to keep the instance column. - # Upgrade from 12.7 to 12.9 removes the instance column as it was first added - # in the normal migration and then removed in the post migration. - # - # 12.8 removed the instance column in a post deployment migration https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24885 - # 12.9 added the instance column in a normal migration https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25714 - # - # rubocop:disable Migration/AddColumnWithDefault - # rubocop:disable Migration/UpdateLargeTable - def up - unless column_exists?(:services, :instance) - add_column_with_default(:services, :instance, :boolean, default: false) - end - end - # rubocop:enable Migration/AddColumnWithDefault - # rubocop:enable Migration/UpdateLargeTable - - def down - # Does not apply - end -end diff --git a/db/post_migrate/20200511162115_add_missing_index_to_service_unique_instance_per_type.rb b/db/post_migrate/20200511162115_add_missing_index_to_service_unique_instance_per_type.rb deleted file mode 100644 index c9e0193f5d2..00000000000 --- a/db/post_migrate/20200511162115_add_missing_index_to_service_unique_instance_per_type.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class AddMissingIndexToServiceUniqueInstancePerType < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - # This is a corrective migration to keep the index on instance column. - # Upgrade from 12.7 to 12.9 removes the instance column as it was first added - # in the normal migration and then removed in the post migration. - # - # 12.8 removed the instance column in a post deployment migration https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24885 - # 12.9 added the instance column in a normal migration https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25714 - def up - unless index_exists_by_name?(:services, 'index_services_on_type_and_instance') - add_concurrent_index(:services, [:type, :instance], unique: true, where: 'instance IS TRUE') - end - end - - def down - # Does not apply - end -end diff --git a/db/post_migrate/20200511220023_validate_projects_foreign_key_to_namespaces.rb b/db/post_migrate/20200511220023_validate_projects_foreign_key_to_namespaces.rb deleted file mode 100644 index 37a761507fc..00000000000 --- a/db/post_migrate/20200511220023_validate_projects_foreign_key_to_namespaces.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class ValidateProjectsForeignKeyToNamespaces < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - FK_NAME = 'fk_projects_namespace_id' - - def up - # Validate the FK added with 20200511080113_add_projects_foreign_key_to_namespaces.rb - validate_foreign_key :projects, :namespace_id, name: FK_NAME - end - - def down - # no-op: No need to invalidate the foreign key - # The inconsistent data are permanently fixed with the data migration - # `20200511083541_cleanup_projects_with_missing_namespace.rb` - # even if it is rolled back. - # If there is an issue with the FK, we'll roll back the migration that adds the FK - end -end diff --git a/db/post_migrate/20200513171959_enable_hashed_storage.rb b/db/post_migrate/20200513171959_enable_hashed_storage.rb deleted file mode 100644 index 53e52b1caff..00000000000 --- a/db/post_migrate/20200513171959_enable_hashed_storage.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class EnableHashedStorage < ActiveRecord::Migration[6.0] - DOWNTIME = false - - class ApplicationSetting < ActiveRecord::Base - self.table_name = 'application_settings' - end - - def up - ApplicationSetting.update_all(hashed_storage_enabled: true) - end - - def down - # in 13.0 we are forcing hashed storage to always be enabled for new projects - end -end diff --git a/db/post_migrate/20200514000009_add_not_null_constraint_on_file_store_to_lfs_objects.rb b/db/post_migrate/20200514000009_add_not_null_constraint_on_file_store_to_lfs_objects.rb deleted file mode 100644 index 6b3b9a3155d..00000000000 --- a/db/post_migrate/20200514000009_add_not_null_constraint_on_file_store_to_lfs_objects.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullConstraintOnFileStoreToLfsObjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_not_null_constraint(:lfs_objects, :file_store, validate: false) - end - - def down - remove_not_null_constraint(:lfs_objects, :file_store) - end -end diff --git a/db/post_migrate/20200514000132_add_not_null_constraint_on_store_to_uploads.rb b/db/post_migrate/20200514000132_add_not_null_constraint_on_store_to_uploads.rb deleted file mode 100644 index c5f1cfa79b8..00000000000 --- a/db/post_migrate/20200514000132_add_not_null_constraint_on_store_to_uploads.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullConstraintOnStoreToUploads < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_not_null_constraint(:uploads, :store, validate: false) - end - - def down - remove_not_null_constraint(:uploads, :store) - end -end diff --git a/db/post_migrate/20200514000340_add_not_null_constraint_on_file_store_to_ci_jobs_artifacts.rb b/db/post_migrate/20200514000340_add_not_null_constraint_on_file_store_to_ci_jobs_artifacts.rb deleted file mode 100644 index 5759803e3b7..00000000000 --- a/db/post_migrate/20200514000340_add_not_null_constraint_on_file_store_to_ci_jobs_artifacts.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullConstraintOnFileStoreToCiJobsArtifacts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_not_null_constraint(:ci_job_artifacts, :file_store, validate: false) - end - - def down - remove_not_null_constraint(:ci_job_artifacts, :file_store) - end -end diff --git a/db/post_migrate/20200518114540_schedule_fix_ruby_object_in_audit_events.rb b/db/post_migrate/20200518114540_schedule_fix_ruby_object_in_audit_events.rb deleted file mode 100644 index e4335089540..00000000000 --- a/db/post_migrate/20200518114540_schedule_fix_ruby_object_in_audit_events.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -class ScheduleFixRubyObjectInAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_audit_events_on_ruby_object_in_details' - INTERVAL = 2.minutes.to_i - BATCH_SIZE = 1_000 - MIGRATION = 'FixRubyObjectInAuditEvents' - - disable_ddl_transaction! - - class AuditEvent < ActiveRecord::Base - self.table_name = 'audit_events' - - include ::EachBatch - end - - def up - return unless Gitlab.ee? - - # create temporary index for audit_events with ruby/object in details field, may take well over 1h - add_concurrent_index(:audit_events, :id, where: "details ~~ '%ruby/object%'", name: INDEX_NAME) - - relation = AuditEvent.where("details ~~ '%ruby/object%'") - - queue_background_migration_jobs_by_range_at_intervals( - relation, - MIGRATION, - INTERVAL, - batch_size: BATCH_SIZE - ) - end - - def down - # temporary index is to be dropped in a different migration in an upcoming release - # https://gitlab.com/gitlab-org/gitlab/issues/196842 - remove_concurrent_index_by_name(:audit_events, INDEX_NAME) - end -end diff --git a/db/post_migrate/20200518133123_add_index_on_starting_ending_at_to_metrics_dashboard_annotations.rb b/db/post_migrate/20200518133123_add_index_on_starting_ending_at_to_metrics_dashboard_annotations.rb deleted file mode 100644 index 3094fff0d1d..00000000000 --- a/db/post_migrate/20200518133123_add_index_on_starting_ending_at_to_metrics_dashboard_annotations.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnStartingEndingAtToMetricsDashboardAnnotations < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_metrics_dashboard_annotations_on_timespan_end' - - disable_ddl_transaction! - - def up - add_concurrent_index :metrics_dashboard_annotations, 'COALESCE(ending_at, starting_at)', name: INDEX_NAME - end - - def down - remove_concurrent_index :metrics_dashboard_annotations, 'COALESCE(ending_at, starting_at)', name: INDEX_NAME - end -end diff --git a/db/post_migrate/20200519171058_update_index_ci_builds_on_commit_id_and_artifacts_expireatandidpartial.rb b/db/post_migrate/20200519171058_update_index_ci_builds_on_commit_id_and_artifacts_expireatandidpartial.rb deleted file mode 100644 index e09ad4bdadf..00000000000 --- a/db/post_migrate/20200519171058_update_index_ci_builds_on_commit_id_and_artifacts_expireatandidpartial.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class UpdateIndexCiBuildsOnCommitIdAndArtifactsExpireatandidpartial < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - OLD_INDEX_NAME = 'index_ci_builds_on_commit_id_and_artifacts_expireatandidpartial' - NEW_INDEX_NAME = 'index_ci_builds_on_commit_id_artifacts_expired_at_and_id' - - OLD_CLAUSE = "type::text = 'Ci::Build'::text AND (retried = false OR retried IS NULL) AND - (name::text = ANY (ARRAY['sast'::character varying, - 'dependency_scanning'::character varying, - 'sast:container'::character varying, - 'container_scanning'::character varying, - 'dast'::character varying]::text[]))" - - NEW_CLAUSE = "type::text = 'Ci::Build'::text AND (retried = false OR retried IS NULL) AND - (name::text = ANY (ARRAY['sast'::character varying, - 'secret_detection'::character varying, - 'dependency_scanning'::character varying, - 'container_scanning'::character varying, - 'dast'::character varying]::text[]))" - - def up - add_concurrent_index :ci_builds, [:commit_id, :artifacts_expire_at, :id], name: NEW_INDEX_NAME, where: NEW_CLAUSE - remove_concurrent_index_by_name :ci_builds, OLD_INDEX_NAME - end - - def down - add_concurrent_index :ci_builds, [:commit_id, :artifacts_expire_at, :id], name: OLD_INDEX_NAME, where: OLD_CLAUSE - remove_concurrent_index_by_name :ci_builds, NEW_INDEX_NAME - end -end diff --git a/db/post_migrate/20200519201128_migrate_vulnerability_dismissal_feedback.rb b/db/post_migrate/20200519201128_migrate_vulnerability_dismissal_feedback.rb deleted file mode 100644 index fee2f59abb5..00000000000 --- a/db/post_migrate/20200519201128_migrate_vulnerability_dismissal_feedback.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -class MigrateVulnerabilityDismissalFeedback < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - MIGRATION = 'UpdateVulnerabilitiesFromDismissalFeedback' - BATCH_SIZE = 500 - DELAY_INTERVAL = 2.minutes.to_i - - class Vulnerability < ActiveRecord::Base - self.table_name = 'vulnerabilities' - self.inheritance_column = :_type_disabled - - include ::EachBatch - end - - def up - return unless Gitlab.ee? - - Vulnerability.select('project_id').group(:project_id).each_batch(of: BATCH_SIZE, column: "project_id") do |project_batch, index| - batch_delay = (index - 1) * BATCH_SIZE * DELAY_INTERVAL - - project_batch.each_with_index do |project, project_batch_index| - project_delay = project_batch_index * DELAY_INTERVAL - migrate_in(batch_delay + project_delay, MIGRATION, project[:project_id]) - end - end - end - - def down - # nothing to do - end -end diff --git a/db/post_migrate/20200525121014_drop_users_ghost_column.rb b/db/post_migrate/20200525121014_drop_users_ghost_column.rb deleted file mode 100644 index 1f80bc74b9d..00000000000 --- a/db/post_migrate/20200525121014_drop_users_ghost_column.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class DropUsersGhostColumn < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :users, 'index_users_on_ghost' - - with_lock_retries do - remove_column :users, :ghost - end - end - - def down - unless column_exists?(:users, :ghost) - with_lock_retries do - add_column :users, :ghost, :boolean # rubocop:disable Migration/AddColumnsToWideTables - end - end - - execute 'UPDATE users set ghost = TRUE WHERE user_type = 5' - - add_concurrent_index :users, :ghost - end -end diff --git a/db/post_migrate/20200525144525_migrate_stuck_import_jobs_queue_to_stuck_project_import_jobs.rb b/db/post_migrate/20200525144525_migrate_stuck_import_jobs_queue_to_stuck_project_import_jobs.rb deleted file mode 100644 index 57e25c928f1..00000000000 --- a/db/post_migrate/20200525144525_migrate_stuck_import_jobs_queue_to_stuck_project_import_jobs.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class MigrateStuckImportJobsQueueToStuckProjectImportJobs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - sidekiq_queue_migrate 'cronjob:stuck_import_jobs', to: 'cronjob:import_stuck_project_import_jobs' - end - - def down - sidekiq_queue_migrate 'cronjob:import_stuck_project_import_jobs', to: 'cronjob:stuck_import_jobs' - end -end diff --git a/db/post_migrate/20200526000407_seed_repository_storages_weighted.rb b/db/post_migrate/20200526000407_seed_repository_storages_weighted.rb deleted file mode 100644 index 979f16e75ed..00000000000 --- a/db/post_migrate/20200526000407_seed_repository_storages_weighted.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class SeedRepositoryStoragesWeighted < ActiveRecord::Migration[6.0] - DOWNTIME = false - - class ApplicationSetting < ActiveRecord::Base - serialize :repository_storages - self.table_name = 'application_settings' - end - - def up - # We need to flush the cache to ensure the newly-added column is loaded - ApplicationSetting.reset_column_information - - # There should only be one row here due to - # 20200420162730_remove_additional_application_settings_rows.rb - ApplicationSetting.all.each do |settings| - storages = Gitlab.config.repositories.storages.keys.collect do |storage| - weight = settings.repository_storages.include?(storage) ? 100 : 0 - [storage.to_sym, weight] - end - - settings.repository_storages_weighted = Hash[storages] - settings.save! - end - end - - def down - end -end diff --git a/db/post_migrate/20200526115436_dedup_mr_metrics.rb b/db/post_migrate/20200526115436_dedup_mr_metrics.rb deleted file mode 100644 index d2660504939..00000000000 --- a/db/post_migrate/20200526115436_dedup_mr_metrics.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -class DedupMrMetrics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - TMP_INDEX_NAME = 'tmp_unique_merge_request_metrics_by_merge_request_id' - INDEX_NAME = 'unique_merge_request_metrics_by_merge_request_id' - - disable_ddl_transaction! - - class MergeRequestMetrics < ActiveRecord::Base - self.table_name = 'merge_request_metrics' - - include EachBatch - end - - def up - last_metrics_record_id = MergeRequestMetrics.maximum(:id) || 0 - - # This index will disallow further duplicates while we're deduplicating the data. - add_concurrent_index(:merge_request_metrics, :merge_request_id, where: "id > #{Integer(last_metrics_record_id)}", unique: true, name: TMP_INDEX_NAME) - - MergeRequestMetrics.each_batch do |relation| - duplicated_merge_request_ids = MergeRequestMetrics - .where(merge_request_id: relation.select(:merge_request_id)) - .select(:merge_request_id) - .group(:merge_request_id) - .having('COUNT(merge_request_metrics.merge_request_id) > 1') - .pluck(:merge_request_id) - - duplicated_merge_request_ids.each do |merge_request_id| - deduplicate_item(merge_request_id) - end - end - - add_concurrent_index(:merge_request_metrics, :merge_request_id, unique: true, name: INDEX_NAME) - remove_concurrent_index_by_name(:merge_request_metrics, TMP_INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(:merge_request_metrics, TMP_INDEX_NAME) - remove_concurrent_index_by_name(:merge_request_metrics, INDEX_NAME) - end - - private - - def deduplicate_item(merge_request_id) - merge_request_metrics_records = MergeRequestMetrics.where(merge_request_id: merge_request_id).order(updated_at: :asc).to_a - - attributes = {} - merge_request_metrics_records.each do |merge_request_metrics_record| - params = merge_request_metrics_record.attributes.except('id') - attributes.merge!(params.compact) - end - - ActiveRecord::Base.transaction do - record_to_keep = merge_request_metrics_records.pop - records_to_delete = merge_request_metrics_records - - MergeRequestMetrics.where(id: records_to_delete.map(&:id)).delete_all - record_to_keep.update!(attributes) - end - end -end diff --git a/db/post_migrate/20200527094322_drop_vulnerability_confidence_index.rb b/db/post_migrate/20200527094322_drop_vulnerability_confidence_index.rb deleted file mode 100644 index e9a9dd5eff8..00000000000 --- a/db/post_migrate/20200527094322_drop_vulnerability_confidence_index.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class DropVulnerabilityConfidenceIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - INDEX_NAME = 'index_vulnerability_on_id_and_confidence_eq_zero' - - def up - Gitlab::BackgroundMigration.steal('RemoveUndefinedVulnerabilityConfidenceLevel') - - remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME - end - - def down - add_concurrent_index(:vulnerabilities, :id, where: 'confidence = 0', name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20200527095401_drop_vulnerability_occurrence_confidence_index.rb b/db/post_migrate/20200527095401_drop_vulnerability_occurrence_confidence_index.rb deleted file mode 100644 index 99fe4da7686..00000000000 --- a/db/post_migrate/20200527095401_drop_vulnerability_occurrence_confidence_index.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class DropVulnerabilityOccurrenceConfidenceIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - INDEX_NAME = 'index_vulnerability_occurrences_on_id_and_confidence_eq_zero' - - def up - Gitlab::BackgroundMigration.steal('RemoveUndefinedOccurrenceConfidenceLevel') - - remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME - end - - def down - add_concurrent_index(:vulnerability_occurrences, :id, where: 'confidence = 0', name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20200528123703_add_merge_request_partial_index_to_events.rb b/db/post_migrate/20200528123703_add_merge_request_partial_index_to_events.rb deleted file mode 100644 index bf2269e77ab..00000000000 --- a/db/post_migrate/20200528123703_add_merge_request_partial_index_to_events.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddMergeRequestPartialIndexToEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'index_events_on_author_id_and_created_at_merge_requests' - - def up - add_concurrent_index( - :events, - [:author_id, :created_at], - name: INDEX_NAME, - where: "(target_type = 'MergeRequest')" - ) - end - - def down - remove_concurrent_index :events, INDEX_NAME - end -end diff --git a/db/post_migrate/20200601120434_migrate_all_merge_request_user_mentions_to_db.rb b/db/post_migrate/20200601120434_migrate_all_merge_request_user_mentions_to_db.rb deleted file mode 100644 index fc7b9afe5f9..00000000000 --- a/db/post_migrate/20200601120434_migrate_all_merge_request_user_mentions_to_db.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class MigrateAllMergeRequestUserMentionsToDb < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - DELAY = 2.minutes.to_i - BATCH_SIZE = 100_000 - MIGRATION = 'UserMentions::CreateResourceUserMention' - - JOIN = "LEFT JOIN merge_request_user_mentions on merge_requests.id = merge_request_user_mentions.merge_request_id" - QUERY_CONDITIONS = "(description LIKE '%@%' OR title LIKE '%@%') AND merge_request_user_mentions.merge_request_id IS NULL" - - disable_ddl_transaction! - - class MergeRequest < ActiveRecord::Base - include EachBatch - end - - def up - delay = DELAY - - MergeRequest.each_batch(of: BATCH_SIZE) do |batch, _| - range = batch.pluck('MIN(merge_requests.id)', 'MAX(merge_requests.id)').first - records_count = MergeRequest.joins(JOIN).where(QUERY_CONDITIONS).where(id: range.first..range.last).count - - if records_count > 0 - migrate_in(delay, MIGRATION, ['MergeRequest', JOIN, QUERY_CONDITIONS, false, *range]) - delay += [DELAY, (records_count / 500 + 1).minutes.to_i].max - end - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200602013900_add_limit_to_designs_filename.rb b/db/post_migrate/20200602013900_add_limit_to_designs_filename.rb deleted file mode 100644 index 88732648965..00000000000 --- a/db/post_migrate/20200602013900_add_limit_to_designs_filename.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddLimitToDesignsFilename < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit(:design_management_designs, :filename, 255, validate: false) - end - - def down - remove_text_limit(:design_management_designs, :filename) - end -end diff --git a/db/post_migrate/20200602013901_cap_designs_filename_length_to_new_limit.rb b/db/post_migrate/20200602013901_cap_designs_filename_length_to_new_limit.rb deleted file mode 100644 index 0458481c6bd..00000000000 --- a/db/post_migrate/20200602013901_cap_designs_filename_length_to_new_limit.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class CapDesignsFilenameLengthToNewLimit < ActiveRecord::Migration[6.0] - DOWNTIME = false - - CHAR_LENGTH = 255 - MODIFIED_NAME = 'gitlab-modified-' - MODIFIED_EXTENSION = '.jpg' - - def up - arel_table = Arel::Table.new(:design_management_designs) - - # Design filenames larger than the limit will be renamed to "gitlab-modified-{id}.jpg", - # which will be valid and unique. The design file itself will appear broken, as it is - # understood that no designs with filenames that exceed this limit will be legitimate. - # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33565/diffs#note_355789080 - new_value_clause = Arel::Nodes::NamedFunction.new( - 'CONCAT', - [ - Arel::Nodes.build_quoted(MODIFIED_NAME), - arel_table[:id], - Arel::Nodes.build_quoted(MODIFIED_EXTENSION) - ] - ) - where_clause = Arel::Nodes::NamedFunction.new( - 'CHAR_LENGTH', - [arel_table[:filename]] - ).gt(CHAR_LENGTH) - - update_arel = Arel::UpdateManager.new.table(arel_table) - .set([[arel_table[:filename], new_value_clause]]) - .where(where_clause) - - ActiveRecord::Base.connection.execute(update_arel.to_sql) - end - - def down - # no-op : the original filename is lost forever - end -end diff --git a/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb b/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb deleted file mode 100644 index 2b036a8da80..00000000000 --- a/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb +++ /dev/null @@ -1,188 +0,0 @@ -# frozen_string_literal: true - -# This migration adds or updates the routes for all the entities affected by -# post-migration '20200511083541_cleanup_projects_with_missing_namespace' -# - A route is added for the 'lost-and-found' group -# - A route is added for the Ghost user (if not already defined) -# - The routes for all the orphaned projects that were moved under the 'lost-and-found' -# group are updated to reflect the new path -class UpdateRoutesForLostAndFoundGroupAndOrphanedProjects < ActiveRecord::Migration[6.0] - DOWNTIME = false - - class User < ActiveRecord::Base - self.table_name = 'users' - - LOST_AND_FOUND_GROUP = 'lost-and-found' - USER_TYPE_GHOST = 5 - ACCESS_LEVEL_OWNER = 50 - - has_one :namespace, -> { where(type: nil) }, - foreign_key: :owner_id, inverse_of: :owner, autosave: true, - class_name: 'UpdateRoutesForLostAndFoundGroupAndOrphanedProjects::Namespace' - - def lost_and_found_group - # Find the 'lost-and-found' group - # There should only be one Group owned by the Ghost user starting with 'lost-and-found' - Group - .joins('INNER JOIN members ON namespaces.id = members.source_id') - .where(namespaces: { type: 'Group' }) - .where(members: { type: 'GroupMember' }) - .where(members: { source_type: 'Namespace' }) - .where(members: { user_id: self.id }) - .where(members: { access_level: ACCESS_LEVEL_OWNER }) - .find_by(Group.arel_table[:name].matches("#{LOST_AND_FOUND_GROUP}%")) - end - - class << self - # Return the ghost user - def ghost - User.find_by(user_type: USER_TYPE_GHOST) - end - end - end - - # Temporary Concern to not repeat the same methods twice - module HasPath - extend ActiveSupport::Concern - - def full_path - if parent && path - parent.full_path + '/' + path - else - path - end - end - - def full_name - if parent && name - parent.full_name + ' / ' + name - else - name - end - end - end - - class Namespace < ActiveRecord::Base - include HasPath - - self.table_name = 'namespaces' - - belongs_to :owner, class_name: 'UpdateRoutesForLostAndFoundGroupAndOrphanedProjects::User' - belongs_to :parent, class_name: "UpdateRoutesForLostAndFoundGroupAndOrphanedProjects::Namespace" - has_many :children, foreign_key: :parent_id, - class_name: "UpdateRoutesForLostAndFoundGroupAndOrphanedProjects::Namespace" - has_many :projects, class_name: "UpdateRoutesForLostAndFoundGroupAndOrphanedProjects::Project" - - def ensure_route! - unless Route.for_source('Namespace', self.id) - Route.create!( - source_id: self.id, - source_type: 'Namespace', - path: self.full_path, - name: self.full_name - ) - end - end - - def generate_unique_path - # Generate a unique path if there is no route for the namespace - # (an existing route guarantees that the path is already unique) - unless Route.for_source('Namespace', self.id) - self.path = Uniquify.new.string(self.path) do |str| - Route.where(path: str).exists? - end - end - end - end - - class Group < Namespace - # Disable STI to allow us to manually set "type = 'Group'" - # Otherwise rails forces "type = CleanupProjectsWithMissingNamespace::Group" - self.inheritance_column = :_type_disabled - end - - class Route < ActiveRecord::Base - self.table_name = 'routes' - - def self.for_source(source_type, source_id) - Route.find_by(source_type: source_type, source_id: source_id) - end - end - - class Project < ActiveRecord::Base - include HasPath - - self.table_name = 'projects' - - belongs_to :group, -> { where(type: 'Group') }, foreign_key: 'namespace_id', - class_name: "UpdateRoutesForLostAndFoundGroupAndOrphanedProjects::Group" - belongs_to :namespace, - class_name: "UpdateRoutesForLostAndFoundGroupAndOrphanedProjects::Namespace" - - alias_method :parent, :namespace - alias_attribute :parent_id, :namespace_id - - def ensure_route! - Route.find_or_initialize_by(source_type: 'Project', source_id: self.id).tap do |record| - record.path = self.full_path - record.name = self.full_name - record.save! - end - end - end - - def up - # Reset the column information of all the models that update the database - # to ensure the Active Record's knowledge of the table structure is current - Namespace.reset_column_information - Route.reset_column_information - User.reset_column_information - - # Find the ghost user, its namespace and the "lost and found" group - ghost_user = User.ghost - return unless ghost_user # No reason to continue if there is no Ghost user - - ghost_namespace = ghost_user.namespace - lost_and_found_group = ghost_user.lost_and_found_group - - # No reason to continue if there is no 'lost-and-found' group - # 1. No orphaned projects were found in this instance, or - # 2. The 'lost-and-found' group and the orphaned projects have been already deleted - return unless lost_and_found_group - - # Update the 'lost-and-found' group description to be more self-explanatory - lost_and_found_group.generate_unique_path - lost_and_found_group.description = - 'Group for storing projects that were not properly deleted. '\ - 'It should be considered as a system level Group with non-working '\ - 'projects inside it. The contents may be deleted with a future update. '\ - 'More info: gitlab.com/gitlab-org/gitlab/-/issues/198603' - lost_and_found_group.save! - - # make sure that the ghost namespace has a unique path - ghost_namespace.generate_unique_path - - if ghost_namespace.path_changed? - ghost_namespace.save! - # If the path changed, also update the Ghost User's username to match the new path. - ghost_user.update!(username: ghost_namespace.path) - end - - # Update the routes for the Ghost user, the "lost and found" group - # and all the orphaned projects - ghost_namespace.ensure_route! - lost_and_found_group.ensure_route! - - # The following does a fast index scan by namespace_id - # No reason to process in batches: - # - 66 projects in GitLab.com, less than 1ms execution time to fetch them - # with a constant update time for each - lost_and_found_group.projects.each do |project| - project.ensure_route! - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200608072931_backfill_imported_snippet_repositories.rb b/db/post_migrate/20200608072931_backfill_imported_snippet_repositories.rb deleted file mode 100644 index 0566524fa90..00000000000 --- a/db/post_migrate/20200608072931_backfill_imported_snippet_repositories.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -class BackfillImportedSnippetRepositories < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - DELAY_INTERVAL = 2.minutes.to_i - BATCH_SIZE = 200 - MIGRATION = 'BackfillSnippetRepositories' - - disable_ddl_transaction! - - class Snippet < ActiveRecord::Base - include EachBatch - - self.table_name = 'snippets' - self.inheritance_column = :_type_disabled - end - - class SnippetRepository < ActiveRecord::Base - self.table_name = 'snippet_repositories' - end - - def up - index = 1 - - Snippet.select(:id).where.not(id: SnippetRepository.select(:snippet_id)).each_batch(of: BATCH_SIZE, column: 'id') do |batch| - split_in_consecutive_batches(batch).each do |ids_batch| - migrate_in(index * DELAY_INTERVAL, MIGRATION, [ids_batch.first, ids_batch.last]) - - index += 1 - end - end - end - - def down - # no-op - end - - private - - def split_in_consecutive_batches(relation) - ids = relation.pluck(:id) - - (ids.first..ids.last).to_a.split {|i| !ids.include?(i) }.select(&:present?) - end -end diff --git a/db/post_migrate/20200608075553_add_index_on_user_id_and_created_at_and_source_to_ci_pipelines.rb b/db/post_migrate/20200608075553_add_index_on_user_id_and_created_at_and_source_to_ci_pipelines.rb deleted file mode 100644 index 5df9cacdff6..00000000000 --- a/db/post_migrate/20200608075553_add_index_on_user_id_and_created_at_and_source_to_ci_pipelines.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnUserIdAndCreatedAtAndSourceToCiPipelines < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_pipelines, [:user_id, :created_at, :source] - remove_concurrent_index :ci_pipelines, [:user_id, :created_at] - end - - def down - add_concurrent_index :ci_pipelines, [:user_id, :created_at] - remove_concurrent_index :ci_pipelines, [:user_id, :created_at, :source] - end -end diff --git a/db/post_migrate/20200608195222_set_lock_version_not_null_constraint.rb b/db/post_migrate/20200608195222_set_lock_version_not_null_constraint.rb deleted file mode 100644 index ec72053b307..00000000000 --- a/db/post_migrate/20200608195222_set_lock_version_not_null_constraint.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class SetLockVersionNotNullConstraint < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - TABLES = %i(epics merge_requests issues ci_stages ci_builds ci_pipelines).freeze - - def up - TABLES.each do |table| - add_not_null_constraint table, :lock_version, validate: false - end - end - - def down - TABLES.each do |table| - remove_not_null_constraint table, :lock_version - end - end -end diff --git a/db/post_migrate/20200608203426_set_proper_lock_version_indices.rb b/db/post_migrate/20200608203426_set_proper_lock_version_indices.rb deleted file mode 100644 index 924ca73e6cc..00000000000 --- a/db/post_migrate/20200608203426_set_proper_lock_version_indices.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class SetProperLockVersionIndices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index :epics, :lock_version, where: "lock_version IS NULL" - remove_concurrent_index :merge_requests, :lock_version, where: "lock_version IS NULL" - remove_concurrent_index :issues, :lock_version, where: "lock_version IS NULL" - - add_concurrent_index :epics, :id, where: "lock_version IS NULL", name: 'index_epics_on_id' - add_concurrent_index :merge_requests, :id, where: "lock_version IS NULL", name: 'index_merge_requests_on_id' - add_concurrent_index :issues, :id, where: "lock_version IS NULL", name: 'index_issues_on_id' - end - - def down - add_concurrent_index :epics, :lock_version, where: "lock_version IS NULL" - add_concurrent_index :merge_requests, :lock_version, where: "lock_version IS NULL" - add_concurrent_index :issues, :lock_version, where: "lock_version IS NULL" - - remove_concurrent_index_by_name :epics, name: 'index_epics_on_id' - remove_concurrent_index_by_name :merge_requests, name: 'index_merge_requests_on_id' - remove_concurrent_index_by_name :issues, name: 'index_issues_on_id' - end -end diff --git a/db/post_migrate/20200608205813_set_lock_version_to_not_null.rb b/db/post_migrate/20200608205813_set_lock_version_to_not_null.rb deleted file mode 100644 index 69f43a8decf..00000000000 --- a/db/post_migrate/20200608205813_set_lock_version_to_not_null.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class SetLockVersionToNotNull < ActiveRecord::Migration[6.0] - DOWNTIME = false - - TABLES = %w(epics merge_requests issues ci_stages ci_builds ci_pipelines).freeze - BATCH_SIZE = 10_000 - - disable_ddl_transaction! - - def declare_class(table) - Class.new(ActiveRecord::Base) do - include EachBatch - - self.table_name = table - self.inheritance_column = :_type_disabled # Disable STI - end - end - - def up - TABLES.each do |table| - declare_class(table).where(lock_version: nil).each_batch(of: BATCH_SIZE) do |batch| - batch.update_all(lock_version: 0) - end - end - end - - def down - # Nothing to do... - end -end diff --git a/db/post_migrate/20200608212030_lock_version_cleanup_for_epics.rb b/db/post_migrate/20200608212030_lock_version_cleanup_for_epics.rb deleted file mode 100644 index aafa6a83200..00000000000 --- a/db/post_migrate/20200608212030_lock_version_cleanup_for_epics.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class LockVersionCleanupForEpics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_not_null_constraint :epics, :lock_version - remove_concurrent_index_by_name :epics, name: 'index_epics_on_id' - end - - def down - add_concurrent_index :epics, :id, where: "lock_version IS NULL", name: 'index_epics_on_id' - end -end diff --git a/db/post_migrate/20200608212435_lock_version_cleanup_for_merge_requests.rb b/db/post_migrate/20200608212435_lock_version_cleanup_for_merge_requests.rb deleted file mode 100644 index cb8ab86b6a3..00000000000 --- a/db/post_migrate/20200608212435_lock_version_cleanup_for_merge_requests.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class LockVersionCleanupForMergeRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_not_null_constraint :merge_requests, :lock_version - remove_concurrent_index_by_name :merge_requests, name: 'index_merge_requests_on_id' - end - - def down - add_concurrent_index :merge_requests, :id, where: "lock_version IS NULL", name: 'index_merge_requests_on_id' - end -end diff --git a/db/post_migrate/20200608212549_lock_version_cleanup_for_issues.rb b/db/post_migrate/20200608212549_lock_version_cleanup_for_issues.rb deleted file mode 100644 index ad3fea8b131..00000000000 --- a/db/post_migrate/20200608212549_lock_version_cleanup_for_issues.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class LockVersionCleanupForIssues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_not_null_constraint :issues, :lock_version - remove_concurrent_index_by_name :issues, name: 'index_issues_on_id' - end - - def down - add_concurrent_index :issues, :id, where: "lock_version IS NULL", name: 'index_issues_on_id' - end -end diff --git a/db/post_migrate/20200608212652_lock_version_cleanup_for_ci_stages.rb b/db/post_migrate/20200608212652_lock_version_cleanup_for_ci_stages.rb deleted file mode 100644 index 12e2897123e..00000000000 --- a/db/post_migrate/20200608212652_lock_version_cleanup_for_ci_stages.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class LockVersionCleanupForCiStages < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_not_null_constraint :ci_stages, :lock_version - remove_concurrent_index :ci_stages, :id, where: "lock_version IS NULL", name: "tmp_index_ci_stages_lock_version" - end - - def down - add_concurrent_index :ci_stages, :id, where: "lock_version IS NULL", name: "tmp_index_ci_stages_lock_version" - end -end diff --git a/db/post_migrate/20200608212807_lock_version_cleanup_for_ci_builds.rb b/db/post_migrate/20200608212807_lock_version_cleanup_for_ci_builds.rb deleted file mode 100644 index 0512869971b..00000000000 --- a/db/post_migrate/20200608212807_lock_version_cleanup_for_ci_builds.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class LockVersionCleanupForCiBuilds < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_not_null_constraint :ci_builds, :lock_version - remove_concurrent_index :ci_builds, :id, where: "lock_version IS NULL", name: "tmp_index_ci_builds_lock_version" - end - - def down - add_concurrent_index :ci_builds, :id, where: "lock_version IS NULL", name: "tmp_index_ci_builds_lock_version" - end -end diff --git a/db/post_migrate/20200608212824_lock_version_cleanup_for_ci_pipelines.rb b/db/post_migrate/20200608212824_lock_version_cleanup_for_ci_pipelines.rb deleted file mode 100644 index 228dd72da8d..00000000000 --- a/db/post_migrate/20200608212824_lock_version_cleanup_for_ci_pipelines.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class LockVersionCleanupForCiPipelines < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_not_null_constraint :ci_pipelines, :lock_version - remove_concurrent_index :ci_pipelines, :id, where: "lock_version IS NULL", name: "tmp_index_ci_pipelines_lock_version" - end - - def down - add_concurrent_index :ci_pipelines, :id, where: "lock_version IS NULL", name: "tmp_index_ci_pipelines_lock_version" - end -end diff --git a/db/post_migrate/20200609002841_add_partial_index_on_locked_state_id_to_merge_requests.rb b/db/post_migrate/20200609002841_add_partial_index_on_locked_state_id_to_merge_requests.rb deleted file mode 100644 index 7602ad00796..00000000000 --- a/db/post_migrate/20200609002841_add_partial_index_on_locked_state_id_to_merge_requests.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexOnLockedStateIdToMergeRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = "idx_merge_requests_on_target_project_id_and_locked_state" - LOCKED_STATE_ID = 4 - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_requests, :target_project_id, where: "(state_id = #{LOCKED_STATE_ID})", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :merge_requests, INDEX_NAME - end -end diff --git a/db/post_migrate/20200615111857_unconfirm_wrongfully_verified_emails.rb b/db/post_migrate/20200615111857_unconfirm_wrongfully_verified_emails.rb deleted file mode 100644 index 62fdfc783bc..00000000000 --- a/db/post_migrate/20200615111857_unconfirm_wrongfully_verified_emails.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class UnconfirmWrongfullyVerifiedEmails < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INTERVAL = 5.minutes.to_i - BATCH_SIZE = 500 - MIGRATION = 'WrongfullyConfirmedEmailUnconfirmer' - EMAIL_INDEX_NAME = 'tmp_index_for_email_unconfirmation_migration' - - class ApplicationSetting < ActiveRecord::Base - self.table_name = 'application_settings' - end - - class Email < ActiveRecord::Base - include EachBatch - end - - def up - add_concurrent_index :emails, :id, where: 'confirmed_at IS NOT NULL', name: EMAIL_INDEX_NAME - - ApplicationSetting.reset_column_information - - setting_record = ApplicationSetting.last - return unless setting_record&.send_user_confirmation_email - - queue_background_migration_jobs_by_range_at_intervals(Email, - MIGRATION, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - remove_concurrent_index_by_name(:emails, EMAIL_INDEX_NAME) - end -end diff --git a/db/post_migrate/20200617001637_validate_file_store_not_null_constraint_on_lfs_objects.rb b/db/post_migrate/20200617001637_validate_file_store_not_null_constraint_on_lfs_objects.rb deleted file mode 100644 index 27a30b1d696..00000000000 --- a/db/post_migrate/20200617001637_validate_file_store_not_null_constraint_on_lfs_objects.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class ValidateFileStoreNotNullConstraintOnLfsObjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_check_constraint(:lfs_objects, :check_eecfc5717d) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200617001848_validate_store_not_null_constraint_uploads.rb b/db/post_migrate/20200617001848_validate_store_not_null_constraint_uploads.rb deleted file mode 100644 index 83cb6cb3e85..00000000000 --- a/db/post_migrate/20200617001848_validate_store_not_null_constraint_uploads.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class ValidateStoreNotNullConstraintUploads < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_check_constraint(:uploads, :check_5e9547379c) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200617002030_validate_file_store_not_null_constraint_on_ci_job_artifacts.rb b/db/post_migrate/20200617002030_validate_file_store_not_null_constraint_on_ci_job_artifacts.rb deleted file mode 100644 index 8e766a508b7..00000000000 --- a/db/post_migrate/20200617002030_validate_file_store_not_null_constraint_on_ci_job_artifacts.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class ValidateFileStoreNotNullConstraintOnCiJobArtifacts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_check_constraint(:ci_job_artifacts, :check_27f0f6dbab) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200618152212_update_secure_smau_index.rb b/db/post_migrate/20200618152212_update_secure_smau_index.rb deleted file mode 100644 index ba989c279be..00000000000 --- a/db/post_migrate/20200618152212_update_secure_smau_index.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class UpdateSecureSmauIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_secure_ci_builds_on_user_id_created_at' - - disable_ddl_transaction! - - def up - add_concurrent_index( - :ci_builds, - [:user_id, :created_at], - where: "(((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text])))", - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index_by_name :ci_builds, INDEX_NAME - end -end diff --git a/db/post_migrate/20200623142159_remove_gitlab_issue_tracker_service_records.rb b/db/post_migrate/20200623142159_remove_gitlab_issue_tracker_service_records.rb deleted file mode 100644 index 743499e7b76..00000000000 --- a/db/post_migrate/20200623142159_remove_gitlab_issue_tracker_service_records.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class RemoveGitlabIssueTrackerServiceRecords < ActiveRecord::Migration[6.0] - DOWNTIME = false - BATCH_SIZE = 5000 - - disable_ddl_transaction! - - class Service < ActiveRecord::Base - include EachBatch - - self.table_name = 'services' - - def self.gitlab_issue_tracker_service - where(type: 'GitlabIssueTrackerService') - end - end - - def up - Service.each_batch(of: BATCH_SIZE) do |services| - services.gitlab_issue_tracker_service.delete_all - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200626060151_add_disable_overriding_approvers_per_merge_request_indices.rb b/db/post_migrate/20200626060151_add_disable_overriding_approvers_per_merge_request_indices.rb deleted file mode 100644 index 6f2db4035e2..00000000000 --- a/db/post_migrate/20200626060151_add_disable_overriding_approvers_per_merge_request_indices.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class AddDisableOverridingApproversPerMergeRequestIndices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - DISABLE_OVERRIDING_APPROVERS_TRUE_INDEX_NAME = "idx_projects_id_created_at_disable_overriding_approvers_true" - DISABLE_OVERRIDING_APPROVERS_FALSE_INDEX_NAME = "idx_projects_id_created_at_disable_overriding_approvers_false" - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, [:id, :created_at], - where: "disable_overriding_approvers_per_merge_request = TRUE", - name: DISABLE_OVERRIDING_APPROVERS_TRUE_INDEX_NAME - - add_concurrent_index :projects, [:id, :created_at], - where: "(disable_overriding_approvers_per_merge_request = FALSE) OR (disable_overriding_approvers_per_merge_request IS NULL)", - name: DISABLE_OVERRIDING_APPROVERS_FALSE_INDEX_NAME - end - - def down - remove_concurrent_index_by_name :projects, DISABLE_OVERRIDING_APPROVERS_TRUE_INDEX_NAME - remove_concurrent_index_by_name :projects, DISABLE_OVERRIDING_APPROVERS_FALSE_INDEX_NAME - end -end diff --git a/db/post_migrate/20200701070435_add_default_value_stream_to_groups_with_group_stages.rb b/db/post_migrate/20200701070435_add_default_value_stream_to_groups_with_group_stages.rb deleted file mode 100644 index 971eb3c489f..00000000000 --- a/db/post_migrate/20200701070435_add_default_value_stream_to_groups_with_group_stages.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultValueStreamToGroupsWithGroupStages < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - class Group < ActiveRecord::Base - def self.find_sti_class(typename) - if typename == 'Group' - Group - else - super - end - end - self.table_name = 'namespaces' - has_many :group_value_streams - has_many :group_stages - end - - class GroupValueStream < ActiveRecord::Base - self.table_name = 'analytics_cycle_analytics_group_value_streams' - has_many :group_stages - belongs_to :group - end - - class GroupStage < ActiveRecord::Base - self.table_name = 'analytics_cycle_analytics_group_stages' - belongs_to :group_value_stream - end - - def up - Group.where(type: 'Group').joins(:group_stages).distinct.find_each do |group| - Group.transaction do - group_value_stream = group.group_value_streams.first_or_create!(name: 'default') - group.group_stages.update_all(group_value_stream_id: group_value_stream.id) - end - end - - change_column_null :analytics_cycle_analytics_group_stages, :group_value_stream_id, false - end - - def down - change_column_null :analytics_cycle_analytics_group_stages, :group_value_stream_id, true - - GroupValueStream.where(name: 'default').includes(:group_stages).find_each do |value_stream| - GroupValueStream.transaction do - value_stream.group_stages.update_all(group_value_stream_id: nil) - value_stream.destroy! - end - end - end -end diff --git a/db/post_migrate/20200701091253_validate_foreign_key_on_cycle_analytics_group_stages.rb b/db/post_migrate/20200701091253_validate_foreign_key_on_cycle_analytics_group_stages.rb deleted file mode 100644 index 0a8926ed6de..00000000000 --- a/db/post_migrate/20200701091253_validate_foreign_key_on_cycle_analytics_group_stages.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class ValidateForeignKeyOnCycleAnalyticsGroupStages < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - # same as in db/migrate/20200701064756_add_not_valid_foreign_key_to_cycle_analytics_group_stages.rb - CONSTRAINT_NAME = 'fk_analytics_cycle_analytics_group_stages_group_value_stream_id' - - def up - validate_foreign_key :analytics_cycle_analytics_group_stages, :group_value_stream_id, name: CONSTRAINT_NAME - end - - def down - remove_foreign_key_if_exists :analytics_cycle_analytics_group_stages, column: :group_value_stream_id, name: CONSTRAINT_NAME - add_foreign_key :analytics_cycle_analytics_group_stages, :analytics_cycle_analytics_group_value_streams, - column: :group_value_stream_id, name: CONSTRAINT_NAME, on_delete: :cascade, validate: false - end -end diff --git a/db/post_migrate/20200703064117_generate_missing_routes_for_bots.rb b/db/post_migrate/20200703064117_generate_missing_routes_for_bots.rb deleted file mode 100644 index 1d3f57d3fe6..00000000000 --- a/db/post_migrate/20200703064117_generate_missing_routes_for_bots.rb +++ /dev/null @@ -1,92 +0,0 @@ -# frozen_string_literal: true - -class GenerateMissingRoutesForBots < ActiveRecord::Migration[6.0] - DOWNTIME = false - - disable_ddl_transaction! - - class User < ActiveRecord::Base - self.table_name = 'users' - - USER_TYPES = { - human: nil, - support_bot: 1, - alert_bot: 2, - visual_review_bot: 3, - service_user: 4, - ghost: 5, - project_bot: 6, - migration_bot: 7 - }.with_indifferent_access.freeze - - BOT_USER_TYPES = %w[alert_bot project_bot support_bot visual_review_bot migration_bot].freeze - - scope :bots, -> { where(user_type: USER_TYPES.values_at(*BOT_USER_TYPES)) } - end - - class Route < ActiveRecord::Base - self.table_name = 'routes' - - validates :path, - uniqueness: { case_sensitive: false } - end - - class Namespace < ActiveRecord::Base - self.table_name = 'namespaces' - - belongs_to :owner, class_name: 'GenerateMissingRoutesForBots::User' - - scope :for_user, -> { where(type: nil) } - scope :for_bots, -> { for_user.joins(:owner).merge(GenerateMissingRoutesForBots::User.bots) } - - scope :without_routes, -> do - where( - 'NOT EXISTS ( - SELECT 1 - FROM routes - WHERE source_type = ? - AND source_id = namespaces.id - )', - self.source_type_for_route - ) - end - - def self.source_type_for_route - 'Namespace' - end - - def attributes_for_insert - { - source_type: self.class.source_type_for_route, - source_id: id, - name: name, - path: path - } - end - end - - def up - # Reset the column information of all the models that update the database - # to ensure the Active Record's knowledge of the table structure is current - Route.reset_column_information - - logger = Gitlab::BackgroundMigration::Logger.build - attributes_to_be_logged = %w(id path name) - - GenerateMissingRoutesForBots::Namespace.for_bots.without_routes.each do |namespace| - route = GenerateMissingRoutesForBots::Route.create(namespace.attributes_for_insert) - namespace_details = namespace.as_json.slice(*attributes_to_be_logged) - - if route.persisted? - logger.info namespace_details.merge(message: 'a new route was created for the namespace') - else - errors = route.errors.full_messages.join(',') - logger.info namespace_details.merge(message: 'route creation failed for the namespace', errors: errors) - end - end - end - - def down - # no op - end -end diff --git a/db/post_migrate/20200703125016_backfill_namespace_settings.rb b/db/post_migrate/20200703125016_backfill_namespace_settings.rb deleted file mode 100644 index a7335e2d2b8..00000000000 --- a/db/post_migrate/20200703125016_backfill_namespace_settings.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class BackfillNamespaceSettings < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - MIGRATION = 'BackfillNamespaceSettings' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 10_000 - - disable_ddl_transaction! - - class Namespace < ActiveRecord::Base - include EachBatch - - self.table_name = 'namespaces' - end - - def up - say "Scheduling `#{MIGRATION}` jobs" - - queue_background_migration_jobs_by_range_at_intervals(Namespace, MIGRATION, DELAY_INTERVAL, batch_size: BATCH_SIZE) - end - - def down - # NOOP - end -end diff --git a/db/post_migrate/20200703165434_drop_temporary_table_untracked_files_for_uploads_if_exists.rb b/db/post_migrate/20200703165434_drop_temporary_table_untracked_files_for_uploads_if_exists.rb deleted file mode 100644 index 1f34a05227d..00000000000 --- a/db/post_migrate/20200703165434_drop_temporary_table_untracked_files_for_uploads_if_exists.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class DropTemporaryTableUntrackedFilesForUploadsIfExists < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute 'DROP TABLE IF EXISTS untracked_files_for_uploads' - end - - def down - # no-op - this table should not exist - end -end diff --git a/db/post_migrate/20200704143633_add_index_on_user_id_and_created_at_where_source_to_ci_pipelines.rb b/db/post_migrate/20200704143633_add_index_on_user_id_and_created_at_where_source_to_ci_pipelines.rb deleted file mode 100644 index d84b2b4cad3..00000000000 --- a/db/post_migrate/20200704143633_add_index_on_user_id_and_created_at_where_source_to_ci_pipelines.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnUserIdAndCreatedAtWhereSourceToCiPipelines < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_pipelines, [:user_id, :created_at, :config_source] - end - - def down - remove_concurrent_index :ci_pipelines, [:user_id, :created_at, :config_source] - end -end diff --git a/db/post_migrate/20200704161600_add_index_on_id_and_status_and_created_at_to_deployments.rb b/db/post_migrate/20200704161600_add_index_on_id_and_status_and_created_at_to_deployments.rb deleted file mode 100644 index 3aab2fd2949..00000000000 --- a/db/post_migrate/20200704161600_add_index_on_id_and_status_and_created_at_to_deployments.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnIdAndStatusAndCreatedAtToDeployments < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :deployments, [:id, :status, :created_at] - remove_concurrent_index :deployments, [:id, :status] - end - - def down - add_concurrent_index :deployments, [:id, :status] - remove_concurrent_index :deployments, [:id, :status, :created_at] - end -end diff --git a/db/post_migrate/20200706154619_drop_ci_daily_report_results_table.rb b/db/post_migrate/20200706154619_drop_ci_daily_report_results_table.rb deleted file mode 100644 index c6ce52012d6..00000000000 --- a/db/post_migrate/20200706154619_drop_ci_daily_report_results_table.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class DropCiDailyReportResultsTable < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - drop_table :ci_daily_report_results - end - - def down - create_table :ci_daily_report_results do |t| - t.date :date, null: false - t.bigint :project_id, null: false - t.bigint :last_pipeline_id, null: false - t.float :value, null: false - t.integer :param_type, limit: 8, null: false - t.string :ref_path, null: false - t.string :title, null: false - - t.index :last_pipeline_id - t.index [:project_id, :ref_path, :param_type, :date, :title], name: 'index_daily_report_results_unique_columns', unique: true - end - end -end diff --git a/db/post_migrate/20200709101408_schedule_populate_project_snippet_statistics.rb b/db/post_migrate/20200709101408_schedule_populate_project_snippet_statistics.rb deleted file mode 100644 index 28527e67f4a..00000000000 --- a/db/post_migrate/20200709101408_schedule_populate_project_snippet_statistics.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class SchedulePopulateProjectSnippetStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - DELAY_INTERVAL = 2.minutes.to_i - BATCH_SIZE = 500 - MIGRATION = 'PopulateProjectSnippetStatistics' - - disable_ddl_transaction! - - def up - snippets = exec_query <<~SQL - SELECT snippets.id - FROM snippets - INNER JOIN projects ON projects.id = snippets.project_id - WHERE snippets.type = 'ProjectSnippet' - ORDER BY projects.namespace_id ASC, snippets.project_id ASC, snippets.id ASC - SQL - - snippets.rows.flatten.in_groups_of(BATCH_SIZE, false).each_with_index do |snippet_ids, index| - migrate_in(index * DELAY_INTERVAL, MIGRATION, [snippet_ids]) - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200710102418_delete_user_callout_alerts_moved.rb b/db/post_migrate/20200710102418_delete_user_callout_alerts_moved.rb deleted file mode 100644 index ac605ba494e..00000000000 --- a/db/post_migrate/20200710102418_delete_user_callout_alerts_moved.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class DeleteUserCalloutAlertsMoved < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - class UserCallout < ActiveRecord::Base - include EachBatch - - self.table_name = 'user_callouts' - end - - BATCH_SIZE = 1_000 - - # Inlined from Enums::UserCallout.feature_names - FEATURE_NAME_ALERTS_MOVED = 20 - - def up - UserCallout.each_batch(of: BATCH_SIZE, column: :user_id) do |callout| - callout.where(feature_name: FEATURE_NAME_ALERTS_MOVED).delete_all - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200710102846_drop_index_ruby_objects_in_details_on_audit_events.rb b/db/post_migrate/20200710102846_drop_index_ruby_objects_in_details_on_audit_events.rb deleted file mode 100644 index 6869938466a..00000000000 --- a/db/post_migrate/20200710102846_drop_index_ruby_objects_in_details_on_audit_events.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class DropIndexRubyObjectsInDetailsOnAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_audit_events_on_ruby_object_in_details' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name(:audit_events, INDEX_NAME) - end - - def down - add_concurrent_index(:audit_events, :id, where: "details ~~ '%ruby/object%'", name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20200713071042_confirm_project_bot_users.rb b/db/post_migrate/20200713071042_confirm_project_bot_users.rb deleted file mode 100644 index 0578fc42ef2..00000000000 --- a/db/post_migrate/20200713071042_confirm_project_bot_users.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class ConfirmProjectBotUsers < ActiveRecord::Migration[6.0] - DOWNTIME = false - - disable_ddl_transaction! - - class User < ApplicationRecord - self.table_name = 'users' - - include ::EachBatch - - USER_TYPE_PROJECT_BOT = 6 - - scope :project_bots, -> { where(user_type: USER_TYPE_PROJECT_BOT) } - scope :unconfirmed, -> { where(confirmed_at: nil) } - end - - def up - User.reset_column_information - - User.project_bots.unconfirmed.each_batch do |relation| - relation.update_all('confirmed_at = created_at') - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200714075739_schedule_populate_personal_snippet_statistics.rb b/db/post_migrate/20200714075739_schedule_populate_personal_snippet_statistics.rb deleted file mode 100644 index c3033da24fe..00000000000 --- a/db/post_migrate/20200714075739_schedule_populate_personal_snippet_statistics.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class SchedulePopulatePersonalSnippetStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - DELAY_INTERVAL = 2.minutes.to_i - BATCH_SIZE = 500 - MIGRATION = 'PopulatePersonalSnippetStatistics' - - disable_ddl_transaction! - - def up - snippets = exec_query <<~SQL - SELECT id - FROM snippets - WHERE type = 'PersonalSnippet' - ORDER BY author_id ASC, id ASC - SQL - - snippets.rows.flatten.in_groups_of(BATCH_SIZE, false).each_with_index do |snippet_ids, index| - migrate_in(index * DELAY_INTERVAL, MIGRATION, [snippet_ids]) - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200716234259_remove_duplicate_labels_from_group.rb b/db/post_migrate/20200716234259_remove_duplicate_labels_from_group.rb deleted file mode 100644 index 114276df875..00000000000 --- a/db/post_migrate/20200716234259_remove_duplicate_labels_from_group.rb +++ /dev/null @@ -1,135 +0,0 @@ -# frozen_string_literal: true - -class RemoveDuplicateLabelsFromGroup < ActiveRecord::Migration[6.0] - DOWNTIME = false - - CREATE = 1 - RENAME = 2 - - disable_ddl_transaction! - - class BackupLabel < ApplicationRecord - include EachBatch - - self.table_name = 'backup_labels' - end - - class Label < ApplicationRecord - self.table_name = 'labels' - end - - class Group < ApplicationRecord - include EachBatch - - self.table_name = 'namespaces' - end - - BATCH_SIZE = 10_000 - - def up - # Split to smaller chunks - # Loop rather than background job, every 10,000 - # there are ~1,800,000 groups in total (excluding personal namespaces, which can't have labels) - Group.where(type: 'Group').each_batch(of: BATCH_SIZE) do |batch| - range = batch.pluck('MIN(id)', 'MAX(id)').first - - transaction do - remove_full_duplicates(*range) - end - - transaction do - rename_partial_duplicates(*range) - end - end - end - - DOWN_BATCH_SIZE = 1000 - - def down - BackupLabel.where('project_id IS NULL AND group_id IS NOT NULL').each_batch(of: DOWN_BATCH_SIZE) do |batch| - range = batch.pluck('MIN(id)', 'MAX(id)').first - - restore_renamed_labels(*range) - restore_deleted_labels(*range) - end - end - - def remove_full_duplicates(start_id, stop_id) - # Fields that are considered duplicate: - # group_id title template description type color - - duplicate_labels = ApplicationRecord.connection.execute(<<-SQL.squish) -WITH data AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( - SELECT labels.*, - row_number() OVER (PARTITION BY labels.group_id, labels.title, labels.template, labels.description, labels.type, labels.color ORDER BY labels.id) AS row_number, - #{CREATE} AS restore_action - FROM labels - WHERE labels.group_id BETWEEN #{start_id} AND #{stop_id} - AND NOT EXISTS (SELECT * FROM board_labels WHERE board_labels.label_id = labels.id) - AND NOT EXISTS (SELECT * FROM label_links WHERE label_links.label_id = labels.id) - AND NOT EXISTS (SELECT * FROM label_priorities WHERE label_priorities.label_id = labels.id) - AND NOT EXISTS (SELECT * FROM lists WHERE lists.label_id = labels.id) - AND NOT EXISTS (SELECT * FROM resource_label_events WHERE resource_label_events.label_id = labels.id) -) SELECT * FROM data WHERE row_number > 1; - SQL - - if duplicate_labels.any? - # create backup records - BackupLabel.insert_all!(duplicate_labels.map { |label| label.except("row_number") }) - - Label.unscoped.where(id: duplicate_labels.pluck("id")).delete_all - end - end - - def rename_partial_duplicates(start_id, stop_id) - # We need to ensure that the new title (with `_duplicate#{ID}`) doesn't exceed the limit. - # Truncate the original title (if needed) to 245 characters minus the length of the ID - # then add `_duplicate#{ID}` - - soft_duplicates = ApplicationRecord.connection.execute(<<-SQL.squish) -WITH data AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( - SELECT - *, - substring(title from 1 for 245 - length(id::text)) || '_duplicate' || id::text as new_title, - #{RENAME} AS restore_action, - row_number() OVER (PARTITION BY group_id, title ORDER BY id) AS row_number - FROM labels - WHERE group_id BETWEEN #{start_id} AND #{stop_id} -) SELECT * FROM data WHERE row_number > 1; - SQL - - if soft_duplicates.any? - # create backup records - BackupLabel.insert_all!(soft_duplicates.map { |label| label.except("row_number") }) - - ApplicationRecord.connection.execute(<<-SQL.squish) -UPDATE labels SET title = substring(title from 1 for 245 - length(id::text)) || '_duplicate' || id::text -WHERE labels.id IN (#{soft_duplicates.map { |dup| dup["id"] }.join(", ")}); - SQL - end - end - - def restore_renamed_labels(start_id, stop_id) - # the backup label IDs are not incremental, they are copied directly from the Labels table - ApplicationRecord.connection.execute(<<-SQL.squish) -WITH backups AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( - SELECT id, title - FROM backup_labels - WHERE id BETWEEN #{start_id} AND #{stop_id} - AND restore_action = #{RENAME} -) UPDATE labels SET title = backups.title -FROM backups -WHERE labels.id = backups.id; - SQL - end - - def restore_deleted_labels(start_id, stop_id) - ActiveRecord::Base.connection.execute(<<-SQL.squish) -INSERT INTO labels -SELECT id, title, color, group_id, created_at, updated_at, template, description, description_html, type, cached_markdown_version FROM backup_labels - WHERE backup_labels.id BETWEEN #{start_id} AND #{stop_id} - AND backup_labels.project_id IS NULL AND backup_labels.group_id IS NOT NULL - AND backup_labels.restore_action = #{CREATE} - SQL - end -end diff --git a/db/post_migrate/20200716234518_add_uniqueness_index_to_label_title_and_group.rb b/db/post_migrate/20200716234518_add_uniqueness_index_to_label_title_and_group.rb deleted file mode 100644 index 08bab811c00..00000000000 --- a/db/post_migrate/20200716234518_add_uniqueness_index_to_label_title_and_group.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddUniquenessIndexToLabelTitleAndGroup < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - GROUP_AND_TITLE = [:group_id, :title] - - def up - add_concurrent_index :labels, GROUP_AND_TITLE, where: "labels.project_id IS NULL", unique: true, name: "index_labels_on_group_id_and_title_unique" - remove_concurrent_index :labels, GROUP_AND_TITLE, name: "index_labels_on_group_id_and_title" - end - - def down - add_concurrent_index :labels, GROUP_AND_TITLE, where: "labels.project_id IS NULL", unique: false, name: "index_labels_on_group_id_and_title" - remove_concurrent_index :labels, GROUP_AND_TITLE, name: "index_labels_on_group_id_and_title_unique" - end -end diff --git a/db/post_migrate/20200721140507_update_index_for_coverage_fuzzing_telemetry.rb b/db/post_migrate/20200721140507_update_index_for_coverage_fuzzing_telemetry.rb deleted file mode 100644 index 4f884319125..00000000000 --- a/db/post_migrate/20200721140507_update_index_for_coverage_fuzzing_telemetry.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -class UpdateIndexForCoverageFuzzingTelemetry < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - OLD_INDEX_NAME = 'index_security_ci_builds_on_name_and_id' - NEW_INDEX_NAME = 'index_security_ci_builds_on_name_and_id_parser_features' - - OLD_CLAUSE = "((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, - ('dast'::character varying)::text, - ('dependency_scanning'::character varying)::text, - ('license_management'::character varying)::text, - ('sast'::character varying)::text, - ('secret_detection'::character varying)::text, - ('license_scanning'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text)" - - NEW_CLAUSE = "((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, - ('dast'::character varying)::text, - ('dependency_scanning'::character varying)::text, - ('license_management'::character varying)::text, - ('sast'::character varying)::text, - ('secret_detection'::character varying)::text, - ('coverage_fuzzing'::character varying)::text, - ('license_scanning'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text)" - - def up - add_concurrent_index :ci_builds, [:name, :id], name: NEW_INDEX_NAME, where: NEW_CLAUSE - remove_concurrent_index_by_name :ci_builds, OLD_INDEX_NAME - end - - def down - add_concurrent_index :ci_builds, [:name, :id], name: OLD_INDEX_NAME, where: OLD_CLAUSE - remove_concurrent_index_by_name :ci_builds, NEW_INDEX_NAME - end -end diff --git a/db/post_migrate/20200722202318_backfill_partitioned_audit_events.rb b/db/post_migrate/20200722202318_backfill_partitioned_audit_events.rb deleted file mode 100644 index 538aa94e22b..00000000000 --- a/db/post_migrate/20200722202318_backfill_partitioned_audit_events.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class BackfillPartitionedAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::PartitioningMigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - return if ::Gitlab.com? - - enqueue_partitioning_data_migration :audit_events - end - - def down - return if ::Gitlab.com? - - cleanup_partitioning_data_migration :audit_events - end -end diff --git a/db/post_migrate/20200723040950_migrate_incident_issues_to_incident_type.rb b/db/post_migrate/20200723040950_migrate_incident_issues_to_incident_type.rb deleted file mode 100644 index 0f562630381..00000000000 --- a/db/post_migrate/20200723040950_migrate_incident_issues_to_incident_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -class MigrateIncidentIssuesToIncidentType < ActiveRecord::Migration[6.0] - DOWNTIME = false - BATCH_SIZE = 100 - - disable_ddl_transaction! - - LABEL_PROPERTIES = { - title: 'incident' - }.freeze - - class Issue < ActiveRecord::Base - include EachBatch - - self.table_name = 'issues' - - scope :incident_labelled, -> do - joins("INNER JOIN label_links ON label_links.target_type = 'Issue' AND label_links.target_id = issues.id") - .joins("INNER JOIN labels ON labels.id = label_links.label_id") - .where(labels: LABEL_PROPERTIES) - end - - enum issue_type: { - issue: 0, - incident: 1 - } - - scope :incident_typed, -> { where(issue_type: :incident) } - end - - def up - incident_issues = Issue.incident_labelled - - incident_issues.each_batch(of: BATCH_SIZE) do |batch| - batch.update_all(issue_type: :incident) - end - end - - def down - incident_issues = Issue.incident_typed - - incident_issues.each_batch(of: BATCH_SIZE) do |batch| - batch.update_all(issue_type: :issue) - end - end -end diff --git a/db/post_migrate/20200723132258_schedule_copy_of_mr_target_project_id_to_mr_metrics.rb b/db/post_migrate/20200723132258_schedule_copy_of_mr_target_project_id_to_mr_metrics.rb deleted file mode 100644 index bca703121bc..00000000000 --- a/db/post_migrate/20200723132258_schedule_copy_of_mr_target_project_id_to_mr_metrics.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class ScheduleCopyOfMrTargetProjectIdToMrMetrics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INTERVAL = 2.minutes.to_i - BATCH_SIZE = 5_000 - MIGRATION = 'CopyMergeRequestTargetProjectToMergeRequestMetrics' - - disable_ddl_transaction! - - class MergeRequest < ActiveRecord::Base - include EachBatch - - self.table_name = 'merge_requests' - end - - def up - MergeRequest.reset_column_information - - queue_background_migration_jobs_by_range_at_intervals( - MergeRequest, - MIGRATION, - INTERVAL, - batch_size: BATCH_SIZE - ) - end - - def down - # noop - end -end diff --git a/db/post_migrate/20200724100421_remove_updated_at_from_audit_events.rb b/db/post_migrate/20200724100421_remove_updated_at_from_audit_events.rb deleted file mode 100644 index 0dc02491db5..00000000000 --- a/db/post_migrate/20200724100421_remove_updated_at_from_audit_events.rb +++ /dev/null @@ -1,119 +0,0 @@ -# frozen_string_literal: true - -class RemoveUpdatedAtFromAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::SchemaHelpers - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - SOURCE_TABLE_NAME = 'audit_events' - PARTITIONED_TABLE_NAME = 'audit_events_part_5fc467ac26' - TRIGGER_FUNCTION_NAME = 'table_sync_function_2be879775d' - - def up - with_lock_retries do - remove_column SOURCE_TABLE_NAME, :updated_at - - create_trigger_function(TRIGGER_FUNCTION_NAME, replace: true) do - <<~SQL - IF (TG_OP = 'DELETE') THEN - DELETE FROM #{PARTITIONED_TABLE_NAME} where id = OLD.id; - ELSIF (TG_OP = 'UPDATE') THEN - UPDATE #{PARTITIONED_TABLE_NAME} - SET author_id = NEW.author_id, - type = NEW.type, - entity_id = NEW.entity_id, - entity_type = NEW.entity_type, - details = NEW.details, - ip_address = NEW.ip_address, - author_name = NEW.author_name, - entity_path = NEW.entity_path, - target_details = NEW.target_details, - created_at = NEW.created_at - WHERE #{PARTITIONED_TABLE_NAME}.id = NEW.id; - ELSIF (TG_OP = 'INSERT') THEN - INSERT INTO #{PARTITIONED_TABLE_NAME} (id, - author_id, - type, - entity_id, - entity_type, - details, - ip_address, - author_name, - entity_path, - target_details, - created_at) - VALUES (NEW.id, - NEW.author_id, - NEW.type, - NEW.entity_id, - NEW.entity_type, - NEW.details, - NEW.ip_address, - NEW.author_name, - NEW.entity_path, - NEW.target_details, - NEW.created_at); - END IF; - RETURN NULL; - SQL - end - - remove_column PARTITIONED_TABLE_NAME, :updated_at - end - end - - def down - with_lock_retries do - add_column SOURCE_TABLE_NAME, :updated_at, :datetime # rubocop:disable Migration/Datetime - add_column PARTITIONED_TABLE_NAME, :updated_at, :datetime # rubocop:disable Migration/Datetime - - create_trigger_function(TRIGGER_FUNCTION_NAME, replace: true) do - <<~SQL - IF (TG_OP = 'DELETE') THEN - DELETE FROM #{PARTITIONED_TABLE_NAME} where id = OLD.id; - ELSIF (TG_OP = 'UPDATE') THEN - UPDATE #{PARTITIONED_TABLE_NAME} - SET author_id = NEW.author_id, - type = NEW.type, - entity_id = NEW.entity_id, - entity_type = NEW.entity_type, - details = NEW.details, - updated_at = NEW.updated_at, - ip_address = NEW.ip_address, - author_name = NEW.author_name, - entity_path = NEW.entity_path, - target_details = NEW.target_details, - created_at = NEW.created_at - WHERE #{PARTITIONED_TABLE_NAME}.id = NEW.id; - ELSIF (TG_OP = 'INSERT') THEN - INSERT INTO #{PARTITIONED_TABLE_NAME} (id, - author_id, - type, - entity_id, - entity_type, - details, - updated_at, - ip_address, - author_name, - entity_path, - target_details, - created_at) - VALUES (NEW.id, - NEW.author_id, - NEW.type, - NEW.entity_id, - NEW.entity_type, - NEW.details, - NEW.updated_at, - NEW.ip_address, - NEW.author_name, - NEW.entity_path, - NEW.target_details, - NEW.created_at); - END IF; - RETURN NULL; - SQL - end - end - end -end diff --git a/db/post_migrate/20200724130639_backfill_designs_relative_position.rb b/db/post_migrate/20200724130639_backfill_designs_relative_position.rb deleted file mode 100644 index ef8b38bf90c..00000000000 --- a/db/post_migrate/20200724130639_backfill_designs_relative_position.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# This migration is not needed anymore and was disabled, because we're now -# also backfilling design positions immediately before moving a design. -# -# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39555 -class BackfillDesignsRelativePosition < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200727100631_remove_again_gitlab_issue_tracker_service_records.rb b/db/post_migrate/20200727100631_remove_again_gitlab_issue_tracker_service_records.rb deleted file mode 100644 index b61da82aef8..00000000000 --- a/db/post_migrate/20200727100631_remove_again_gitlab_issue_tracker_service_records.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class RemoveAgainGitlabIssueTrackerServiceRecords < ActiveRecord::Migration[6.0] - DOWNTIME = false - BATCH_SIZE = 5000 - - disable_ddl_transaction! - - class Service < ActiveRecord::Base - include EachBatch - - self.table_name = 'services' - - def self.gitlab_issue_tracker_service - where(type: 'GitlabIssueTrackerService') - end - end - - def up - Service.each_batch(of: BATCH_SIZE) do |services| - services.gitlab_issue_tracker_service.delete_all - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200727114147_remove_title_and_description_from_services.rb b/db/post_migrate/20200727114147_remove_title_and_description_from_services.rb deleted file mode 100644 index 0c908e17438..00000000000 --- a/db/post_migrate/20200727114147_remove_title_and_description_from_services.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class RemoveTitleAndDescriptionFromServices < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - remove_column :services, :title, :string - remove_column :services, :description, :string, limit: 500 - end -end diff --git a/db/post_migrate/20200730133730_remove_table_vulnerability_export_verification_status.rb b/db/post_migrate/20200730133730_remove_table_vulnerability_export_verification_status.rb deleted file mode 100644 index 9aa15fa7d1a..00000000000 --- a/db/post_migrate/20200730133730_remove_table_vulnerability_export_verification_status.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class RemoveTableVulnerabilityExportVerificationStatus < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - return unless table_exists?(:vulnerability_export_verification_status) - - drop_table :vulnerability_export_verification_status - end - - def down - # no-op because `vulnerability_export_verification_status` table should not - # be created, see https://gitlab.com/gitlab-org/gitlab/-/issues/232977 - end -end diff --git a/db/post_migrate/20200804035230_add_partial_index_on_id_to_merge_request_diffs.rb b/db/post_migrate/20200804035230_add_partial_index_on_id_to_merge_request_diffs.rb deleted file mode 100644 index 94b939eb811..00000000000 --- a/db/post_migrate/20200804035230_add_partial_index_on_id_to_merge_request_diffs.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexOnIdToMergeRequestDiffs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_merge_request_diffs_external_diff_store_is_null' - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_request_diffs, :id, where: 'external_diff_store IS NULL', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :merge_request_diffs, INDEX_NAME - end -end diff --git a/db/post_migrate/20200804041930_add_not_null_constraint_on_external_diff_store_to_merge_request_diffs.rb b/db/post_migrate/20200804041930_add_not_null_constraint_on_external_diff_store_to_merge_request_diffs.rb deleted file mode 100644 index c33e790b37b..00000000000 --- a/db/post_migrate/20200804041930_add_not_null_constraint_on_external_diff_store_to_merge_request_diffs.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullConstraintOnExternalDiffStoreToMergeRequestDiffs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_not_null_constraint(:merge_request_diffs, :external_diff_store, validate: false) - end - - def down - remove_not_null_constraint(:merge_request_diffs, :external_diff_store) - end -end diff --git a/db/post_migrate/20200805152108_migrate_null_external_diff_store_to_local_value.rb b/db/post_migrate/20200805152108_migrate_null_external_diff_store_to_local_value.rb deleted file mode 100644 index e42f23d8fae..00000000000 --- a/db/post_migrate/20200805152108_migrate_null_external_diff_store_to_local_value.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -class MigrateNullExternalDiffStoreToLocalValue < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - JOB_INTERVAL = 2.minutes + 5.seconds - BATCH_SIZE = 5_000 - MIGRATION = 'SetNullExternalDiffStoreToLocalValue' - - disable_ddl_transaction! - - class MergeRequestDiff < ActiveRecord::Base - self.table_name = 'merge_request_diffs' - - include ::EachBatch - end - - def up - # On GitLab.com, 19M of 93M rows have NULL external_diff_store. - # - # With batches of 5000 and a background migration job interval of 2m 5s, - # 3.8K jobs are scheduled over 5.5 days. - # - # The index `index_merge_request_diffs_external_diff_store_is_null` is - # expected to be used here and in the jobs. - # - # queue_background_migration_jobs_by_range_at_intervals is not used because - # it would enqueue 18.6K jobs and we have an index for getting these ranges. - MergeRequestDiff.where(external_diff_store: nil).each_batch(of: BATCH_SIZE) do |batch, index| - range = batch.pluck(Arel.sql("MIN(id)"), Arel.sql("MAX(id)")).first - delay = index * JOB_INTERVAL - - migrate_in(delay.seconds, MIGRATION, [*range]) - end - end - - def down - # noop - end -end diff --git a/db/post_migrate/20200806004742_add_not_null_constraint_on_file_store_to_package_files.rb b/db/post_migrate/20200806004742_add_not_null_constraint_on_file_store_to_package_files.rb deleted file mode 100644 index 7b7250fef9a..00000000000 --- a/db/post_migrate/20200806004742_add_not_null_constraint_on_file_store_to_package_files.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullConstraintOnFileStoreToPackageFiles < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_not_null_constraint(:packages_package_files, :file_store, validate: false) - end - - def down - remove_not_null_constraint(:packages_package_files, :file_store) - end -end diff --git a/db/post_migrate/20200806172909_add_partial_index_on_id_to_package_files.rb b/db/post_migrate/20200806172909_add_partial_index_on_id_to_package_files.rb deleted file mode 100644 index 7904574f890..00000000000 --- a/db/post_migrate/20200806172909_add_partial_index_on_id_to_package_files.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexOnIdToPackageFiles < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_packages_package_files_file_store_is_null' - - disable_ddl_transaction! - - def up - add_concurrent_index :packages_package_files, :id, where: 'file_store IS NULL', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :packages_package_files, INDEX_NAME - end -end diff --git a/db/post_migrate/20200806173633_migrate_null_package_files_file_store_to_local_value.rb b/db/post_migrate/20200806173633_migrate_null_package_files_file_store_to_local_value.rb deleted file mode 100644 index 088b85dd5da..00000000000 --- a/db/post_migrate/20200806173633_migrate_null_package_files_file_store_to_local_value.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -class MigrateNullPackageFilesFileStoreToLocalValue < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - JOB_INTERVAL = 2.minutes + 5.seconds - BATCH_SIZE = 5_000 - MIGRATION = 'SetNullPackageFilesFileStoreToLocalValue' - - disable_ddl_transaction! - - class PackageFile < ActiveRecord::Base - self.table_name = 'packages_package_files' - - include ::EachBatch - end - - def up - # On GitLab.com, there are 2M package files. None have NULL file_store - # because they are all object stored. This is a no-op for GitLab.com. - # - # If a customer had 2M package files with NULL file_store, with batches of - # 5000 and a background migration job interval of 2m 5s, then 400 jobs would - # be scheduled over 14 hours. - # - # The index `index_packages_package_files_file_store_is_null` is - # expected to be used here and in the jobs. - # - # queue_background_migration_jobs_by_range_at_intervals is not used because - # it would enqueue 18.6K jobs and we have an index for getting these ranges. - PackageFile.where(file_store: nil).each_batch(of: BATCH_SIZE) do |batch, index| - range = batch.pluck(Arel.sql("MIN(id)"), Arel.sql("MAX(id)")).first - delay = index * JOB_INTERVAL - - migrate_in(delay.seconds, MIGRATION, [*range]) - end - end - - def down - # noop - end -end diff --git a/db/post_migrate/20200807110237_add_migration_index_to_vulnerabilities_occurrences.rb b/db/post_migrate/20200807110237_add_migration_index_to_vulnerabilities_occurrences.rb deleted file mode 100644 index e806a337f8f..00000000000 --- a/db/post_migrate/20200807110237_add_migration_index_to_vulnerabilities_occurrences.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddMigrationIndexToVulnerabilitiesOccurrences < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerability_occurrences, - "project_id, report_type, encode(project_fingerprint, 'hex'::text)", - name: 'index_vulnerability_occurrences_for_issue_links_migration' - end - - def down - remove_concurrent_index_by_name :vulnerability_occurrences, - :index_vulnerability_occurrences_for_issue_links_migration - end -end diff --git a/db/post_migrate/20200807152315_backfill_merge_request_diffs_files_counts.rb b/db/post_migrate/20200807152315_backfill_merge_request_diffs_files_counts.rb deleted file mode 100644 index bc7e4712d19..00000000000 --- a/db/post_migrate/20200807152315_backfill_merge_request_diffs_files_counts.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class BackfillMergeRequestDiffsFilesCounts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - # There are ~72 million records on GitLab.com at time of writing, so go fast - BATCH_SIZE = 10_000 - DELAY_INTERVAL = 2.minutes.to_i - MIGRATION = 'SetMergeRequestDiffFilesCount' - - disable_ddl_transaction! - - class MergeRequestDiff < ActiveRecord::Base - include EachBatch - - self.table_name = 'merge_request_diffs' - end - - def up - queue_background_migration_jobs_by_range_at_intervals( - MergeRequestDiff, MIGRATION, DELAY_INTERVAL, batch_size: BATCH_SIZE - ) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200808221641_add_index_for_license_compliance_artifacts.rb b/db/post_migrate/20200808221641_add_index_for_license_compliance_artifacts.rb deleted file mode 100644 index fce4ee095bd..00000000000 --- a/db/post_migrate/20200808221641_add_index_for_license_compliance_artifacts.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForLicenseComplianceArtifacts < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_ci_job_artifacts_on_license_compliance_file_types' - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_job_artifacts, [:job_id, :file_type], where: 'file_type = 10 OR file_type = 101', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :ci_job_artifacts, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20200809221641_migrate_license_management_artifacts_to_license_scanning.rb b/db/post_migrate/20200809221641_migrate_license_management_artifacts_to_license_scanning.rb deleted file mode 100644 index 66ef4b35dfa..00000000000 --- a/db/post_migrate/20200809221641_migrate_license_management_artifacts_to_license_scanning.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -class MigrateLicenseManagementArtifactsToLicenseScanning < ActiveRecord::Migration[6.0] - DOWNTIME = false - LICENSE_MANAGEMENT_FILE_TYPE = 10 - LICENSE_SCANNING_FILE_TYPE = 101 - - disable_ddl_transaction! - - class JobArtifact < ActiveRecord::Base - include EachBatch - - self.table_name = 'ci_job_artifacts' - end - - # We're updating file_type of ci artifacts from license_management to license_scanning - # But before that we need to delete "rogue" artifacts for CI builds that have associated with them - # both license_scanning and license_management artifacts. It's an edge case and usually, we don't have - # such builds in the database. - def up - return unless Gitlab.ee? - - JobArtifact - .where("file_type = 10 OR file_type = 101") - .each_batch(column: :job_id, of: 1000) do |relation| - min, max = relation.pluck('MIN(job_id)', 'MAX(job_id)').flatten - - ActiveRecord::Base.connection.execute <<~SQL - WITH ci_job_artifacts_with_row_number as #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( - SELECT job_id, id, ROW_NUMBER() OVER (PARTITION BY job_id ORDER BY id ASC) as row_number - FROM ci_job_artifacts - WHERE (file_type = #{LICENSE_SCANNING_FILE_TYPE} OR file_type = #{LICENSE_MANAGEMENT_FILE_TYPE}) - AND job_id >= #{Integer(min)} AND job_id < #{Integer(max)} - ) - DELETE FROM ci_job_artifacts - WHERE ci_job_artifacts.id IN (SELECT id from ci_job_artifacts_with_row_number WHERE ci_job_artifacts_with_row_number.row_number > 1) - SQL - end - - JobArtifact.where(file_type: LICENSE_MANAGEMENT_FILE_TYPE).each_batch(column: :job_id, of: 1000) do |relation| - relation.update_all(file_type: LICENSE_SCANNING_FILE_TYPE) - end - end - - def down - # no-op - # we're deleting duplicating artifacts and updating file_type for license_management artifacts - end -end diff --git a/db/post_migrate/20200810100921_add_target_type_to_audit_event.rb b/db/post_migrate/20200810100921_add_target_type_to_audit_event.rb deleted file mode 100644 index 8dde5945f0d..00000000000 --- a/db/post_migrate/20200810100921_add_target_type_to_audit_event.rb +++ /dev/null @@ -1,121 +0,0 @@ -# frozen_string_literal: true - -class AddTargetTypeToAuditEvent < ActiveRecord::Migration[6.0] - include Gitlab::Database::SchemaHelpers - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - SOURCE_TABLE_NAME = 'audit_events' - PARTITIONED_TABLE_NAME = 'audit_events_part_5fc467ac26' - TRIGGER_FUNCTION_NAME = 'table_sync_function_2be879775d' - - def up - with_lock_retries do - # rubocop:disable Migration/AddLimitToTextColumns - add_column('audit_events', :target_type, :text) - add_column('audit_events_part_5fc467ac26', :target_type, :text) - # rubocop:enable Migration/AddLimitToTextColumns - - create_trigger_function(TRIGGER_FUNCTION_NAME, replace: true) do - <<~SQL - IF (TG_OP = 'DELETE') THEN - DELETE FROM #{PARTITIONED_TABLE_NAME} where id = OLD.id; - ELSIF (TG_OP = 'UPDATE') THEN - UPDATE #{PARTITIONED_TABLE_NAME} - SET author_id = NEW.author_id, - type = NEW.type, - entity_id = NEW.entity_id, - entity_type = NEW.entity_type, - details = NEW.details, - ip_address = NEW.ip_address, - author_name = NEW.author_name, - entity_path = NEW.entity_path, - target_details = NEW.target_details, - target_type = NEW.target_type, - created_at = NEW.created_at - WHERE #{PARTITIONED_TABLE_NAME}.id = NEW.id; - ELSIF (TG_OP = 'INSERT') THEN - INSERT INTO #{PARTITIONED_TABLE_NAME} (id, - author_id, - type, - entity_id, - entity_type, - details, - ip_address, - author_name, - entity_path, - target_details, - target_type, - created_at) - VALUES (NEW.id, - NEW.author_id, - NEW.type, - NEW.entity_id, - NEW.entity_type, - NEW.details, - NEW.ip_address, - NEW.author_name, - NEW.entity_path, - NEW.target_details, - NEW.target_type, - NEW.created_at); - END IF; - RETURN NULL; - SQL - end - end - end - - def down - with_lock_retries do - remove_column SOURCE_TABLE_NAME, :target_type - - create_trigger_function(TRIGGER_FUNCTION_NAME, replace: true) do - <<~SQL - IF (TG_OP = 'DELETE') THEN - DELETE FROM #{PARTITIONED_TABLE_NAME} where id = OLD.id; - ELSIF (TG_OP = 'UPDATE') THEN - UPDATE #{PARTITIONED_TABLE_NAME} - SET author_id = NEW.author_id, - type = NEW.type, - entity_id = NEW.entity_id, - entity_type = NEW.entity_type, - details = NEW.details, - ip_address = NEW.ip_address, - author_name = NEW.author_name, - entity_path = NEW.entity_path, - target_details = NEW.target_details, - created_at = NEW.created_at - WHERE #{PARTITIONED_TABLE_NAME}.id = NEW.id; - ELSIF (TG_OP = 'INSERT') THEN - INSERT INTO #{PARTITIONED_TABLE_NAME} (id, - author_id, - type, - entity_id, - entity_type, - details, - ip_address, - author_name, - entity_path, - target_details, - created_at) - VALUES (NEW.id, - NEW.author_id, - NEW.type, - NEW.entity_id, - NEW.entity_type, - NEW.details, - NEW.ip_address, - NEW.author_name, - NEW.entity_path, - NEW.target_details, - NEW.created_at); - END IF; - RETURN NULL; - SQL - end - - remove_column PARTITIONED_TABLE_NAME, :target_type - end - end -end diff --git a/db/post_migrate/20200810101029_add_text_limit_to_audit_event_target_type.rb b/db/post_migrate/20200810101029_add_text_limit_to_audit_event_target_type.rb deleted file mode 100644 index 2a5ea9cd245..00000000000 --- a/db/post_migrate/20200810101029_add_text_limit_to_audit_event_target_type.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToAuditEventTargetType < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - SOURCE_TABLE_NAME = 'audit_events' - PARTITIONED_TABLE_NAME = 'audit_events_part_5fc467ac26' - - disable_ddl_transaction! - - def up - add_text_limit(SOURCE_TABLE_NAME, :target_type, 255) - add_text_limit(PARTITIONED_TABLE_NAME, :target_type, 255) - end - - def down - remove_text_limit(SOURCE_TABLE_NAME, :target_type) - remove_text_limit(PARTITIONED_TABLE_NAME, :target_type) - end -end diff --git a/db/post_migrate/20200810160355_add_not_null_constraint_to_ci_pipeline_artifact_file.rb b/db/post_migrate/20200810160355_add_not_null_constraint_to_ci_pipeline_artifact_file.rb deleted file mode 100644 index 0c233d44313..00000000000 --- a/db/post_migrate/20200810160355_add_not_null_constraint_to_ci_pipeline_artifact_file.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullConstraintToCiPipelineArtifactFile < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_not_null_constraint :ci_pipeline_artifacts, :file, validate: true - end - - def down - remove_not_null_constraint :ci_pipeline_artifacts, :file - end -end diff --git a/db/post_migrate/20200810191256_remove_pipeline_id_from_test_reports.rb b/db/post_migrate/20200810191256_remove_pipeline_id_from_test_reports.rb deleted file mode 100644 index f99629a921e..00000000000 --- a/db/post_migrate/20200810191256_remove_pipeline_id_from_test_reports.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RemovePipelineIdFromTestReports < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - remove_column :requirements_management_test_reports, :pipeline_id - end - - def down - add_column :requirements_management_test_reports, :pipeline_id, :integer - - with_lock_retries do - add_foreign_key :requirements_management_test_reports, :ci_pipelines, column: :pipeline_id, on_delete: :nullify - end - end -end diff --git a/db/post_migrate/20200811130000_create_index_vulnerabilities_feedback_issue_id_not_null.rb b/db/post_migrate/20200811130000_create_index_vulnerabilities_feedback_issue_id_not_null.rb deleted file mode 100644 index 118076eb254..00000000000 --- a/db/post_migrate/20200811130000_create_index_vulnerabilities_feedback_issue_id_not_null.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CreateIndexVulnerabilitiesFeedbackIssueIdNotNull < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerability_feedback, :id, where: 'issue_id IS NOT NULL', - name: "index_vulnerability_feedback_on_issue_id_not_null" - end - - def down - remove_concurrent_index_by_name :vulnerability_feedback, - :index_vulnerability_feedback_on_issue_id_not_null - end -end diff --git a/db/post_migrate/20200811130433_create_missing_vulnerabilities_issue_links.rb b/db/post_migrate/20200811130433_create_missing_vulnerabilities_issue_links.rb deleted file mode 100644 index 031d9ea49e2..00000000000 --- a/db/post_migrate/20200811130433_create_missing_vulnerabilities_issue_links.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -class CreateMissingVulnerabilitiesIssueLinks < ActiveRecord::Migration[6.0] - class VulnerabilitiesFeedback < ActiveRecord::Base - include EachBatch - self.table_name = 'vulnerability_feedback' - end - - class VulnerabilitiesIssueLink < ActiveRecord::Base - self.table_name = 'vulnerability_issue_links' - LINK_TYPE_CREATED = 2 - end - - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - VulnerabilitiesFeedback.where.not(issue_id: nil).each_batch do |relation| - timestamp = Time.now - issue_links = relation - .joins("JOIN vulnerability_occurrences vo ON vo.project_id = vulnerability_feedback.project_id AND vo.report_type = vulnerability_feedback.category AND encode(vo.project_fingerprint, 'hex') = vulnerability_feedback.project_fingerprint") - .where.not('vo.vulnerability_id' => nil) - .pluck(:vulnerability_id, :issue_id) - .map do |v_id, i_id| - { - vulnerability_id: v_id, - issue_id: i_id, - link_type: VulnerabilitiesIssueLink::LINK_TYPE_CREATED, - created_at: timestamp, - updated_at: timestamp - } - end - - next if issue_links.empty? - - VulnerabilitiesIssueLink.insert_all( - issue_links, - returning: false - ) - end - end - - def down - end -end diff --git a/db/post_migrate/20200811211536_add_index_to_ci_job_artifacts_for_terraform_reports_id.rb b/db/post_migrate/20200811211536_add_index_to_ci_job_artifacts_for_terraform_reports_id.rb deleted file mode 100644 index 6042f90cf85..00000000000 --- a/db/post_migrate/20200811211536_add_index_to_ci_job_artifacts_for_terraform_reports_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToCiJobArtifactsForTerraformReportsId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_ci_job_artifacts_id_for_terraform_reports' - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_job_artifacts, :id, where: 'file_type = 18', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME - end -end diff --git a/db/post_migrate/20200813153434_import_latest_common_metrics.rb b/db/post_migrate/20200813153434_import_latest_common_metrics.rb deleted file mode 100644 index 203e495674f..00000000000 --- a/db/post_migrate/20200813153434_import_latest_common_metrics.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class ImportLatestCommonMetrics < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - # The common_metrics queries were updated to work with K8s versions that - # use the pod/container label names as well as K8s versions that use the - # older pod_name/container_name convention. - ::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute - end - - def down - # no-op - # The import cannot be reversed since we do not know the state that the - # common metrics in the PrometheusMetric table were in before the import. - - # To manually revert this migration. - # 1. Go back to the previous version of the config/prometheus/common_metrics.yml file. (git checkout 74447f11349617ed8b273196d6a5781d9a67a613) - # 2. Execute `rails runner '::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute'` - end -end diff --git a/db/post_migrate/20200817070126_update_index_secure_for_coverage_fuzzing_telemetry.rb b/db/post_migrate/20200817070126_update_index_secure_for_coverage_fuzzing_telemetry.rb deleted file mode 100644 index d9aa7314115..00000000000 --- a/db/post_migrate/20200817070126_update_index_secure_for_coverage_fuzzing_telemetry.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class UpdateIndexSecureForCoverageFuzzingTelemetry < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - OLD_SECURE_INDEX_NAME = 'index_secure_ci_builds_on_user_id_created_at' - NEW_SECURE_INDEX_NAME = 'index_secure_ci_builds_on_user_id_created_at_parser_features' - - def up - add_concurrent_index(:ci_builds, - [:user_id, :created_at], - where: "(((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('secret_detection'::character varying)::text])))", - name: NEW_SECURE_INDEX_NAME) - remove_concurrent_index_by_name :ci_builds, OLD_SECURE_INDEX_NAME - end - - def down - add_concurrent_index(:ci_builds, - [:user_id, :created_at], - where: "(((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text])))", - name: OLD_SECURE_INDEX_NAME) - remove_concurrent_index_by_name :ci_builds, NEW_SECURE_INDEX_NAME - end -end diff --git a/db/post_migrate/20200817100710_add_section_and_created_at_codeowner_approval_merge_request_index.rb b/db/post_migrate/20200817100710_add_section_and_created_at_codeowner_approval_merge_request_index.rb deleted file mode 100644 index 33de4f1f790..00000000000 --- a/db/post_migrate/20200817100710_add_section_and_created_at_codeowner_approval_merge_request_index.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddSectionAndCreatedAtCodeownerApprovalMergeRequestIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - SECTION_CREATED_AT_ON_CODEOWNER_APPROVAL_MERGE_REQUEST_RULES = "index_created_at_on_codeowner_approval_merge_request_rules" - RULE_TYPE_CODEOWNERS = 2 - CODEOWNER_SECTION_DEFAULT = 'codeowners' - - disable_ddl_transaction! - - def up - add_concurrent_index :approval_merge_request_rules, :created_at, - where: "rule_type = #{RULE_TYPE_CODEOWNERS} AND section != '#{CODEOWNER_SECTION_DEFAULT}'::text", - name: SECTION_CREATED_AT_ON_CODEOWNER_APPROVAL_MERGE_REQUEST_RULES - end - - def down - remove_concurrent_index_by_name :approval_merge_request_rules, SECTION_CREATED_AT_ON_CODEOWNER_APPROVAL_MERGE_REQUEST_RULES - end -end diff --git a/db/post_migrate/20200819082334_remove_default_from_services.rb b/db/post_migrate/20200819082334_remove_default_from_services.rb deleted file mode 100644 index 2a990016c95..00000000000 --- a/db/post_migrate/20200819082334_remove_default_from_services.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RemoveDefaultFromServices < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - remove_column :services, :default, :boolean - end - end - - def down - with_lock_retries do - add_column :services, :default, :boolean, default: false - end - end -end diff --git a/db/post_migrate/20200819113644_add_target_id_to_audit_events.rb b/db/post_migrate/20200819113644_add_target_id_to_audit_events.rb deleted file mode 100644 index c2d9aff928b..00000000000 --- a/db/post_migrate/20200819113644_add_target_id_to_audit_events.rb +++ /dev/null @@ -1,125 +0,0 @@ -# frozen_string_literal: true - -class AddTargetIdToAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::SchemaHelpers - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - SOURCE_TABLE_NAME = 'audit_events' - PARTITIONED_TABLE_NAME = 'audit_events_part_5fc467ac26' - TRIGGER_FUNCTION_NAME = 'table_sync_function_2be879775d' - - def up - with_lock_retries do - add_column(SOURCE_TABLE_NAME, :target_id, :bigint) - add_column(PARTITIONED_TABLE_NAME, :target_id, :bigint) - - create_trigger_function(TRIGGER_FUNCTION_NAME, replace: true) do - <<~SQL - IF (TG_OP = 'DELETE') THEN - DELETE FROM #{PARTITIONED_TABLE_NAME} where id = OLD.id; - ELSIF (TG_OP = 'UPDATE') THEN - UPDATE #{PARTITIONED_TABLE_NAME} - SET author_id = NEW.author_id, - type = NEW.type, - entity_id = NEW.entity_id, - entity_type = NEW.entity_type, - details = NEW.details, - ip_address = NEW.ip_address, - author_name = NEW.author_name, - entity_path = NEW.entity_path, - target_details = NEW.target_details, - target_type = NEW.target_type, - target_id = NEW.target_id, - created_at = NEW.created_at - WHERE #{PARTITIONED_TABLE_NAME}.id = NEW.id; - ELSIF (TG_OP = 'INSERT') THEN - INSERT INTO #{PARTITIONED_TABLE_NAME} (id, - author_id, - type, - entity_id, - entity_type, - details, - ip_address, - author_name, - entity_path, - target_details, - target_type, - target_id, - created_at) - VALUES (NEW.id, - NEW.author_id, - NEW.type, - NEW.entity_id, - NEW.entity_type, - NEW.details, - NEW.ip_address, - NEW.author_name, - NEW.entity_path, - NEW.target_details, - NEW.target_type, - NEW.target_id, - NEW.created_at); - END IF; - RETURN NULL; - SQL - end - end - end - - def down - with_lock_retries do - remove_column SOURCE_TABLE_NAME, :target_id - - create_trigger_function(TRIGGER_FUNCTION_NAME, replace: true) do - <<~SQL - IF (TG_OP = 'DELETE') THEN - DELETE FROM #{PARTITIONED_TABLE_NAME} where id = OLD.id; - ELSIF (TG_OP = 'UPDATE') THEN - UPDATE #{PARTITIONED_TABLE_NAME} - SET author_id = NEW.author_id, - type = NEW.type, - entity_id = NEW.entity_id, - entity_type = NEW.entity_type, - details = NEW.details, - ip_address = NEW.ip_address, - author_name = NEW.author_name, - entity_path = NEW.entity_path, - target_details = NEW.target_details, - target_type = NEW.target_type, - created_at = NEW.created_at - WHERE #{PARTITIONED_TABLE_NAME}.id = NEW.id; - ELSIF (TG_OP = 'INSERT') THEN - INSERT INTO #{PARTITIONED_TABLE_NAME} (id, - author_id, - type, - entity_id, - entity_type, - details, - ip_address, - author_name, - entity_path, - target_details, - target_type, - created_at) - VALUES (NEW.id, - NEW.author_id, - NEW.type, - NEW.entity_id, - NEW.entity_type, - NEW.details, - NEW.ip_address, - NEW.author_name, - NEW.entity_path, - NEW.target_details, - NEW.target_type, - NEW.created_at); - END IF; - RETURN NULL; - SQL - end - - remove_column PARTITIONED_TABLE_NAME, :target_id - end - end -end diff --git a/db/post_migrate/20200819202048_remove_orphaned_emails.rb b/db/post_migrate/20200819202048_remove_orphaned_emails.rb deleted file mode 100644 index 82cba244ad6..00000000000 --- a/db/post_migrate/20200819202048_remove_orphaned_emails.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class RemoveOrphanedEmails < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute <<~SQL - DELETE FROM emails - WHERE not exists ( - SELECT 1 FROM users WHERE users.id = emails.user_id - ); - SQL - - execute 'DELETE FROM emails WHERE user_id IS NULL;' - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200819202222_validate_emails_user_id_foreign_key.rb b/db/post_migrate/20200819202222_validate_emails_user_id_foreign_key.rb deleted file mode 100644 index 4f7f9deb540..00000000000 --- a/db/post_migrate/20200819202222_validate_emails_user_id_foreign_key.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class ValidateEmailsUserIdForeignKey < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - CONSTRAINT_NAME = 'fk_emails_user_id' - - def up - validate_foreign_key :emails, :user_id, name: CONSTRAINT_NAME - end - - def down - # no op - end -end diff --git a/db/post_migrate/20200821224343_schedule_populate_vulnerability_historical_statistics.rb b/db/post_migrate/20200821224343_schedule_populate_vulnerability_historical_statistics.rb deleted file mode 100644 index f3a57ab78ef..00000000000 --- a/db/post_migrate/20200821224343_schedule_populate_vulnerability_historical_statistics.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class SchedulePopulateVulnerabilityHistoricalStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - DELAY_INTERVAL = 2.minutes.to_i - BATCH_SIZE = 50 - MIGRATION = 'PopulateVulnerabilityHistoricalStatistics' - - disable_ddl_transaction! - - class Vulnerability < ActiveRecord::Base - self.table_name = 'vulnerabilities' - - include ::EachBatch - end - - def up - return unless Gitlab.ee? - - Vulnerability.select('project_id').distinct.each_batch(of: BATCH_SIZE, column: 'project_id') do |project_batch, index| - migrate_in(index * DELAY_INTERVAL, MIGRATION, [project_batch.pluck(:project_id)]) - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200824130028_remove_index_on_users_bio.rb b/db/post_migrate/20200824130028_remove_index_on_users_bio.rb deleted file mode 100644 index d41734eb9ce..00000000000 --- a/db/post_migrate/20200824130028_remove_index_on_users_bio.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexOnUsersBio < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - BACKGROUND_MIGRATION_CLASS = 'MigrateUsersBioToUserDetails' - INDEX_NAME = 'tmp_idx_on_user_id_where_bio_is_filled' - - disable_ddl_transaction! - - def up - Gitlab::BackgroundMigration.steal(BACKGROUND_MIGRATION_CLASS) - remove_concurrent_index_by_name(:users, INDEX_NAME) - end - - def down - add_concurrent_index :users, :id, where: "(COALESCE(bio, '') IS DISTINCT FROM '')", name: INDEX_NAME - end -end diff --git a/db/post_migrate/20200824130447_remove_users_bio_column.rb b/db/post_migrate/20200824130447_remove_users_bio_column.rb deleted file mode 100644 index cb630ec7fd5..00000000000 --- a/db/post_migrate/20200824130447_remove_users_bio_column.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RemoveUsersBioColumn < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - remove_column :users, :bio - end - end - - def down - with_lock_retries do - add_column :users, :bio, :string # rubocop: disable Migration/AddColumnsToWideTables - end - end -end diff --git a/db/post_migrate/20200826053152_add_index_on_ci_pipelines_source_for_on_demand_dast.rb b/db/post_migrate/20200826053152_add_index_on_ci_pipelines_source_for_on_demand_dast.rb deleted file mode 100644 index 6249adc9798..00000000000 --- a/db/post_migrate/20200826053152_add_index_on_ci_pipelines_source_for_on_demand_dast.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnCiPipelinesSourceForOnDemandDast < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = 'index_ci_pipelines_for_ondemand_dast_scans' - - SOURCE_ONDEMAND_DAST_SCAN_PIPELINE = 13 - - disable_ddl_transaction! - - def up - add_concurrent_index( - :ci_pipelines, :id, - where: "source = #{SOURCE_ONDEMAND_DAST_SCAN_PIPELINE}", - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index( - :ci_pipelines, :id, - where: "source = #{SOURCE_ONDEMAND_DAST_SCAN_PIPELINE}", - name: INDEX_NAME - ) - end -end diff --git a/db/post_migrate/20200826121552_remove_ci_job_artifacts_locked.rb b/db/post_migrate/20200826121552_remove_ci_job_artifacts_locked.rb deleted file mode 100644 index 21c7acca7ac..00000000000 --- a/db/post_migrate/20200826121552_remove_ci_job_artifacts_locked.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class RemoveCiJobArtifactsLocked < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - with_lock_retries do - remove_column :ci_job_artifacts, :locked - end - end - - def down - with_lock_retries do - add_column :ci_job_artifacts, :locked, :boolean - end - end -end diff --git a/db/post_migrate/20200826220745_add_compound_index_on_vulnerabilities_for_background_migration.rb b/db/post_migrate/20200826220745_add_compound_index_on_vulnerabilities_for_background_migration.rb deleted file mode 100644 index da95f708cf9..00000000000 --- a/db/post_migrate/20200826220745_add_compound_index_on_vulnerabilities_for_background_migration.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddCompoundIndexOnVulnerabilitiesForBackgroundMigration < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_vulnerabilities_on_project_id_and_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerabilities, [:project_id, :id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME - end -end diff --git a/db/post_migrate/20200826220746_schedule_populate_resolved_on_default_branch_column.rb b/db/post_migrate/20200826220746_schedule_populate_resolved_on_default_branch_column.rb deleted file mode 100644 index 6faa4fc8101..00000000000 --- a/db/post_migrate/20200826220746_schedule_populate_resolved_on_default_branch_column.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class SchedulePopulateResolvedOnDefaultBranchColumn < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - BATCH_SIZE = 100 - DELAY_INTERVAL = 5.minutes.to_i - MIGRATION_CLASS = 'PopulateResolvedOnDefaultBranchColumn' - - disable_ddl_transaction! - - def up - return unless Gitlab.ee? - - EE::Gitlab::BackgroundMigration::PopulateResolvedOnDefaultBranchColumn::Vulnerability.distinct.each_batch(of: BATCH_SIZE, column: :project_id) do |batch, index| - project_ids = batch.pluck(:project_id) - migrate_in(index * DELAY_INTERVAL, MIGRATION_CLASS, project_ids) - end - end - - def down - # no-op - # This migration schedules background tasks to populate - # `resolved_on_default_branch` column of `vulnerabilities` - # table so there is no rollback operation needed for this. - end -end diff --git a/db/post_migrate/20200831065320_add_not_valid_not_null_constraint_to_mr_metrics.rb b/db/post_migrate/20200831065320_add_not_valid_not_null_constraint_to_mr_metrics.rb deleted file mode 100644 index 35bfabc0358..00000000000 --- a/db/post_migrate/20200831065320_add_not_valid_not_null_constraint_to_mr_metrics.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNotValidNotNullConstraintToMrMetrics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_not_null_constraint :merge_request_metrics, :target_project_id, validate: false - end - - def down - remove_not_null_constraint :merge_request_metrics, :target_project_id - end -end diff --git a/db/post_migrate/20200831065322_add_tmp_index_to_target_project_id.rb b/db/post_migrate/20200831065322_add_tmp_index_to_target_project_id.rb deleted file mode 100644 index 5d6d098ebfe..00000000000 --- a/db/post_migrate/20200831065322_add_tmp_index_to_target_project_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexToTargetProjectId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - TMP_INDEX_NAME = 'tmp_index_on_mr_metrics_target_project_id_null' - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_request_metrics, :id, where: 'target_project_id IS NULL', name: TMP_INDEX_NAME - end - - def down - remove_concurrent_index_by_name :merge_request_metrics, name: TMP_INDEX_NAME - end -end diff --git a/db/post_migrate/20200831065705_ensure_target_project_id_is_filled.rb b/db/post_migrate/20200831065705_ensure_target_project_id_is_filled.rb deleted file mode 100644 index 8693dca0000..00000000000 --- a/db/post_migrate/20200831065705_ensure_target_project_id_is_filled.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -class EnsureTargetProjectIdIsFilled < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - BACKGROUND_MIGRATION_CLASS = 'CopyMergeRequestTargetProjectToMergeRequestMetrics' - BATCH_SIZE = 1_000 - DOWNTIME = false - - disable_ddl_transaction! - - class MergeRequest < ActiveRecord::Base - self.table_name = 'merge_requests' - end - - class MergeRequestMetrics < ActiveRecord::Base - include EachBatch - - belongs_to :merge_request - - self.table_name = 'merge_request_metrics' - end - - def up - Gitlab::BackgroundMigration.steal(BACKGROUND_MIGRATION_CLASS) - - # Do a manual update in case we lost BG jobs. The expected record count should be 0 or very low. - MergeRequestMetrics.where(target_project_id: nil).each_batch do |scope| - query_for_cte = scope.joins(:merge_request).select( - MergeRequestMetrics.arel_table[:id].as('id'), - MergeRequest.arel_table[:target_project_id].as('target_project_id') - ) - - MergeRequestMetrics.connection.execute <<-SQL - WITH target_project_id_and_metrics_id as #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} ( - #{query_for_cte.to_sql} - ) - UPDATE #{MergeRequestMetrics.connection.quote_table_name(MergeRequestMetrics.table_name)} - SET target_project_id = target_project_id_and_metrics_id.target_project_id - FROM target_project_id_and_metrics_id - WHERE merge_request_metrics.id = target_project_id_and_metrics_id.id - SQL - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200831074356_validate_not_null_constraint_on_mr_metrics.rb b/db/post_migrate/20200831074356_validate_not_null_constraint_on_mr_metrics.rb deleted file mode 100644 index 8fd54186db3..00000000000 --- a/db/post_migrate/20200831074356_validate_not_null_constraint_on_mr_metrics.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class ValidateNotNullConstraintOnMrMetrics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - TMP_INDEX_NAME = 'tmp_index_on_mr_metrics_target_project_id_null' - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_not_null_constraint :merge_request_metrics, :target_project_id - - remove_concurrent_index_by_name :merge_request_metrics, name: TMP_INDEX_NAME - end - - def down - add_concurrent_index :merge_request_metrics, :id, where: 'target_project_id IS NULL', name: TMP_INDEX_NAME - end -end diff --git a/db/post_migrate/20200831224343_populate_vulnerability_historical_statistics_for_year.rb b/db/post_migrate/20200831224343_populate_vulnerability_historical_statistics_for_year.rb deleted file mode 100644 index 3f4fbfbebde..00000000000 --- a/db/post_migrate/20200831224343_populate_vulnerability_historical_statistics_for_year.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class PopulateVulnerabilityHistoricalStatisticsForYear < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - DELAY_INTERVAL = 5.minutes.to_i - BATCH_SIZE = 50 - MIGRATION = 'PopulateVulnerabilityHistoricalStatistics' - - disable_ddl_transaction! - - class Vulnerability < ActiveRecord::Base - self.table_name = 'vulnerabilities' - - include ::EachBatch - end - - def up - return unless Gitlab.ee? - - Vulnerability.select('project_id').distinct.each_batch(of: BATCH_SIZE, column: 'project_id') do |project_batch, index| - migrate_in(index * DELAY_INTERVAL, MIGRATION, [project_batch.pluck(:project_id), 365]) - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200901170135_backfill_modified_column_for_approval_merge_request_rules.rb b/db/post_migrate/20200901170135_backfill_modified_column_for_approval_merge_request_rules.rb deleted file mode 100644 index 9a9866f38ec..00000000000 --- a/db/post_migrate/20200901170135_backfill_modified_column_for_approval_merge_request_rules.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class BackfillModifiedColumnForApprovalMergeRequestRules < ActiveRecord::Migration[6.0] - include Gitlab::Database::Migrations::BackgroundMigrationHelpers - - disable_ddl_transaction! - - class ApprovalMergeRequestRule < ActiveRecord::Base - include ::EachBatch - - self.table_name = 'approval_merge_request_rules' - end - - def change - queue_background_migration_jobs_by_range_at_intervals(ApprovalMergeRequestRule, 'AddModifiedToApprovalMergeRequestRule', 2.minutes, batch_size: 10_000) - end -end diff --git a/db/post_migrate/20200901212304_drop_code_owner_column_from_approval_merge_request_rule.rb b/db/post_migrate/20200901212304_drop_code_owner_column_from_approval_merge_request_rule.rb deleted file mode 100644 index 7524ae8e15b..00000000000 --- a/db/post_migrate/20200901212304_drop_code_owner_column_from_approval_merge_request_rule.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -class DropCodeOwnerColumnFromApprovalMergeRequestRule < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - def up - with_lock_retries do - remove_column :approval_merge_request_rules, :code_owner - end - end - - def down - unless column_exists?(:approval_merge_request_rules, :code_owner) - with_lock_retries do - add_column :approval_merge_request_rules, :code_owner, :boolean, default: false, null: false - end - end - - add_concurrent_index( - :approval_merge_request_rules, - [:merge_request_id, :code_owner, :name], - unique: true, - where: "code_owner = true AND section IS NULL", - name: "approval_rule_name_index_for_code_owners" - ) - - add_concurrent_index( - :approval_merge_request_rules, - [:merge_request_id, :code_owner], - name: "index_approval_merge_request_rules_1" - ) - end -end diff --git a/db/post_migrate/20200903064431_add_created_at_index_to_audit_events.rb b/db/post_migrate/20200903064431_add_created_at_index_to_audit_events.rb deleted file mode 100644 index 94dc2cb7adf..00000000000 --- a/db/post_migrate/20200903064431_add_created_at_index_to_audit_events.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddCreatedAtIndexToAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - INDEX_NAME = 'idx_audit_events_on_entity_id_desc_author_id_created_at' - OLD_INDEX_NAME = 'index_audit_events_on_entity_id_entity_type_id_desc_author_id' - - def up - add_concurrent_index(:audit_events, [:entity_id, :entity_type, :id, :author_id, :created_at], order: { id: :desc }, name: INDEX_NAME) - remove_concurrent_index_by_name(:audit_events, OLD_INDEX_NAME) - end - - def down - add_concurrent_index(:audit_events, [:entity_id, :entity_type, :id, :author_id], order: { id: :desc }, name: OLD_INDEX_NAME) - remove_concurrent_index_by_name(:audit_events, INDEX_NAME) - end -end diff --git a/db/post_migrate/20200904174901_backfill_cleanup_for_partitioned_audit_events.rb b/db/post_migrate/20200904174901_backfill_cleanup_for_partitioned_audit_events.rb deleted file mode 100644 index 1d8240012d1..00000000000 --- a/db/post_migrate/20200904174901_backfill_cleanup_for_partitioned_audit_events.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class BackfillCleanupForPartitionedAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::PartitioningMigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - finalize_backfilling_partitioned_table :audit_events - end - - def down - # no op - end -end diff --git a/db/post_migrate/20200907092715_add_not_null_constraint_to_user_on_group_import_states.rb b/db/post_migrate/20200907092715_add_not_null_constraint_to_user_on_group_import_states.rb deleted file mode 100644 index 4f2edad43d8..00000000000 --- a/db/post_migrate/20200907092715_add_not_null_constraint_to_user_on_group_import_states.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullConstraintToUserOnGroupImportStates < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_not_null_constraint :group_import_states, :user_id, validate: false - end - - def down - remove_not_null_constraint :group_import_states, :user_id - end -end diff --git a/db/post_migrate/20200907124300_complete_namespace_settings_migration.rb b/db/post_migrate/20200907124300_complete_namespace_settings_migration.rb deleted file mode 100644 index 5881869ee3c..00000000000 --- a/db/post_migrate/20200907124300_complete_namespace_settings_migration.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class CompleteNamespaceSettingsMigration < ActiveRecord::Migration[5.2] - DOWNTIME = false - BATCH_SIZE = 10000 - - class Namespace < ActiveRecord::Base - include EachBatch - - self.table_name = 'namespaces' - end - - def up - Gitlab::BackgroundMigration.steal('BackfillNamespaceSettings') - - ensure_data_migration - end - - def down - # no-op - end - - private - - def ensure_data_migration - Namespace.each_batch(of: BATCH_SIZE) do |query| - missing_count = query.where("NOT EXISTS (SELECT 1 FROM namespace_settings WHERE namespace_settings.namespace_id=namespaces.id)").limit(1).size - if missing_count > 0 - min, max = query.pluck("MIN(id), MAX(id)").flatten - # we expect low record count so inline execution is fine. - Gitlab::BackgroundMigration::BackfillNamespaceSettings.new.perform(min, max) - end - end - end -end diff --git a/db/post_migrate/20200908064229_add_partial_index_to_ci_builds_table_on_user_id_name.rb b/db/post_migrate/20200908064229_add_partial_index_to_ci_builds_table_on_user_id_name.rb deleted file mode 100644 index 433fa957c38..00000000000 --- a/db/post_migrate/20200908064229_add_partial_index_to_ci_builds_table_on_user_id_name.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexToCiBuildsTableOnUserIdName < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - INDEX_NAME = 'index_partial_ci_builds_on_user_id_name_parser_features' - FILTER_CONDITION = <<~SQL - (((type)::text = 'Ci::Build'::text) AND - ((name)::text = ANY ( - ARRAY[ - ('container_scanning'::character varying)::text, - ('dast'::character varying)::text, - ('dependency_scanning'::character varying)::text, - ('license_management'::character varying)::text, - ('license_scanning'::character varying)::text, - ('sast'::character varying)::text, - ('coverage_fuzzing'::character varying)::text, - ('secret_detection'::character varying)::text - ] - )) - ) - SQL - - def up - add_concurrent_index(:ci_builds, - [:user_id, :name], - where: FILTER_CONDITION, - name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name :ci_builds, INDEX_NAME - end -end diff --git a/db/post_migrate/20200908095446_update_location_fingerprint_column_for_cs.rb b/db/post_migrate/20200908095446_update_location_fingerprint_column_for_cs.rb deleted file mode 100644 index fc2b7116ed1..00000000000 --- a/db/post_migrate/20200908095446_update_location_fingerprint_column_for_cs.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class UpdateLocationFingerprintColumnForCs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - BATCH_SIZE = 1_000 - INTERVAL = 2.minutes - - # 883_152 records - def up - return unless Gitlab.ee? - - migration = Gitlab::BackgroundMigration::UpdateLocationFingerprintForContainerScanningFindings - migration_name = migration.to_s.demodulize - relation = migration::Finding.container_scanning - queue_background_migration_jobs_by_range_at_intervals(relation, - migration_name, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # no-op - # intentionally blank - end -end diff --git a/db/post_migrate/20200909161624_cleanup_group_import_states_with_null_user_id.rb b/db/post_migrate/20200909161624_cleanup_group_import_states_with_null_user_id.rb deleted file mode 100644 index f956da81528..00000000000 --- a/db/post_migrate/20200909161624_cleanup_group_import_states_with_null_user_id.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -class CleanupGroupImportStatesWithNullUserId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # With BATCH_SIZE=1000 and group_import_states.count=600 on GitLab.com - # - 1 iteration will be run - # - each batch requires on average ~2500ms - # - 600 rows require on average ~1500ms - # Expected total run time: ~2500ms - BATCH_SIZE = 1000 - - disable_ddl_transaction! - - class User < ActiveRecord::Base - self.table_name = 'users' - end - - class Namespace < ActiveRecord::Base - self.table_name = 'namespaces' - - belongs_to :owner, class_name: 'CleanupGroupImportStatesWithNullUserId::User' - end - - class Member < ActiveRecord::Base - self.table_name = 'members' - self.inheritance_column = :_type_disabled - - belongs_to :user, class_name: 'CleanupGroupImportStatesWithNullUserId::User' - end - - class Group < Namespace - OWNER = 50 - - self.inheritance_column = :_type_disabled - - def default_owner - owners.first || parent&.default_owner || owner - end - - def parent - Group.find_by_id(parent_id) - end - - def owners - Member.where(type: 'GroupMember', source_type: 'Namespace', source_id: id, requested_at: nil, access_level: OWNER).map(&:user) - end - end - - class GroupImportState < ActiveRecord::Base - include ::EachBatch - - self.table_name = 'group_import_states' - - belongs_to :group, class_name: 'CleanupGroupImportStatesWithNullUserId::Group' - belongs_to :user, class_name: 'CleanupGroupImportStatesWithNullUserId::User' - end - - def up - User.reset_column_information - Namespace.reset_column_information - Member.reset_column_information - Group.reset_column_information - GroupImportState.reset_column_information - - GroupImportState.each_batch(of: BATCH_SIZE) do |batch| - batch.each do |group_import_state| - owner_id = Group.find_by_id(group_import_state.group_id)&.default_owner&.id - - group_import_state.update!(user_id: owner_id) if owner_id - end - end - - GroupImportState.where(user_id: nil).delete_all - end - - def down - # no-op : can't go back to `NULL` without first dropping the `NOT NULL` constraint - end -end diff --git a/db/post_migrate/20200909194014_change_pypi_python_version_type_cleanup.rb b/db/post_migrate/20200909194014_change_pypi_python_version_type_cleanup.rb deleted file mode 100644 index c94f745e762..00000000000 --- a/db/post_migrate/20200909194014_change_pypi_python_version_type_cleanup.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class ChangePypiPythonVersionTypeCleanup < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - cleanup_concurrent_column_type_change(:packages_pypi_metadata, :required_python) - end - - def down - execute('UPDATE packages_pypi_metadata SET required_python = substring(required_python from 1 for 50)') - change_column_type_concurrently :packages_pypi_metadata, :required_python, 'varchar(50)', batch_column_name: :package_id - end -end diff --git a/db/post_migrate/20200909194524_increase_pypi_version_size.rb b/db/post_migrate/20200909194524_increase_pypi_version_size.rb deleted file mode 100644 index 0273d49bba9..00000000000 --- a/db/post_migrate/20200909194524_increase_pypi_version_size.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class IncreasePypiVersionSize < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_text_limit :packages_pypi_metadata, :required_python, 255 - end - - def down - remove_text_limit :packages_pypi_metadata, :required_python - end -end diff --git a/db/post_migrate/20200910131217_tmp_index_for_fixing_inconsistent_vulnerability_occurrences.rb b/db/post_migrate/20200910131217_tmp_index_for_fixing_inconsistent_vulnerability_occurrences.rb deleted file mode 100644 index 1985b8f1b67..00000000000 --- a/db/post_migrate/20200910131217_tmp_index_for_fixing_inconsistent_vulnerability_occurrences.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class TmpIndexForFixingInconsistentVulnerabilityOccurrences < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'tmp_index_for_fixing_inconsistent_vulnerability_occurrences' - disable_ddl_transaction! - - def up - # report_type: 2 container scanning - add_concurrent_index(:vulnerability_occurrences, :id, - where: "LENGTH(location_fingerprint) = 40 AND report_type = 2", - name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(:vulnerability_occurrences, INDEX_NAME) - end -end diff --git a/db/post_migrate/20200910131218_remove_duplicated_cs_findings.rb b/db/post_migrate/20200910131218_remove_duplicated_cs_findings.rb deleted file mode 100644 index c5bfddfd265..00000000000 --- a/db/post_migrate/20200910131218_remove_duplicated_cs_findings.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class RemoveDuplicatedCsFindings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - BATCH_SIZE = 1_000 - INTERVAL = 2.minutes - - # 23_893 records will be updated - # 23_893 records will be deleted - def up - return unless Gitlab.com? - - migration = Gitlab::BackgroundMigration::RemoveDuplicateCsFindings - migration_name = migration.to_s.demodulize - relation = migration::Finding.container_scanning.where("LENGTH(location_fingerprint) = 40") - queue_background_migration_jobs_by_range_at_intervals(relation, - migration_name, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # no-op - # intentionally blank - end -end diff --git a/db/post_migrate/20200910155617_backfill_jira_tracker_deployment_type.rb b/db/post_migrate/20200910155617_backfill_jira_tracker_deployment_type.rb deleted file mode 100644 index 9c978a20d25..00000000000 --- a/db/post_migrate/20200910155617_backfill_jira_tracker_deployment_type.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class BackfillJiraTrackerDeploymentType < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - # no-op - # this migration was reverted - # in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45205 - # due to https://gitlab.com/gitlab-com/gl-infra/production/-/issues/2820 - end - - def down - # no-op - # intentionally blank - end -end diff --git a/db/post_migrate/20200910170908_ensure_filled_external_diff_store_on_merge_request_diffs.rb b/db/post_migrate/20200910170908_ensure_filled_external_diff_store_on_merge_request_diffs.rb deleted file mode 100644 index 5070bd1c2f5..00000000000 --- a/db/post_migrate/20200910170908_ensure_filled_external_diff_store_on_merge_request_diffs.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class EnsureFilledExternalDiffStoreOnMergeRequestDiffs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - BACKGROUND_MIGRATION_CLASS = 'SetNullExternalDiffStoreToLocalValue' - BATCH_SIZE = 5_000 - LOCAL_STORE = 1 # equal to ObjectStorage::Store::LOCAL - DOWNTIME = false - - disable_ddl_transaction! - - class MergeRequestDiff < ActiveRecord::Base - self.table_name = 'merge_request_diffs' - - include ::EachBatch - end - - def up - Gitlab::BackgroundMigration.steal(BACKGROUND_MIGRATION_CLASS) - - # Do a manual update in case we lost BG jobs. The expected record count should be 0 or very low. - MergeRequestDiff.where(external_diff_store: nil).each_batch(of: BATCH_SIZE) do |batch, index| - batch.update_all(external_diff_store: LOCAL_STORE) - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200910175553_validate_not_null_external_diff_store_on_merge_request_diffs.rb b/db/post_migrate/20200910175553_validate_not_null_external_diff_store_on_merge_request_diffs.rb deleted file mode 100644 index 4dc8ac96a4c..00000000000 --- a/db/post_migrate/20200910175553_validate_not_null_external_diff_store_on_merge_request_diffs.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class ValidateNotNullExternalDiffStoreOnMergeRequestDiffs < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Remove index which was only added to fill external_diff_store - INDEX_NAME = 'index_merge_request_diffs_external_diff_store_is_null' - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_not_null_constraint :merge_request_diffs, :external_diff_store - - remove_concurrent_index_by_name :merge_request_diffs, INDEX_NAME - end - - def down - add_concurrent_index :merge_request_diffs, :id, where: 'external_diff_store IS NULL', name: INDEX_NAME - end -end diff --git a/db/post_migrate/20200912153218_cleanup_admin_notification_email_application_setting_rename.rb b/db/post_migrate/20200912153218_cleanup_admin_notification_email_application_setting_rename.rb deleted file mode 100644 index 35c54b64ddf..00000000000 --- a/db/post_migrate/20200912153218_cleanup_admin_notification_email_application_setting_rename.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class CleanupAdminNotificationEmailApplicationSettingRename < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - cleanup_concurrent_column_rename :application_settings, :admin_notification_email, :abuse_notification_email - end - - def down - undo_cleanup_concurrent_column_rename :application_settings, :admin_notification_email, :abuse_notification_email - end -end diff --git a/db/post_migrate/20200915044225_schedule_migration_to_hashed_storage.rb b/db/post_migrate/20200915044225_schedule_migration_to_hashed_storage.rb deleted file mode 100644 index 553d060dc58..00000000000 --- a/db/post_migrate/20200915044225_schedule_migration_to_hashed_storage.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class ScheduleMigrationToHashedStorage < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - MIGRATION = 'MigrateToHashedStorage' - - disable_ddl_transaction! - - def up - migrate_async(MIGRATION) - end - - def down - # NO-OP - end -end diff --git a/db/post_migrate/20200915185707_ensure_filled_file_store_on_package_files.rb b/db/post_migrate/20200915185707_ensure_filled_file_store_on_package_files.rb deleted file mode 100644 index ec6f6df27bc..00000000000 --- a/db/post_migrate/20200915185707_ensure_filled_file_store_on_package_files.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class EnsureFilledFileStoreOnPackageFiles < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - BACKGROUND_MIGRATION_CLASS = 'SetNullPackageFilesFileStoreToLocalValue' - BATCH_SIZE = 5_000 - LOCAL_STORE = 1 # equal to ObjectStorage::Store::LOCAL - DOWNTIME = false - - disable_ddl_transaction! - - module Packages - class PackageFile < ActiveRecord::Base - self.table_name = 'packages_package_files' - - include ::EachBatch - end - end - - def up - Gitlab::BackgroundMigration.steal(BACKGROUND_MIGRATION_CLASS) - - # Do a manual update in case we lost BG jobs. The expected record count should be 0 or very low. - Packages::PackageFile.where(file_store: nil).each_batch(of: BATCH_SIZE) do |batch, index| - batch.update_all(file_store: LOCAL_STORE) - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200915191156_validate_not_null_file_store_on_package_files.rb b/db/post_migrate/20200915191156_validate_not_null_file_store_on_package_files.rb deleted file mode 100644 index 5e6db9cec3f..00000000000 --- a/db/post_migrate/20200915191156_validate_not_null_file_store_on_package_files.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class ValidateNotNullFileStoreOnPackageFiles < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - # Remove index which was only added to fill file_store - INDEX_NAME = 'index_packages_package_files_file_store_is_null' - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_not_null_constraint :packages_package_files, :file_store - - remove_concurrent_index_by_name :packages_package_files, INDEX_NAME - end - - def down - add_concurrent_index :packages_package_files, :id, where: 'file_store IS NULL', name: INDEX_NAME - end -end diff --git a/db/post_migrate/20200916081749_remove_cycle_analytics_total_stage_data.rb b/db/post_migrate/20200916081749_remove_cycle_analytics_total_stage_data.rb deleted file mode 100644 index 94c218c0c57..00000000000 --- a/db/post_migrate/20200916081749_remove_cycle_analytics_total_stage_data.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class RemoveCycleAnalyticsTotalStageData < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute("DELETE FROM analytics_cycle_analytics_group_stages WHERE name='production'") - execute("DELETE FROM analytics_cycle_analytics_project_stages WHERE name='production'") - end - - def down - # Migration is irreversible - end -end diff --git a/db/post_migrate/20200917135802_remove_duplicated_cs_findings_without_vulnerability_id.rb b/db/post_migrate/20200917135802_remove_duplicated_cs_findings_without_vulnerability_id.rb deleted file mode 100644 index 0e161b5de78..00000000000 --- a/db/post_migrate/20200917135802_remove_duplicated_cs_findings_without_vulnerability_id.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class RemoveDuplicatedCsFindingsWithoutVulnerabilityId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - BATCH_SIZE = 1_000 - - INTERVAL = 2.minutes - - # 1_500 records will be deleted - def up - return unless Gitlab.com? - - migration = Gitlab::BackgroundMigration::RemoveDuplicatedCsFindingsWithoutVulnerabilityId - migration_name = migration.to_s.demodulize - relation = migration::Finding.container_scanning.with_broken_fingerprint.where(vulnerability_id: nil) - queue_background_migration_jobs_by_range_at_intervals(relation, - migration_name, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20200917165525_update_index_on_namespaces_for_type_and_id.rb b/db/post_migrate/20200917165525_update_index_on_namespaces_for_type_and_id.rb deleted file mode 100644 index 35b72b4f160..00000000000 --- a/db/post_migrate/20200917165525_update_index_on_namespaces_for_type_and_id.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class UpdateIndexOnNamespacesForTypeAndId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - OLD_INDEX_NAME = 'index_namespaces_on_type_partial' - NEW_INDEX_NAME = 'index_namespaces_on_type_and_id_partial' - - def up - add_concurrent_index(:namespaces, [:type, :id], where: 'type IS NOT NULL', name: NEW_INDEX_NAME) - - remove_concurrent_index_by_name(:namespaces, OLD_INDEX_NAME) - end - - def down - add_concurrent_index(:namespaces, :type, where: 'type IS NOT NULL', name: OLD_INDEX_NAME) - - remove_concurrent_index_by_name(:namespaces, NEW_INDEX_NAME) - end -end diff --git a/db/post_migrate/20200922054642_drop_snowplow_iglu_registry_url_from_application_settings.rb b/db/post_migrate/20200922054642_drop_snowplow_iglu_registry_url_from_application_settings.rb deleted file mode 100644 index d3e64f1f4c2..00000000000 --- a/db/post_migrate/20200922054642_drop_snowplow_iglu_registry_url_from_application_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class DropSnowplowIgluRegistryUrlFromApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def change - remove_column :application_settings, :snowplow_iglu_registry_url, :string, limit: 255 - end -end diff --git a/db/post_migrate/20200922095954_remove_instance_statistics_visibility_private_from_application_settings.rb b/db/post_migrate/20200922095954_remove_instance_statistics_visibility_private_from_application_settings.rb deleted file mode 100644 index 1d01e54013d..00000000000 --- a/db/post_migrate/20200922095954_remove_instance_statistics_visibility_private_from_application_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RemoveInstanceStatisticsVisibilityPrivateFromApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - remove_column :application_settings, :instance_statistics_visibility_private - end - - def down - add_column :application_settings, :instance_statistics_visibility_private, :boolean, default: false, null: false - end -end diff --git a/db/post_migrate/20200922170907_change_index_on_pipeline_status.rb b/db/post_migrate/20200922170907_change_index_on_pipeline_status.rb deleted file mode 100644 index 61648788d7f..00000000000 --- a/db/post_migrate/20200922170907_change_index_on_pipeline_status.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class ChangeIndexOnPipelineStatus < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - OLD_INDEX_NAME = 'index_ci_pipelines_on_status' - NEW_INDEX_NAME = 'index_ci_pipelines_on_status_and_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_pipelines, [:status, :id], name: NEW_INDEX_NAME - remove_concurrent_index_by_name :ci_pipelines, name: OLD_INDEX_NAME - end - - def down - add_concurrent_index :ci_pipelines, :status, name: OLD_INDEX_NAME - remove_concurrent_index_by_name :ci_pipelines, name: NEW_INDEX_NAME - end -end diff --git a/db/post_migrate/20200922231755_remove_created_by_user_id_from_cluster_providers_aws.rb b/db/post_migrate/20200922231755_remove_created_by_user_id_from_cluster_providers_aws.rb deleted file mode 100644 index 02cc9676202..00000000000 --- a/db/post_migrate/20200922231755_remove_created_by_user_id_from_cluster_providers_aws.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class RemoveCreatedByUserIdFromClusterProvidersAws < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_cluster_providers_aws_on_created_by_user_id' - - disable_ddl_transaction! - - def up - with_lock_retries do - remove_column :cluster_providers_aws, :created_by_user_id - end - end - - def down - unless column_exists?(:cluster_providers_aws, :created_by_user_id) - add_column :cluster_providers_aws, :created_by_user_id, :integer - end - - add_concurrent_index :cluster_providers_aws, :created_by_user_id, name: INDEX_NAME - - add_concurrent_foreign_key :cluster_providers_aws, :users, column: :created_by_user_id, on_delete: :nullify - end -end diff --git a/db/post_migrate/20200929052138_create_initial_versions_for_pre_versioning_terraform_states.rb b/db/post_migrate/20200929052138_create_initial_versions_for_pre_versioning_terraform_states.rb deleted file mode 100644 index eff6ebfe5b4..00000000000 --- a/db/post_migrate/20200929052138_create_initial_versions_for_pre_versioning_terraform_states.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateInitialVersionsForPreVersioningTerraformStates < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - execute <<-SQL - INSERT INTO terraform_state_versions (terraform_state_id, created_at, updated_at, version, file_store, file) - SELECT id, NOW(), NOW(), 0, file_store, file - FROM terraform_states - WHERE versioning_enabled = FALSE - ON CONFLICT (terraform_state_id, version) DO NOTHING - SQL - end - - def down - end -end diff --git a/db/post_migrate/20200929113254_remove_type_from_audit_events.rb b/db/post_migrate/20200929113254_remove_type_from_audit_events.rb deleted file mode 100644 index 000dc0d2865..00000000000 --- a/db/post_migrate/20200929113254_remove_type_from_audit_events.rb +++ /dev/null @@ -1,125 +0,0 @@ -# frozen_string_literal: true - -class RemoveTypeFromAuditEvents < ActiveRecord::Migration[6.0] - include Gitlab::Database::SchemaHelpers - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - SOURCE_TABLE_NAME = 'audit_events' - PARTITIONED_TABLE_NAME = 'audit_events_part_5fc467ac26' - TRIGGER_FUNCTION_NAME = 'table_sync_function_2be879775d' - - def up - with_lock_retries do - remove_column SOURCE_TABLE_NAME, :type - - create_trigger_function(TRIGGER_FUNCTION_NAME, replace: true) do - <<~SQL - IF (TG_OP = 'DELETE') THEN - DELETE FROM #{PARTITIONED_TABLE_NAME} where id = OLD.id; - ELSIF (TG_OP = 'UPDATE') THEN - UPDATE #{PARTITIONED_TABLE_NAME} - SET author_id = NEW.author_id, - entity_id = NEW.entity_id, - entity_type = NEW.entity_type, - details = NEW.details, - ip_address = NEW.ip_address, - author_name = NEW.author_name, - entity_path = NEW.entity_path, - target_details = NEW.target_details, - target_type = NEW.target_type, - target_id = NEW.target_id, - created_at = NEW.created_at - WHERE #{PARTITIONED_TABLE_NAME}.id = NEW.id; - ELSIF (TG_OP = 'INSERT') THEN - INSERT INTO #{PARTITIONED_TABLE_NAME} (id, - author_id, - entity_id, - entity_type, - details, - ip_address, - author_name, - entity_path, - target_details, - target_type, - target_id, - created_at) - VALUES (NEW.id, - NEW.author_id, - NEW.entity_id, - NEW.entity_type, - NEW.details, - NEW.ip_address, - NEW.author_name, - NEW.entity_path, - NEW.target_details, - NEW.target_type, - NEW.target_id, - NEW.created_at); - END IF; - RETURN NULL; - SQL - end - - remove_column PARTITIONED_TABLE_NAME, :type - end - end - - def down - with_lock_retries do - add_column SOURCE_TABLE_NAME, :type, :string - add_column PARTITIONED_TABLE_NAME, :type, :string - - create_trigger_function(TRIGGER_FUNCTION_NAME, replace: true) do - <<~SQL - IF (TG_OP = 'DELETE') THEN - DELETE FROM #{PARTITIONED_TABLE_NAME} where id = OLD.id; - ELSIF (TG_OP = 'UPDATE') THEN - UPDATE #{PARTITIONED_TABLE_NAME} - SET author_id = NEW.author_id, - type = NEW.type, - entity_id = NEW.entity_id, - entity_type = NEW.entity_type, - details = NEW.details, - ip_address = NEW.ip_address, - author_name = NEW.author_name, - entity_path = NEW.entity_path, - target_details = NEW.target_details, - target_type = NEW.target_type, - target_id = NEW.target_id, - created_at = NEW.created_at - WHERE #{PARTITIONED_TABLE_NAME}.id = NEW.id; - ELSIF (TG_OP = 'INSERT') THEN - INSERT INTO #{PARTITIONED_TABLE_NAME} (id, - author_id, - type, - entity_id, - entity_type, - details, - ip_address, - author_name, - entity_path, - target_details, - target_type, - target_id, - created_at) - VALUES (NEW.id, - NEW.author_id, - NEW.type, - NEW.entity_id, - NEW.entity_type, - NEW.details, - NEW.ip_address, - NEW.author_name, - NEW.entity_path, - NEW.target_details, - NEW.target_type, - NEW.target_id, - NEW.created_at); - END IF; - RETURN NULL; - SQL - end - end - end -end diff --git a/db/post_migrate/20200929114107_schedule_migrate_u2f_webauthn.rb b/db/post_migrate/20200929114107_schedule_migrate_u2f_webauthn.rb deleted file mode 100644 index b118ed271a2..00000000000 --- a/db/post_migrate/20200929114107_schedule_migrate_u2f_webauthn.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class ScheduleMigrateU2fWebauthn < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - INTERVAL = 2.minutes.to_i - DOWNTIME = false - MIGRATION = 'MigrateU2fWebauthn' - BATCH_SIZE = 1_000 - - disable_ddl_transaction! - - class U2fRegistration < ActiveRecord::Base - include EachBatch - - self.table_name = 'u2f_registrations' - end - - def up - say "Scheduling #{MIGRATION} background migration jobs" - - queue_background_migration_jobs_by_range_at_intervals(U2fRegistration, MIGRATION, INTERVAL, batch_size: BATCH_SIZE) - end - - def down - # no-op - # There is no real way back here, because - # a) The U2fMigrator of webauthn_ruby gem only works in one way - # b) This migration only pushes jobs to Sidekiq - end -end diff --git a/db/post_migrate/20200930144340_set_job_waiter_ttl.rb b/db/post_migrate/20200930144340_set_job_waiter_ttl.rb deleted file mode 100644 index 347fa4be5a0..00000000000 --- a/db/post_migrate/20200930144340_set_job_waiter_ttl.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class SetJobWaiterTtl < ActiveRecord::Migration[6.0] - DOWNTIME = false - - SCRIPT = <<~LUA - if redis.call("ttl", KEYS[1]) < 0 then - redis.call("expire", KEYS[1], 21600) - end - LUA - - def up - Gitlab::Redis::SharedState.with do |redis| - cursor_init = '0' - cursor = cursor_init - - loop do - cursor, keys = redis.scan(cursor, match: 'gitlab:job_waiter:*') - - redis.pipelined do |redis| - keys.each { |k| redis.eval(SCRIPT, keys: [k]) } - end - - break if cursor == cursor_init - end - end - end - - def down - end -end diff --git a/db/post_migrate/20201001022100_validate_designs_filename_text_limit.rb b/db/post_migrate/20201001022100_validate_designs_filename_text_limit.rb deleted file mode 100644 index 35ed8c20671..00000000000 --- a/db/post_migrate/20201001022100_validate_designs_filename_text_limit.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class ValidateDesignsFilenameTextLimit < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - - disable_ddl_transaction! - - def up - validate_text_limit :design_management_designs, :filename - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20201001101136_remove_index_on_issues_relative_position.rb b/db/post_migrate/20201001101136_remove_index_on_issues_relative_position.rb deleted file mode 100644 index 605a167c0d5..00000000000 --- a/db/post_migrate/20201001101136_remove_index_on_issues_relative_position.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexOnIssuesRelativePosition < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - INDEX_NAME = 'index_issues_on_relative_position' - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name(:issues, INDEX_NAME) - end - - def down - add_concurrent_index(:issues, :relative_position, name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20201002094617_remove_container_scanning_report_type_index.rb b/db/post_migrate/20201002094617_remove_container_scanning_report_type_index.rb deleted file mode 100644 index a591fc185c4..00000000000 --- a/db/post_migrate/20201002094617_remove_container_scanning_report_type_index.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class RemoveContainerScanningReportTypeIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'idx_container_scanning_findings' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name(:vulnerability_occurrences, INDEX_NAME) - end - - def down - # report_type: 2 container scanning - add_concurrent_index( - :vulnerability_occurrences, - :id, - where: 'report_type = 2', - name: INDEX_NAME - ) - end -end diff --git a/db/post_migrate/20201002175953_add_index_for_merged_merge_requests.rb b/db/post_migrate/20201002175953_add_index_for_merged_merge_requests.rb deleted file mode 100644 index cd663f3da89..00000000000 --- a/db/post_migrate/20201002175953_add_index_for_merged_merge_requests.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForMergedMergeRequests < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'idx_merge_requests_on_merged_state' - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_requests, - :id, - where: 'state_id = 3', - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :merge_requests, INDEX_NAME - end -end diff --git a/db/post_migrate/20201005094331_migrate_compliance_framework_enum_to_database_framework_record.rb b/db/post_migrate/20201005094331_migrate_compliance_framework_enum_to_database_framework_record.rb deleted file mode 100644 index a5fab8576e4..00000000000 --- a/db/post_migrate/20201005094331_migrate_compliance_framework_enum_to_database_framework_record.rb +++ /dev/null @@ -1,102 +0,0 @@ -# frozen_string_literal: true - -class MigrateComplianceFrameworkEnumToDatabaseFrameworkRecord < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - class TmpComplianceFramework < ActiveRecord::Base - self.table_name = 'compliance_management_frameworks' - end - - class TmpProjectSettings < ActiveRecord::Base - # Maps data between ComplianceManagement::ComplianceFramework::FRAMEWORKS(enum) and new ComplianceManagement::Framework model - ENUM_FRAMEWORK_MAPPING = { - 1 => { - name: 'GDPR', - description: 'General Data Protection Regulation', - color: '#1aaa55' - }.freeze, - 2 => { - name: 'HIPAA', - description: 'Health Insurance Portability and Accountability Act', - color: '#1f75cb' - }.freeze, - 3 => { - name: 'PCI-DSS', - description: 'Payment Card Industry-Data Security Standard', - color: '#6666c4' - }.freeze, - 4 => { - name: 'SOC 2', - description: 'Service Organization Control 2', - color: '#dd2b0e' - }.freeze, - 5 => { - name: 'SOX', - description: 'Sarbanes-Oxley', - color: '#fc9403' - }.freeze - }.freeze - - self.table_name = 'project_compliance_framework_settings' - - include EachBatch - - def raw_compliance_framework - # Because we have an `enum` definition in ComplianceManagement::ComplianceFramework::ProjectSettings, this is very unlikely to fail. - ENUM_FRAMEWORK_MAPPING.fetch(framework).merge(namespace_id: root_namespace_id) - end - end - - def up - TmpComplianceFramework.reset_column_information - TmpProjectSettings.reset_column_information - - # This is our standard recursive namespace query, we use it to determine the root_namespace_id in the same query. - lateral_join = <<~SQL - INNER JOIN LATERAL ( - WITH RECURSIVE "base_and_ancestors" AS ( - ( - SELECT "ns".* FROM "namespaces" as ns WHERE "ns"."id" = projects.namespace_id - ) UNION - ( - SELECT "ns".* FROM "namespaces" as ns, "base_and_ancestors" WHERE "ns"."id" = "base_and_ancestors"."parent_id" - ) - ) SELECT "namespaces".* FROM "base_and_ancestors" AS "namespaces" WHERE parent_id IS NULL LIMIT 1) AS root_namespaces ON TRUE - SQL - - TmpProjectSettings.each_batch(of: 100) do |query| - project_settings_with_root_group = query - .select(:project_id, :framework, 'root_namespaces.id as root_namespace_id') - .from("(SELECT * FROM project_compliance_framework_settings) as project_compliance_framework_settings") # this is needed for the LATERAL JOIN - .joins("INNER JOIN projects on projects.id = project_compliance_framework_settings.project_id") - .joins(lateral_join) - .to_a - - ActiveRecord::Base.transaction do - raw_frameworks = project_settings_with_root_group.map(&:raw_compliance_framework) - TmpComplianceFramework.insert_all(raw_frameworks.uniq) # Create compliance frameworks per group - - unique_namespace_ids = project_settings_with_root_group.map(&:root_namespace_id).uniq - - framework_records = TmpComplianceFramework.select(:id, :namespace_id, :name).where(namespace_id: unique_namespace_ids) - - project_settings_with_root_group.each do |project_setting| - framework = framework_records.find do |record| - # name is unique within a group - record.name == project_setting.raw_compliance_framework[:name] && record[:namespace_id] == project_setting.raw_compliance_framework[:namespace_id] - end - - project_setting.update_column(:framework_id, framework.id) - end - end - end - end - - def down - # data migration, no-op - end -end diff --git a/db/post_migrate/20201005153955_add_not_null_constraint_to_compliance_project_settings.rb b/db/post_migrate/20201005153955_add_not_null_constraint_to_compliance_project_settings.rb deleted file mode 100644 index 6d47cbe9f08..00000000000 --- a/db/post_migrate/20201005153955_add_not_null_constraint_to_compliance_project_settings.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullConstraintToComplianceProjectSettings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_not_null_constraint(:project_compliance_framework_settings, :framework_id) - - change_column_null(:compliance_management_frameworks, :namespace_id, false) - end - - def down - change_column_null(:compliance_management_frameworks, :namespace_id, true) - - remove_not_null_constraint(:project_compliance_framework_settings, :framework_id) - end -end diff --git a/db/post_migrate/20201014142521_schedule_sync_blocking_issues_count.rb b/db/post_migrate/20201014142521_schedule_sync_blocking_issues_count.rb deleted file mode 100644 index 30a8ea591da..00000000000 --- a/db/post_migrate/20201014142521_schedule_sync_blocking_issues_count.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -require 'set' - -class ScheduleSyncBlockingIssuesCount < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - BATCH_SIZE = 50 - DELAY_INTERVAL = 120.seconds.to_i - MIGRATION = 'SyncBlockingIssuesCount' - - disable_ddl_transaction! - - class TmpIssueLink < ActiveRecord::Base - self.table_name = 'issue_links' - - include EachBatch - end - - def up - return unless Gitlab.ee? - - issue_link_ids = SortedSet.new - - TmpIssueLink.distinct.select(:source_id).where(link_type: 1).each_batch(of: 1000, column: :source_id) do |query| - issue_link_ids.merge(query.pluck(:source_id)) - end - - TmpIssueLink.distinct.select(:target_id).where(link_type: 2).each_batch(of: 1000, column: :target_id) do |query| - issue_link_ids.merge(query.pluck(:target_id)) - end - - issue_link_ids.each_slice(BATCH_SIZE).with_index do |items, index| - start_id, *, end_id = items - - arguments = [start_id, end_id] - - final_delay = DELAY_INTERVAL * (index + 1) - migrate_in(final_delay, MIGRATION, arguments) - end - end - - def down - # NO OP - end -end diff --git a/db/post_migrate/20201015073808_schedule_blocked_by_links_replacement.rb b/db/post_migrate/20201015073808_schedule_blocked_by_links_replacement.rb deleted file mode 100644 index dd8cbb57136..00000000000 --- a/db/post_migrate/20201015073808_schedule_blocked_by_links_replacement.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class ScheduleBlockedByLinksReplacement < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INTERVAL = 2.minutes - # at the time of writing there were 47600 blocked_by issues: - # estimated time is 48 batches * 2 minutes -> 100 minutes - BATCH_SIZE = 1000 - MIGRATION = 'ReplaceBlockedByLinks' - - disable_ddl_transaction! - - class IssueLink < ActiveRecord::Base - include EachBatch - - self.table_name = 'issue_links' - end - - def up - # no-op - # superseded by db/post_migrate/20201102073808_schedule_blocked_by_links_replacement_second_try.rb - end - - def down - end -end diff --git a/db/post_migrate/20201015154527_add_index_on_services_for_usage_data.rb b/db/post_migrate/20201015154527_add_index_on_services_for_usage_data.rb deleted file mode 100644 index f85ab97420b..00000000000 --- a/db/post_migrate/20201015154527_add_index_on_services_for_usage_data.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnServicesForUsageData < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_services_on_type_id_when_active_and_project_id_not_null' - - disable_ddl_transaction! - - def up - add_concurrent_index :services, [:type, :id], where: 'active = TRUE AND project_id IS NOT NULL', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :services, INDEX_NAME - end -end diff --git a/db/post_migrate/20201019094741_rename_sitemap_root_namespaces.rb b/db/post_migrate/20201019094741_rename_sitemap_root_namespaces.rb deleted file mode 100644 index 20812a53bfb..00000000000 --- a/db/post_migrate/20201019094741_rename_sitemap_root_namespaces.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class RenameSitemapRootNamespaces < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - include Gitlab::Database::RenameReservedPathsMigration::V1 - - DOWNTIME = false - - disable_ddl_transaction! - - # We're taking over the /sitemap.xml and /sitemap.xml.gz namespaces - # since they're necessary for the default behavior of Sitemaps - def up - disable_statement_timeout do - rename_root_paths(['sitemap.xml', 'sitemap.xml.gz']) - end - end - - def down - disable_statement_timeout do - revert_renames - end - end -end diff --git a/db/post_migrate/20201020102551_remove_index_service_for_usage_data.rb b/db/post_migrate/20201020102551_remove_index_service_for_usage_data.rb deleted file mode 100644 index a0d39ecd2c1..00000000000 --- a/db/post_migrate/20201020102551_remove_index_service_for_usage_data.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexServiceForUsageData < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_services_on_type_id_when_active_not_instance_not_template' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :services, INDEX_NAME - end - - def down - add_concurrent_index :services, [:type, :id], where: 'active = TRUE AND instance = FALSE AND template = FALSE', name: INDEX_NAME - end -end diff --git a/db/post_migrate/20201026051643_remove_scanned_resources_count_from_security_scans.rb b/db/post_migrate/20201026051643_remove_scanned_resources_count_from_security_scans.rb deleted file mode 100644 index 208448e2278..00000000000 --- a/db/post_migrate/20201026051643_remove_scanned_resources_count_from_security_scans.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RemoveScannedResourcesCountFromSecurityScans < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - remove_column :security_scans, :scanned_resources_count - end - - def down - add_column :security_scans, :scanned_resources_count, :integer - end -end diff --git a/db/post_migrate/20201026182253_schedule_populate_vulnerability_feedback_pipeline_id.rb b/db/post_migrate/20201026182253_schedule_populate_vulnerability_feedback_pipeline_id.rb deleted file mode 100644 index 2df475ab2a8..00000000000 --- a/db/post_migrate/20201026182253_schedule_populate_vulnerability_feedback_pipeline_id.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class SchedulePopulateVulnerabilityFeedbackPipelineId < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INTERVAL = 2.minutes.to_i - BATCH_SIZE = 100 - MIGRATION = 'PopulateVulnerabilityFeedbackPipelineId' - - disable_ddl_transaction! - - def up - return unless Gitlab.ee? - - vulnerability_feedback = exec_query <<~SQL - SELECT DISTINCT "vulnerability_feedback"."project_id" - FROM "vulnerability_feedback" - WHERE "vulnerability_feedback"."pipeline_id" IS NULL - ORDER BY "vulnerability_feedback"."project_id" ASC - SQL - - return if vulnerability_feedback.rows.blank? - - vulnerability_feedback.rows.flatten.in_groups_of(BATCH_SIZE, false).each_with_index do |project_ids, index| - migrate_in(index * INTERVAL, MIGRATION, [project_ids]) - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20201026185514_ensure_u2f_registrations_migrated.rb b/db/post_migrate/20201026185514_ensure_u2f_registrations_migrated.rb deleted file mode 100644 index bb1ac3dee4c..00000000000 --- a/db/post_migrate/20201026185514_ensure_u2f_registrations_migrated.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class EnsureU2fRegistrationsMigrated < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - BACKGROUND_MIGRATION_CLASS = 'MigrateU2fWebauthn' - BATCH_SIZE = 100 - DOWNTIME = false - - disable_ddl_transaction! - - class U2fRegistration < ActiveRecord::Base - include EachBatch - - self.table_name = 'u2f_registrations' - end - - def up - Gitlab::BackgroundMigration.steal(BACKGROUND_MIGRATION_CLASS) - - # Do a manual update in case we lost BG jobs. The expected record count should be 0 or very low. - U2fRegistration - .joins("LEFT JOIN webauthn_registrations ON webauthn_registrations.u2f_registration_id = u2f_registrations.id") - .where(webauthn_registrations: { u2f_registration_id: nil }) - .each_batch(of: BATCH_SIZE) do |batch, index| - batch.each do |record| - Gitlab::BackgroundMigration::MigrateU2fWebauthn.new.perform(record.id, record.id) - rescue StandardError => e - Gitlab::ErrorTracking.track_exception(e, u2f_registration_id: record.id) - end - end - end - - def down - # no-op (we can't "unsteal" migrations) - end -end diff --git a/db/post_migrate/20201028160832_schedule_populate_missing_dismissal_information_for_vulnerabilities.rb b/db/post_migrate/20201028160832_schedule_populate_missing_dismissal_information_for_vulnerabilities.rb deleted file mode 100644 index f358ea863db..00000000000 --- a/db/post_migrate/20201028160832_schedule_populate_missing_dismissal_information_for_vulnerabilities.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class SchedulePopulateMissingDismissalInformationForVulnerabilities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - BATCH_SIZE = 1_000 - DELAY_INTERVAL = 3.minutes.to_i - MIGRATION_CLASS = 'PopulateMissingVulnerabilityDismissalInformation' - - disable_ddl_transaction! - - def up - ::Gitlab::BackgroundMigration::PopulateMissingVulnerabilityDismissalInformation::Vulnerability.broken.each_batch(of: BATCH_SIZE) do |batch, index| - vulnerability_ids = batch.pluck(:id) - migrate_in(index * DELAY_INTERVAL, MIGRATION_CLASS, vulnerability_ids) - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20201028182809_backfill_jira_tracker_deployment_type2.rb b/db/post_migrate/20201028182809_backfill_jira_tracker_deployment_type2.rb deleted file mode 100644 index 63a0554433c..00000000000 --- a/db/post_migrate/20201028182809_backfill_jira_tracker_deployment_type2.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class BackfillJiraTrackerDeploymentType2 < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - MIGRATION = 'BackfillJiraTrackerDeploymentType2' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 1000 - - disable_ddl_transaction! - - class JiraTrackerData < ActiveRecord::Base - include EachBatch - - self.table_name = 'jira_tracker_data' - end - - def up - queue_background_migration_jobs_by_range_at_intervals( - JiraTrackerData.where(deployment_type: 0), - MIGRATION, - DELAY_INTERVAL, - batch_size: BATCH_SIZE, - track_jobs: true) - end - - def down - # NOOP - end -end diff --git a/db/post_migrate/20201029052241_migrate_geo_blob_verification_primary_worker_sidekiq_queue.rb b/db/post_migrate/20201029052241_migrate_geo_blob_verification_primary_worker_sidekiq_queue.rb deleted file mode 100644 index 64d22863389..00000000000 --- a/db/post_migrate/20201029052241_migrate_geo_blob_verification_primary_worker_sidekiq_queue.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -# See https://docs.gitlab.com/ee/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class MigrateGeoBlobVerificationPrimaryWorkerSidekiqQueue < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - sidekiq_queue_migrate 'geo:geo_blob_verification_primary', to: 'geo:geo_verification' - end - - def down - sidekiq_queue_migrate 'geo:geo_verification', to: 'geo:geo_blob_verification_primary' - end -end diff --git a/db/post_migrate/20201029144157_cleanup_application_settings_to_allow_deny_rename.rb b/db/post_migrate/20201029144157_cleanup_application_settings_to_allow_deny_rename.rb deleted file mode 100644 index bb6fe4258c5..00000000000 --- a/db/post_migrate/20201029144157_cleanup_application_settings_to_allow_deny_rename.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CleanupApplicationSettingsToAllowDenyRename < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - def up - cleanup_concurrent_column_rename :application_settings, :domain_blacklist_enabled, :domain_denylist_enabled - cleanup_concurrent_column_rename :application_settings, :domain_blacklist, :domain_denylist - cleanup_concurrent_column_rename :application_settings, :domain_whitelist, :domain_allowlist - end - - def down - undo_cleanup_concurrent_column_rename :application_settings, :domain_blacklist_enabled, :domain_denylist_enabled - undo_cleanup_concurrent_column_rename :application_settings, :domain_blacklist, :domain_denylist - undo_cleanup_concurrent_column_rename :application_settings, :domain_whitelist, :domain_allowlist - end -end diff --git a/db/post_migrate/20201030121314_schedule_update_existing_users_that_require_two_factor_auth.rb b/db/post_migrate/20201030121314_schedule_update_existing_users_that_require_two_factor_auth.rb deleted file mode 100644 index 6a031c28ed7..00000000000 --- a/db/post_migrate/20201030121314_schedule_update_existing_users_that_require_two_factor_auth.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# # frozen_string_literal: true - -class ScheduleUpdateExistingUsersThatRequireTwoFactorAuth < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - MIGRATION = 'UpdateExistingUsersThatRequireTwoFactorAuth' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 1000 - INDEX_NAME = 'index_users_on_require_two_factor_authentication_from_group' - - disable_ddl_transaction! - - class User < ActiveRecord::Base - include EachBatch - - self.table_name = 'users' - end - - def up - add_concurrent_index :users, - :require_two_factor_authentication_from_group, - where: 'require_two_factor_authentication_from_group = TRUE', - name: INDEX_NAME - - relation = User.where(require_two_factor_authentication_from_group: true) - - queue_background_migration_jobs_by_range_at_intervals( - relation, MIGRATION, DELAY_INTERVAL, batch_size: BATCH_SIZE) - end - - def down - remove_concurrent_index_by_name :users, INDEX_NAME - end -end diff --git a/db/post_migrate/20201030203854_backfill_design_iids.rb b/db/post_migrate/20201030203854_backfill_design_iids.rb deleted file mode 100644 index 7acca6ad93d..00000000000 --- a/db/post_migrate/20201030203854_backfill_design_iids.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class BackfillDesignIids < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - class Designs < ActiveRecord::Base - include EachBatch - - self.table_name = 'design_management_designs' - end - - def up - backfill = ::Gitlab::BackgroundMigration::BackfillDesignInternalIds.new(Designs) - - Designs.select(:project_id).distinct.each_batch(of: 100, column: :project_id) do |relation| - backfill.perform(relation) - end - end - - def down - # NOOP - end -end diff --git a/db/post_migrate/20201102073808_schedule_blocked_by_links_replacement_second_try.rb b/db/post_migrate/20201102073808_schedule_blocked_by_links_replacement_second_try.rb deleted file mode 100644 index 217d4f81d26..00000000000 --- a/db/post_migrate/20201102073808_schedule_blocked_by_links_replacement_second_try.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class ScheduleBlockedByLinksReplacementSecondTry < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INTERVAL = 2.minutes - # at the time of writing there were 12931 blocked_by issues: - # estimated time is 13 batches * 2 minutes -> 26 minutes - BATCH_SIZE = 1000 - MIGRATION = 'ReplaceBlockedByLinks' - - disable_ddl_transaction! - - class IssueLink < ActiveRecord::Base - include EachBatch - - self.table_name = 'issue_links' - end - - def up - relation = IssueLink.where(link_type: 2) - - queue_background_migration_jobs_by_range_at_intervals( - relation, MIGRATION, INTERVAL, batch_size: BATCH_SIZE) - end - - def down - end -end diff --git a/db/post_migrate/20201102112206_rename_sitemap_namespace.rb b/db/post_migrate/20201102112206_rename_sitemap_namespace.rb deleted file mode 100644 index b2e610d68db..00000000000 --- a/db/post_migrate/20201102112206_rename_sitemap_namespace.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class RenameSitemapNamespace < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - include Gitlab::Database::RenameReservedPathsMigration::V1 - - DOWNTIME = false - - disable_ddl_transaction! - - # We're taking over the /sitemap namespace - # since it's necessary for the default behavior of Sitemaps - def up - disable_statement_timeout do - rename_root_paths(['sitemap']) - end - end - - def down - disable_statement_timeout do - revert_renames - end - end -end diff --git a/db/post_migrate/20201102114018_remove_storage_size_limit_from_application_settings.rb b/db/post_migrate/20201102114018_remove_storage_size_limit_from_application_settings.rb deleted file mode 100644 index 6646cf2ad0c..00000000000 --- a/db/post_migrate/20201102114018_remove_storage_size_limit_from_application_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RemoveStorageSizeLimitFromApplicationSettings < ActiveRecord::Migration[6.0] - DOWNTIME = false - - def up - remove_column :application_settings, :namespace_storage_size_limit - end - - def down - add_column :application_settings, :namespace_storage_size_limit, :bigint, default: 0 - end -end diff --git a/db/post_migrate/20201102152554_add_not_null_check_on_iid_on_design_manangement_designs.rb b/db/post_migrate/20201102152554_add_not_null_check_on_iid_on_design_manangement_designs.rb deleted file mode 100644 index 861a0c3c27a..00000000000 --- a/db/post_migrate/20201102152554_add_not_null_check_on_iid_on_design_manangement_designs.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullCheckOnIidOnDesignManangementDesigns < ActiveRecord::Migration[6.0] - include ::Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_not_null_constraint(:design_management_designs, :iid) - end - - def down - remove_not_null_constraint(:design_management_designs, :iid) - end -end diff --git a/db/post_migrate/20201102152945_truncate_security_findings_table.rb b/db/post_migrate/20201102152945_truncate_security_findings_table.rb deleted file mode 100644 index 8bfaa31f0de..00000000000 --- a/db/post_migrate/20201102152945_truncate_security_findings_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class TruncateSecurityFindingsTable < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - def up - return unless Gitlab.dev_env_or_com? - - with_lock_retries do - connection.execute('TRUNCATE security_findings RESTART IDENTITY') - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20201103013242_remove_terraform_state_verification_columns.rb b/db/post_migrate/20201103013242_remove_terraform_state_verification_columns.rb deleted file mode 100644 index b1cd9790ead..00000000000 --- a/db/post_migrate/20201103013242_remove_terraform_state_verification_columns.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class RemoveTerraformStateVerificationColumns < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - transaction do - remove_column :terraform_states, :verification_retry_at, :datetime_with_timezone - remove_column :terraform_states, :verified_at, :datetime_with_timezone - remove_column :terraform_states, :verification_retry_count, :integer, limit: 2 - remove_column :terraform_states, :verification_checksum, :binary, using: 'verification_checksum::bytea' - remove_column :terraform_states, :verification_failure, :text - end - end - - def down - add_column(:terraform_states, :verification_retry_at, :datetime_with_timezone) unless column_exists?(:terraform_states, :verification_retry_at) - add_column(:terraform_states, :verified_at, :datetime_with_timezone) unless column_exists?(:terraform_states, :verified_at) - add_column(:terraform_states, :verification_retry_count, :integer, limit: 2) unless column_exists?(:terraform_states, :verification_retry_count) - add_column(:terraform_states, :verification_checksum, :binary, using: 'verification_checksum::bytea') unless column_exists?(:terraform_states, :verification_checksum) - add_column(:terraform_states, :verification_failure, :text) unless column_exists?(:terraform_states, :verification_failure) - - add_text_limit :terraform_states, :verification_failure, 255 - end -end diff --git a/db/post_migrate/20201103110018_schedule_merge_request_cleanup_schedules_backfill.rb b/db/post_migrate/20201103110018_schedule_merge_request_cleanup_schedules_backfill.rb deleted file mode 100644 index 77057205b09..00000000000 --- a/db/post_migrate/20201103110018_schedule_merge_request_cleanup_schedules_backfill.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class ScheduleMergeRequestCleanupSchedulesBackfill < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - MIGRATION = 'BackfillMergeRequestCleanupSchedules' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 10_000 - TEMP_INDEX_NAME = 'merge_requests_state_id_temp_index' - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_requests, :id, name: TEMP_INDEX_NAME, where: "state_id IN (2, 3)" - - eligible_mrs = Gitlab::BackgroundMigration::BackfillMergeRequestCleanupSchedules::MergeRequest.eligible - - queue_background_migration_jobs_by_range_at_intervals( - eligible_mrs, - MIGRATION, - DELAY_INTERVAL, - batch_size: BATCH_SIZE - ) - end - - def down - remove_concurrent_index_by_name :merge_requests, TEMP_INDEX_NAME - end -end diff --git a/db/post_migrate/20201103192526_schedule_populate_has_vulnerabilities.rb b/db/post_migrate/20201103192526_schedule_populate_has_vulnerabilities.rb deleted file mode 100644 index bed90af09dc..00000000000 --- a/db/post_migrate/20201103192526_schedule_populate_has_vulnerabilities.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class SchedulePopulateHasVulnerabilities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - BATCH_SIZE = 1_000 - DELAY_INTERVAL = 2.minutes - MIGRATION_CLASS = 'PopulateHasVulnerabilities' - - disable_ddl_transaction! - - def up - Gitlab::BackgroundMigration::PopulateHasVulnerabilities::Vulnerability.distinct.each_batch(of: BATCH_SIZE, column: :project_id) do |batch, index| - project_ids = batch.pluck(:project_id) - - migrate_in(index * DELAY_INTERVAL, MIGRATION_CLASS, project_ids) - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20201104124300_ensure_namespace_settings_creation.rb b/db/post_migrate/20201104124300_ensure_namespace_settings_creation.rb deleted file mode 100644 index 08f92d21f44..00000000000 --- a/db/post_migrate/20201104124300_ensure_namespace_settings_creation.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class EnsureNamespaceSettingsCreation < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - BATCH_SIZE = 10000 - MIGRATION = 'BackfillNamespaceSettings' - DELAY_INTERVAL = 2.minutes.to_i - - disable_ddl_transaction! - - class Namespace < ActiveRecord::Base - include EachBatch - - self.table_name = 'namespaces' - end - - def up - ensure_data_migration - end - - def down - # no-op - end - - private - - def ensure_data_migration - Namespace.each_batch(of: BATCH_SIZE) do |query, index| - missing_count = query.where("NOT EXISTS (SELECT 1 FROM namespace_settings WHERE namespace_settings.namespace_id=namespaces.id)").limit(1).size - - if missing_count > 0 - ids_range = query.pluck("MIN(id), MAX(id)").flatten - - migrate_in(index * DELAY_INTERVAL, MIGRATION, ids_range) - end - end - end -end diff --git a/db/post_migrate/20201106082723_add_merge_request_jira_reference_indexes.rb b/db/post_migrate/20201106082723_add_merge_request_jira_reference_indexes.rb deleted file mode 100644 index d69f57c6088..00000000000 --- a/db/post_migrate/20201106082723_add_merge_request_jira_reference_indexes.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -class AddMergeRequestJiraReferenceIndexes < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - DESCRIPTION_INDEX_NAME = 'index_merge_requests_on_target_project_id_iid_jira_description' - TITLE_INDEX_NAME = 'index_merge_requests_on_target_project_id_and_iid_jira_title' - - JIRA_KEY_REGEX = '[A-Z][A-Z_0-9]+-\d+' - - disable_ddl_transaction! - - def up - add_concurrent_index( - :merge_requests, - [:target_project_id, :iid], - name: TITLE_INDEX_NAME, - using: :btree, - where: "(merge_requests.title)::text ~ '#{JIRA_KEY_REGEX}'::text" - ) - - add_concurrent_index( - :merge_requests, - [:target_project_id, :iid], - name: DESCRIPTION_INDEX_NAME, - using: :btree, - where: "(merge_requests.description)::text ~ '#{JIRA_KEY_REGEX}'::text" - ) - end - - def down - remove_concurrent_index_by_name( - :merge_requests, - TITLE_INDEX_NAME - ) - - remove_concurrent_index_by_name( - :merge_requests, - DESCRIPTION_INDEX_NAME - ) - end -end diff --git a/db/post_migrate/20201106134950_deduplicate_epic_iids.rb b/db/post_migrate/20201106134950_deduplicate_epic_iids.rb deleted file mode 100644 index 8fddc81057b..00000000000 --- a/db/post_migrate/20201106134950_deduplicate_epic_iids.rb +++ /dev/null @@ -1,121 +0,0 @@ -# frozen_string_literal: true - -class DeduplicateEpicIids < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INDEX_NAME = 'index_epics_on_group_id_and_iid' - - disable_ddl_transaction! - - class Epic < ActiveRecord::Base - end - - class InternalId < ActiveRecord::Base - class << self - def generate_next(subject, scope, usage, init) - InternalIdGenerator.new(subject, scope, usage, init).generate - end - end - - # Increments #last_value and saves the record - # - # The operation locks the record and gathers a `ROW SHARE` lock (in PostgreSQL). - # As such, the increment is atomic and safe to be called concurrently. - def increment_and_save! - update_and_save { self.last_value = (last_value || 0) + 1 } - end - - private - - def update_and_save(&block) - lock! - yield - save! - last_value - end - end - - # See app/models/internal_id - class InternalIdGenerator - attr_reader :subject, :scope, :scope_attrs, :usage, :init - - def initialize(subject, scope, usage, init = nil) - @subject = subject - @scope = scope - @usage = usage - @init = init - - raise ArgumentError, 'Scope is not well-defined, need at least one column for scope (given: 0)' if scope.empty? || usage.to_s != 'epics' - end - - # Generates next internal id and returns it - # init: Block that gets called to initialize InternalId record if not present - # Make sure to not throw exceptions in the absence of records (if this is expected). - def generate - subject.transaction do - # Create a record in internal_ids if one does not yet exist - # and increment its last value - # - # Note this will acquire a ROW SHARE lock on the InternalId record - record.increment_and_save! - end - end - - def record - @record ||= (lookup || create_record) - end - - def lookup - InternalId.find_by(**scope, usage: usage_value) - end - - def usage_value - 4 # see Enums::InternalId - this is the value for epics - end - - # Create InternalId record for (scope, usage) combination, if it doesn't exist - # - # We blindly insert without synchronization. If another process - # was faster in doing this, we'll realize once we hit the unique key constraint - # violation. We can safely roll-back the nested transaction and perform - # a lookup instead to retrieve the record. - def create_record - raise ArgumentError, 'Cannot initialize without init!' unless init - - instance = subject.is_a?(::Class) ? nil : subject - - subject.transaction(requires_new: true) do # rubocop:disable Performance/ActiveRecordSubtransactions - InternalId.create!( - **scope, - usage: usage_value, - last_value: init.call(instance, scope) || 0 - ) - end - rescue ActiveRecord::RecordNotUnique - lookup - end - end - - def up - duplicate_epic_ids = ApplicationRecord.connection.execute('SELECT iid, group_id, COUNT(*) FROM epics GROUP BY iid, group_id HAVING COUNT(*) > 1;') - - duplicate_epic_ids.each do |dup| - Epic.where(iid: dup['iid'], group_id: dup['group_id']).last(dup['count'] - 1).each do |epic| - new_iid = InternalId.generate_next(epic, - { namespace_id: epic.group_id }, - :epics, ->(instance, _) { instance.class.where(group_id: epic.group_id).maximum(:iid) } - ) - - epic.update!(iid: new_iid) - end - end - - add_concurrent_index :epics, [:group_id, :iid], unique: true, name: INDEX_NAME - end - - def down - # only remove the index, as we do not want to create the duplicates back - remove_concurrent_index :epics, [:group_id, :iid], name: INDEX_NAME - end -end diff --git a/db/post_migrate/20201109114603_schedule_remove_inaccessible_epic_todos.rb b/db/post_migrate/20201109114603_schedule_remove_inaccessible_epic_todos.rb deleted file mode 100644 index 13d12675a28..00000000000 --- a/db/post_migrate/20201109114603_schedule_remove_inaccessible_epic_todos.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class ScheduleRemoveInaccessibleEpicTodos < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - INTERVAL = 2.minutes - BATCH_SIZE = 10 - MIGRATION = 'RemoveInaccessibleEpicTodos' - - disable_ddl_transaction! - - class Epic < ActiveRecord::Base - include EachBatch - end - - def up - return unless Gitlab.ee? - - relation = Epic.where(confidential: true) - - queue_background_migration_jobs_by_range_at_intervals( - relation, MIGRATION, INTERVAL, batch_size: BATCH_SIZE) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20201110161542_cleanup_transfered_projects_shared_runners.rb b/db/post_migrate/20201110161542_cleanup_transfered_projects_shared_runners.rb deleted file mode 100644 index 5e907092e83..00000000000 --- a/db/post_migrate/20201110161542_cleanup_transfered_projects_shared_runners.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class CleanupTransferedProjectsSharedRunners < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - BATCH_SIZE = 25_000 - INTERVAL = 3.minutes - MIGRATION = 'ResetSharedRunnersForTransferredProjects' - - disable_ddl_transaction! - - class Namespace < ActiveRecord::Base - include EachBatch - - self.table_name = 'namespaces' - end - - def up - queue_background_migration_jobs_by_range_at_intervals(Namespace, - MIGRATION, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # This migration fixes an inconsistent database state resulting from https://gitlab.com/gitlab-org/gitlab/-/issues/271728 - # and as such does not require a down migration - end -end diff --git a/db/post_migrate/20201112130710_schedule_remove_duplicate_vulnerabilities_findings.rb b/db/post_migrate/20201112130710_schedule_remove_duplicate_vulnerabilities_findings.rb deleted file mode 100644 index d05516bd255..00000000000 --- a/db/post_migrate/20201112130710_schedule_remove_duplicate_vulnerabilities_findings.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -class ScheduleRemoveDuplicateVulnerabilitiesFindings < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - INDEX_NAME = 'tmp_idx_deduplicate_vulnerability_occurrences' - - MIGRATION = 'RemoveDuplicateVulnerabilitiesFindings' - DELAY_INTERVAL = 2.minutes.to_i - BATCH_SIZE = 5_000 - - disable_ddl_transaction! - - class VulnerabilitiesFinding < ActiveRecord::Base - include ::EachBatch - self.table_name = "vulnerability_occurrences" - end - - def up - add_concurrent_index :vulnerability_occurrences, - %i[project_id report_type location_fingerprint primary_identifier_id id], - name: INDEX_NAME - - say "Scheduling #{MIGRATION} jobs" - queue_background_migration_jobs_by_range_at_intervals( - VulnerabilitiesFinding, - MIGRATION, - DELAY_INTERVAL, - batch_size: BATCH_SIZE - ) - end - - def down - remove_concurrent_index_by_name(:vulnerability_occurrences, INDEX_NAME) - end -end diff --git a/db/post_migrate/20201112130715_schedule_recalculate_uuid_on_vulnerabilities_occurrences.rb b/db/post_migrate/20201112130715_schedule_recalculate_uuid_on_vulnerabilities_occurrences.rb deleted file mode 100644 index 7bb97a39bda..00000000000 --- a/db/post_migrate/20201112130715_schedule_recalculate_uuid_on_vulnerabilities_occurrences.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class ScheduleRecalculateUuidOnVulnerabilitiesOccurrences < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - MIGRATION = 'RecalculateVulnerabilitiesOccurrencesUuid' - DELAY_INTERVAL = 2.minutes.to_i - BATCH_SIZE = 2_500 - - disable_ddl_transaction! - - class VulnerabilitiesFinding < ActiveRecord::Base - include ::EachBatch - - self.table_name = "vulnerability_occurrences" - end - - def up - # Make sure that RemoveDuplicateVulnerabilitiesFindings has finished running - # so that we don't run into duplicate UUID issues - Gitlab::BackgroundMigration.steal('RemoveDuplicateVulnerabilitiesFindings') - - say "Scheduling #{MIGRATION} jobs" - queue_background_migration_jobs_by_range_at_intervals( - VulnerabilitiesFinding, - MIGRATION, - DELAY_INTERVAL, - batch_size: BATCH_SIZE - ) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20201112145311_add_index_on_sha_for_initial_deployments.rb b/db/post_migrate/20201112145311_add_index_on_sha_for_initial_deployments.rb deleted file mode 100644 index 15debddb9cc..00000000000 --- a/db/post_migrate/20201112145311_add_index_on_sha_for_initial_deployments.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnShaForInitialDeployments < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - NEW_INDEX_NAME = 'index_deployments_on_environment_status_sha' - OLD_INDEX_NAME = 'index_deployments_on_environment_id_and_status' - - disable_ddl_transaction! - - def up - add_concurrent_index :deployments, %i[environment_id status sha], name: NEW_INDEX_NAME - remove_concurrent_index_by_name :deployments, OLD_INDEX_NAME - end - - def down - add_concurrent_index :deployments, %i[environment_id status], name: OLD_INDEX_NAME - remove_concurrent_index_by_name :services, NEW_INDEX_NAME - end -end diff --git a/db/post_migrate/20201113105000_update_index_secure_for_api_fuzzing_telemetry.rb b/db/post_migrate/20201113105000_update_index_secure_for_api_fuzzing_telemetry.rb deleted file mode 100644 index 9e8313f79f8..00000000000 --- a/db/post_migrate/20201113105000_update_index_secure_for_api_fuzzing_telemetry.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class UpdateIndexSecureForApiFuzzingTelemetry < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - disable_ddl_transaction! - - OLD_SECURE_INDEX_NAME = 'index_secure_ci_builds_on_user_id_created_at_parser_features' - NEW_SECURE_INDEX_NAME = 'index_secure_ci_builds_on_user_id_name_created_at' - - def up - add_concurrent_index(:ci_builds, - [:user_id, :name, :created_at], - where: "(((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('apifuzzer_fuzz'::character varying)::text, ('apifuzzer_fuzz_dnd'::character varying)::text, ('secret_detection'::character varying)::text])))", - name: NEW_SECURE_INDEX_NAME) - remove_concurrent_index_by_name :ci_builds, OLD_SECURE_INDEX_NAME - end - - def down - add_concurrent_index(:ci_builds, - [:user_id, :created_at], - where: "(((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text])))", - name: OLD_SECURE_INDEX_NAME) - remove_concurrent_index_by_name :ci_builds, NEW_SECURE_INDEX_NAME - end -end diff --git a/db/post_migrate/20201119092319_schedule_repopulate_historical_vulnerability_statistics.rb b/db/post_migrate/20201119092319_schedule_repopulate_historical_vulnerability_statistics.rb deleted file mode 100644 index 598cc4d93d0..00000000000 --- a/db/post_migrate/20201119092319_schedule_repopulate_historical_vulnerability_statistics.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class ScheduleRepopulateHistoricalVulnerabilityStatistics < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - BATCH_SIZE = 50 - DELAY_INTERVAL = 5.minutes - MIGRATION_CLASS = 'PopulateVulnerabilityHistoricalStatistics' - DAY_COUNT = 365 - - disable_ddl_transaction! - - class ProjectSetting < ActiveRecord::Base - include EachBatch - - self.table_name = 'project_settings' - - scope :has_vulnerabilities, -> { where('has_vulnerabilities IS TRUE') } - end - - def up - ProjectSetting.has_vulnerabilities.each_batch(of: BATCH_SIZE) do |batch, index| - migrate_in(index * DELAY_INTERVAL, MIGRATION_CLASS, [batch.pluck(:project_id), DAY_COUNT]) - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20201120071303_drop_feature_filter_type_from_user_preferences.rb b/db/post_migrate/20201120071303_drop_feature_filter_type_from_user_preferences.rb deleted file mode 100644 index b00ea0aba76..00000000000 --- a/db/post_migrate/20201120071303_drop_feature_filter_type_from_user_preferences.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class DropFeatureFilterTypeFromUserPreferences < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - with_lock_retries do - remove_column :user_preferences, :feature_filter_type - end - end - - def down - with_lock_retries do - add_column :user_preferences, :feature_filter_type, :bigint - end - end -end diff --git a/db/post_migrate/20201120140210_add_runner_id_and_id_desc_index_to_ci_builds.rb b/db/post_migrate/20201120140210_add_runner_id_and_id_desc_index_to_ci_builds.rb deleted file mode 100644 index 5eda0e25dbe..00000000000 --- a/db/post_migrate/20201120140210_add_runner_id_and_id_desc_index_to_ci_builds.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddRunnerIdAndIdDescIndexToCiBuilds < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - NEW_INDEX = 'index_ci_builds_on_runner_id_and_id_desc' - OLD_INDEX = 'index_ci_builds_on_runner_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :ci_builds, %i[runner_id id], name: NEW_INDEX, order: { id: :desc } - remove_concurrent_index_by_name :ci_builds, OLD_INDEX - end - - def down - add_concurrent_index :ci_builds, %i[runner_id], name: OLD_INDEX - remove_concurrent_index_by_name :ci_builds, NEW_INDEX - end -end diff --git a/db/post_migrate/20201124122817_populate_remaining_missing_dismissal_information_for_vulnerabilities.rb b/db/post_migrate/20201124122817_populate_remaining_missing_dismissal_information_for_vulnerabilities.rb deleted file mode 100644 index 9dc41d17231..00000000000 --- a/db/post_migrate/20201124122817_populate_remaining_missing_dismissal_information_for_vulnerabilities.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class PopulateRemainingMissingDismissalInformationForVulnerabilities < ActiveRecord::Migration[6.0] - DOWNTIME = false - - disable_ddl_transaction! - - def up - Gitlab::BackgroundMigration.steal('PopulateMissingVulnerabilityDismissalInformation') - - ::Gitlab::BackgroundMigration::PopulateMissingVulnerabilityDismissalInformation::Vulnerability.broken.each_batch(of: 100) do |batch, index| - vulnerability_ids = batch.pluck(:id) - - ::Gitlab::BackgroundMigration::PopulateMissingVulnerabilityDismissalInformation.new.perform(*vulnerability_ids) - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20201124185639_remove_unused_indexes.rb b/db/post_migrate/20201124185639_remove_unused_indexes.rb deleted file mode 100644 index c4b0d8a84cc..00000000000 --- a/db/post_migrate/20201124185639_remove_unused_indexes.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class RemoveUnusedIndexes < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :packages_package_files, "packages_packages_verification_failure_partial" - remove_concurrent_index_by_name :packages_package_files, "packages_packages_verification_checksum_partial" - remove_concurrent_index_by_name :snippet_repositories, 'snippet_repositories_verification_failure_partial' - remove_concurrent_index_by_name :snippet_repositories, 'snippet_repositories_verification_checksum_partial' - remove_concurrent_index_by_name :terraform_state_versions, 'terraform_state_versions_verification_failure_partial' - remove_concurrent_index_by_name :terraform_state_versions, 'terraform_state_versions_verification_checksum_partial' - end - - def down - add_concurrent_index :packages_package_files, :verification_failure, where: "(verification_failure IS NOT NULL)", name: "packages_packages_verification_failure_partial" - add_concurrent_index :packages_package_files, :verification_checksum, where: "(verification_checksum IS NOT NULL)", name: "packages_packages_verification_checksum_partial" - add_concurrent_index :snippet_repositories, :verification_failure, where: "(verification_failure IS NOT NULL)", name: 'snippet_repositories_verification_failure_partial' - add_concurrent_index :snippet_repositories, :verification_checksum, where: "(verification_checksum IS NOT NULL)", name: 'snippet_repositories_verification_checksum_partial' - add_concurrent_index :terraform_state_versions, :verification_failure, where: "(verification_failure IS NOT NULL)", name: 'terraform_state_versions_verification_failure_partial' - add_concurrent_index :terraform_state_versions, :verification_checksum, where: "(verification_checksum IS NOT NULL)", name: 'terraform_state_versions_verification_checksum_partial' - end -end diff --git a/db/post_migrate/20201128210234_schedule_populate_issue_email_participants.rb b/db/post_migrate/20201128210234_schedule_populate_issue_email_participants.rb deleted file mode 100644 index 6fea683944c..00000000000 --- a/db/post_migrate/20201128210234_schedule_populate_issue_email_participants.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class SchedulePopulateIssueEmailParticipants < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - BATCH_SIZE = 1_000 - DELAY_INTERVAL = 2.minutes - MIGRATION = 'PopulateIssueEmailParticipants' - - disable_ddl_transaction! - - class Issue < ActiveRecord::Base - include EachBatch - - self.table_name = 'issues' - end - - def up - queue_background_migration_jobs_by_range_at_intervals( - Issue.where.not(service_desk_reply_to: nil), - MIGRATION, - DELAY_INTERVAL, - batch_size: BATCH_SIZE - ) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20201130103926_schedule_populate_dismissed_state_for_vulnerabilities.rb b/db/post_migrate/20201130103926_schedule_populate_dismissed_state_for_vulnerabilities.rb deleted file mode 100644 index 5e8da532251..00000000000 --- a/db/post_migrate/20201130103926_schedule_populate_dismissed_state_for_vulnerabilities.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -class SchedulePopulateDismissedStateForVulnerabilities < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - TMP_INDEX_NAME = 'tmp_index_on_vulnerabilities_non_dismissed' - - DOWNTIME = false - BATCH_SIZE = 1_000 - VULNERABILITY_BATCH_SIZE = 5_000 - DELAY_INTERVAL = 3.minutes.to_i - MIGRATION_CLASS = 'PopulateDismissedStateForVulnerabilities' - - VULNERABILITY_JOIN_CONDITION = 'JOIN "vulnerability_occurrences" ON "vulnerability_occurrences"."vulnerability_id" = "vulnerabilities"."id"' - FEEDBACK_WHERE_CONDITION = <<~SQL - EXISTS (SELECT 1 FROM vulnerability_feedback - WHERE "vulnerability_occurrences"."project_id" = "vulnerability_feedback"."project_id" - AND "vulnerability_occurrences"."report_type" = "vulnerability_feedback"."category" - AND ENCODE("vulnerability_occurrences"."project_fingerprint", 'hex') = "vulnerability_feedback"."project_fingerprint" - AND "vulnerability_feedback"."feedback_type" = 0 - ) - SQL - - class Vulnerability < ActiveRecord::Base # rubocop:disable Style/Documentation - include EachBatch - - self.table_name = 'vulnerabilities' - end - - disable_ddl_transaction! - - def up - add_concurrent_index(:vulnerabilities, :id, where: 'state <> 2', name: TMP_INDEX_NAME) - - batch = [] - index = 1 - - Vulnerability.where('state <> 2').each_batch(of: VULNERABILITY_BATCH_SIZE) do |relation| - ids = relation - .joins(VULNERABILITY_JOIN_CONDITION) - .where(FEEDBACK_WHERE_CONDITION) - .pluck('vulnerabilities.id') - - ids.each do |id| - batch << id - - if batch.size == BATCH_SIZE - migrate_in(index * DELAY_INTERVAL, MIGRATION_CLASS, batch) - index += 1 - - batch.clear - end - end - end - - migrate_in(index * DELAY_INTERVAL, MIGRATION_CLASS, batch) unless batch.empty? - end - - def down - remove_concurrent_index_by_name(:vulnerabilities, TMP_INDEX_NAME) - end -end diff --git a/db/post_migrate/20201203123201_remove_orphan_service_hooks.rb b/db/post_migrate/20201203123201_remove_orphan_service_hooks.rb deleted file mode 100644 index c430e2205c2..00000000000 --- a/db/post_migrate/20201203123201_remove_orphan_service_hooks.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class RemoveOrphanServiceHooks < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - class WebHook < ActiveRecord::Base - include EachBatch - - self.table_name = 'web_hooks' - - def self.service_hooks - where(type: 'ServiceHook') - end - end - - class Service < ActiveRecord::Base - self.table_name = 'services' - end - - def up - WebHook.service_hooks.where.not(service_id: Service.select(:id)).where.not(service_id: nil).each_batch do |relation| - relation.delete_all - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20201207151651_truncate_security_findings_table_2.rb b/db/post_migrate/20201207151651_truncate_security_findings_table_2.rb deleted file mode 100644 index 2ac6941be6d..00000000000 --- a/db/post_migrate/20201207151651_truncate_security_findings_table_2.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -require_relative Rails.root.join('db', 'post_migrate', '20201102152945_truncate_security_findings_table.rb') - -# This is the second time we are truncating this table -# so the migration class name has choosen like this for this reason. -class TruncateSecurityFindingsTable2 < TruncateSecurityFindingsTable; end diff --git a/db/post_migrate/20201207165956_remove_duplicate_services.rb b/db/post_migrate/20201207165956_remove_duplicate_services.rb deleted file mode 100644 index 1659b9a2095..00000000000 --- a/db/post_migrate/20201207165956_remove_duplicate_services.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class RemoveDuplicateServices < ActiveRecord::Migration[6.0] - DOWNTIME = false - - disable_ddl_transaction! - - def up - # noop, replaced by 20210112143418_remove_duplicate_services.rb - end - - def down - end -end diff --git a/db/post_migrate/20201208175117_schedule_backfilling_artifact_expiry_migration.rb b/db/post_migrate/20201208175117_schedule_backfilling_artifact_expiry_migration.rb deleted file mode 100644 index 56db148afe6..00000000000 --- a/db/post_migrate/20201208175117_schedule_backfilling_artifact_expiry_migration.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -class ScheduleBackfillingArtifactExpiryMigration < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - SWITCH_DATE = Time.utc(2020, 6, 22).freeze - INDEX_NAME = 'expired_artifacts_temp_index' - INDEX_CONDITION = "expire_at IS NULL AND created_at < '#{SWITCH_DATE}'" - - disable_ddl_transaction! - - class JobArtifact < ActiveRecord::Base - include EachBatch - - self.table_name = 'ci_job_artifacts' - - scope :without_expiry_date, -> { where(expire_at: nil) } - scope :before_switch, -> { where('created_at < ?', SWITCH_DATE) } - end - - def up - # Create temporary index for expired artifacts - # Needs to be removed in a later migration - add_concurrent_index(:ci_job_artifacts, %i(id created_at), where: INDEX_CONDITION, name: INDEX_NAME) - - # queue_background_migration_jobs_by_range_at_intervals( - # JobArtifact.without_expiry_date.before_switch, - # ::Gitlab::BackgroundMigration::BackfillArtifactExpiryDate, - # 2.minutes, - # batch_size: 200_000 - # ) - # The scheduling code was using the full class symbol - # (`::Gitlab::BackgroundMigration::BackfillArtifactExpiryDate`) instead of a - # string with the class name (`BackfillArtifactExpiryDate`) by mistake, - # which resulted in an error. It is commented out so it's a no-op to prevent - # errors and will be reintroduced with - # https://gitlab.com/gitlab-org/gitlab/-/merge_requests/51822. - end - - def down - remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME - end -end diff --git a/db/post_migrate/20210622041846_finalize_push_event_payloads_bigint_conversion.rb b/db/post_migrate/20210622041846_finalize_push_event_payloads_bigint_conversion.rb index 38b081e3e5e..f37c446f66c 100644 --- a/db/post_migrate/20210622041846_finalize_push_event_payloads_bigint_conversion.rb +++ b/db/post_migrate/20210622041846_finalize_push_event_payloads_bigint_conversion.rb @@ -49,7 +49,7 @@ class FinalizePushEventPayloadsBigintConversion < ActiveRecord::Migration[6.1] # We need to update the trigger function in order to make PostgreSQL to # regenerate the execution plan for it. This is to avoid type mismatch errors like # "type of parameter 15 (bigint) does not match that when preparing the plan (integer)" - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name(:event_id, :event_id_convert_to_bigint) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name(:event_id, :event_id_convert_to_bigint) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" # Swap defaults diff --git a/db/post_migrate/20210622045705_finalize_events_bigint_conversion.rb b/db/post_migrate/20210622045705_finalize_events_bigint_conversion.rb index b99a61e8e63..715bc392c68 100644 --- a/db/post_migrate/20210622045705_finalize_events_bigint_conversion.rb +++ b/db/post_migrate/20210622045705_finalize_events_bigint_conversion.rb @@ -60,7 +60,7 @@ class FinalizeEventsBigintConversion < ActiveRecord::Migration[6.1] # We need to update the trigger function in order to make PostgreSQL to # regenerate the execution plan for it. This is to avoid type mismatch errors like # "type of parameter 15 (bigint) does not match that when preparing the plan (integer)" - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name(:id, :id_convert_to_bigint) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name(:id, :id_convert_to_bigint) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" # Swap defaults diff --git a/db/post_migrate/20210701033622_finalize_ci_builds_needs_bigint_conversion.rb b/db/post_migrate/20210701033622_finalize_ci_builds_needs_bigint_conversion.rb index baee9fb3848..89a39660a04 100644 --- a/db/post_migrate/20210701033622_finalize_ci_builds_needs_bigint_conversion.rb +++ b/db/post_migrate/20210701033622_finalize_ci_builds_needs_bigint_conversion.rb @@ -47,7 +47,7 @@ class FinalizeCiBuildsNeedsBigintConversion < ActiveRecord::Migration[6.1] # We need to update the trigger function in order to make PostgreSQL to # regenerate the execution plan for it. This is to avoid type mismatch errors like # "type of parameter 15 (bigint) does not match that when preparing the plan (integer)" - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name(:build_id, :build_id_convert_to_bigint) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name(:build_id, :build_id_convert_to_bigint) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" # Swap defaults diff --git a/db/post_migrate/20210701141346_finalize_ci_builds_stage_id_bigint_conversion.rb b/db/post_migrate/20210701141346_finalize_ci_builds_stage_id_bigint_conversion.rb index a8a9fe037ec..161366590be 100644 --- a/db/post_migrate/20210701141346_finalize_ci_builds_stage_id_bigint_conversion.rb +++ b/db/post_migrate/20210701141346_finalize_ci_builds_stage_id_bigint_conversion.rb @@ -46,7 +46,7 @@ class FinalizeCiBuildsStageIdBigintConversion < ActiveRecord::Migration[6.1] execute "ALTER TABLE #{quoted_table_name} RENAME COLUMN #{quote_column_name(temporary_name)} TO #{quote_column_name(:stage_id_convert_to_bigint)}" # Reset the function so PG drops the plan cache for the incorrect integer type - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection) .name([:id, :stage_id], [:id_convert_to_bigint, :stage_id_convert_to_bigint]) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" diff --git a/db/post_migrate/20210706212710_finalize_ci_job_artifacts_bigint_conversion.rb b/db/post_migrate/20210706212710_finalize_ci_job_artifacts_bigint_conversion.rb index 40977277bd1..11045348672 100644 --- a/db/post_migrate/20210706212710_finalize_ci_job_artifacts_bigint_conversion.rb +++ b/db/post_migrate/20210706212710_finalize_ci_job_artifacts_bigint_conversion.rb @@ -58,7 +58,7 @@ class FinalizeCiJobArtifactsBigintConversion < ActiveRecord::Migration[6.1] # We need to update the trigger function in order to make PostgreSQL to # regenerate the execution plan for it. This is to avoid type mismatch errors like # "type of parameter 15 (bigint) does not match that when preparing the plan (integer)" - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name([:id, :job_id], [:id_convert_to_bigint, :job_id_convert_to_bigint]) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name([:id, :job_id], [:id_convert_to_bigint, :job_id_convert_to_bigint]) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" # Swap defaults diff --git a/db/post_migrate/20210707210916_finalize_ci_stages_bigint_conversion.rb b/db/post_migrate/20210707210916_finalize_ci_stages_bigint_conversion.rb index 2e294a0b2e3..dbefbeb26cb 100644 --- a/db/post_migrate/20210707210916_finalize_ci_stages_bigint_conversion.rb +++ b/db/post_migrate/20210707210916_finalize_ci_stages_bigint_conversion.rb @@ -53,7 +53,7 @@ class FinalizeCiStagesBigintConversion < ActiveRecord::Migration[6.1] execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN #{id_convert_to_bigint_name} TO #{id_name}" execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN #{temp_name} TO #{id_convert_to_bigint_name}" - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name(:id, :id_convert_to_bigint) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name(:id, :id_convert_to_bigint) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" # Swap defaults diff --git a/db/post_migrate/20210708011426_finalize_ci_builds_metadata_bigint_conversion.rb b/db/post_migrate/20210708011426_finalize_ci_builds_metadata_bigint_conversion.rb index f75df04ba48..c2444ccbc6c 100644 --- a/db/post_migrate/20210708011426_finalize_ci_builds_metadata_bigint_conversion.rb +++ b/db/post_migrate/20210708011426_finalize_ci_builds_metadata_bigint_conversion.rb @@ -53,8 +53,8 @@ class FinalizeCiBuildsMetadataBigintConversion < Gitlab::Database::Migration[1.0 # We need to update the trigger function in order to make PostgreSQL to # regenerate the execution plan for it. This is to avoid type mismatch errors like # "type of parameter 15 (bigint) does not match that when preparing the plan (integer)" - execute "ALTER FUNCTION #{quote_table_name(Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name(:id, :id_convert_to_bigint))} RESET ALL" - execute "ALTER FUNCTION #{quote_table_name(Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name(:build_id, :build_id_convert_to_bigint))} RESET ALL" + execute "ALTER FUNCTION #{quote_table_name(Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name(:id, :id_convert_to_bigint))} RESET ALL" + execute "ALTER FUNCTION #{quote_table_name(Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name(:build_id, :build_id_convert_to_bigint))} RESET ALL" # Swap defaults for PK execute "ALTER SEQUENCE ci_builds_metadata_id_seq OWNED BY #{TABLE_NAME}.id" diff --git a/db/post_migrate/20210713042153_finalize_ci_sources_pipelines_bigint_conversion.rb b/db/post_migrate/20210713042153_finalize_ci_sources_pipelines_bigint_conversion.rb index 938c8c172a3..38b7852b320 100644 --- a/db/post_migrate/20210713042153_finalize_ci_sources_pipelines_bigint_conversion.rb +++ b/db/post_migrate/20210713042153_finalize_ci_sources_pipelines_bigint_conversion.rb @@ -47,7 +47,7 @@ class FinalizeCiSourcesPipelinesBigintConversion < ActiveRecord::Migration[6.1] # We need to update the trigger function in order to make PostgreSQL to # regenerate the execution plan for it. This is to avoid type mismatch errors like # "type of parameter 15 (bigint) does not match that when preparing the plan (integer)" - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name(:source_job_id, :source_job_id_convert_to_bigint) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name(:source_job_id, :source_job_id_convert_to_bigint) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" # No need to swap defaults, both columns have no default value diff --git a/db/post_migrate/20210714015537_finalize_ci_build_trace_chunks_bigint_conversion.rb b/db/post_migrate/20210714015537_finalize_ci_build_trace_chunks_bigint_conversion.rb index 9195b662776..af17b35d47d 100644 --- a/db/post_migrate/20210714015537_finalize_ci_build_trace_chunks_bigint_conversion.rb +++ b/db/post_migrate/20210714015537_finalize_ci_build_trace_chunks_bigint_conversion.rb @@ -45,7 +45,7 @@ class FinalizeCiBuildTraceChunksBigintConversion < ActiveRecord::Migration[6.1] # We need to update the trigger function in order to make PostgreSQL to # regenerate the execution plan for it. This is to avoid type mismatch errors like # "type of parameter 15 (bigint) does not match that when preparing the plan (integer)" - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name(:build_id, :build_id_convert_to_bigint) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name(:build_id, :build_id_convert_to_bigint) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" # Swap defaults diff --git a/db/post_migrate/20210722155635_finalize_convert_geo_job_artifact_deleted_events_bigint.rb b/db/post_migrate/20210722155635_finalize_convert_geo_job_artifact_deleted_events_bigint.rb index 7d3809a9dbe..5bf6a9e7911 100644 --- a/db/post_migrate/20210722155635_finalize_convert_geo_job_artifact_deleted_events_bigint.rb +++ b/db/post_migrate/20210722155635_finalize_convert_geo_job_artifact_deleted_events_bigint.rb @@ -44,7 +44,7 @@ class FinalizeConvertGeoJobArtifactDeletedEventsBigint < ActiveRecord::Migration change_column_default TABLE_NAME, COLUMN_NAME, nil change_column_default TABLE_NAME, COLUMN_NAME_CONVERTED, 0 - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name(COLUMN_NAME, COLUMN_NAME_CONVERTED) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name(COLUMN_NAME, COLUMN_NAME_CONVERTED) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" execute "DROP INDEX #{old_index_name}" diff --git a/db/post_migrate/20210802043253_finalize_push_event_payloads_bigint_conversion_3.rb b/db/post_migrate/20210802043253_finalize_push_event_payloads_bigint_conversion_3.rb index 4b825ae72ba..6dab29e10d4 100644 --- a/db/post_migrate/20210802043253_finalize_push_event_payloads_bigint_conversion_3.rb +++ b/db/post_migrate/20210802043253_finalize_push_event_payloads_bigint_conversion_3.rb @@ -61,7 +61,7 @@ class FinalizePushEventPayloadsBigintConversion3 < ActiveRecord::Migration[6.1] # We need to update the trigger function in order to make PostgreSQL to # regenerate the execution plan for it. This is to avoid type mismatch errors like # "type of parameter 15 (bigint) does not match that when preparing the plan (integer)" - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name(:event_id, :event_id_convert_to_bigint) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name(:event_id, :event_id_convert_to_bigint) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" # Swap defaults diff --git a/db/post_migrate/20210802131812_finalize_convert_deployments_bigint.rb b/db/post_migrate/20210802131812_finalize_convert_deployments_bigint.rb index 31afb7e0a29..067b7166cf3 100644 --- a/db/post_migrate/20210802131812_finalize_convert_deployments_bigint.rb +++ b/db/post_migrate/20210802131812_finalize_convert_deployments_bigint.rb @@ -35,7 +35,7 @@ class FinalizeConvertDeploymentsBigint < ActiveRecord::Migration[6.1] execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN #{quote_column_name(COLUMN_NAME_BIGINT)} TO #{quote_column_name(COLUMN_NAME)}" execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN #{quote_column_name(temp_name)} TO #{quote_column_name(COLUMN_NAME_BIGINT)}" - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name(COLUMN_NAME, COLUMN_NAME_BIGINT) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name(COLUMN_NAME, COLUMN_NAME_BIGINT) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" execute "DROP INDEX #{old_index_name}" diff --git a/db/post_migrate/20210805131510_finalize_ci_builds_runner_session_bigint_conversion.rb b/db/post_migrate/20210805131510_finalize_ci_builds_runner_session_bigint_conversion.rb index 9706f0036f3..5e18450f465 100644 --- a/db/post_migrate/20210805131510_finalize_ci_builds_runner_session_bigint_conversion.rb +++ b/db/post_migrate/20210805131510_finalize_ci_builds_runner_session_bigint_conversion.rb @@ -44,7 +44,7 @@ class FinalizeCiBuildsRunnerSessionBigintConversion < ActiveRecord::Migration[6. # We need to update the trigger function in order to make PostgreSQL to # regenerate the execution plan for it. This is to avoid type mismatch errors like # "type of parameter 15 (bigint) does not match that when preparing the plan (integer)" - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name(:build_id, :build_id_convert_to_bigint) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name(:build_id, :build_id_convert_to_bigint) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" # Swap defaults diff --git a/db/post_migrate/20210806131706_finalize_taggins_bigint_conversion.rb b/db/post_migrate/20210806131706_finalize_taggins_bigint_conversion.rb index bd76466d43a..5f094e48ed4 100644 --- a/db/post_migrate/20210806131706_finalize_taggins_bigint_conversion.rb +++ b/db/post_migrate/20210806131706_finalize_taggins_bigint_conversion.rb @@ -60,7 +60,7 @@ class FinalizeTagginsBigintConversion < ActiveRecord::Migration[6.1] # We need to update the trigger function in order to make PostgreSQL to # regenerate the execution plan for it. This is to avoid type mismatch errors like # "type of parameter 15 (bigint) does not match that when preparing the plan (integer)" - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name([:id, :taggable_id], [:id_convert_to_bigint, :taggable_id_convert_to_bigint]) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name([:id, :taggable_id], [:id_convert_to_bigint, :taggable_id_convert_to_bigint]) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" # Swap defaults diff --git a/db/post_migrate/20210809143931_finalize_job_id_conversion_to_bigint_for_ci_job_artifacts.rb b/db/post_migrate/20210809143931_finalize_job_id_conversion_to_bigint_for_ci_job_artifacts.rb index bb12045b1de..5cec6fa30b8 100644 --- a/db/post_migrate/20210809143931_finalize_job_id_conversion_to_bigint_for_ci_job_artifacts.rb +++ b/db/post_migrate/20210809143931_finalize_job_id_conversion_to_bigint_for_ci_job_artifacts.rb @@ -55,7 +55,7 @@ class FinalizeJobIdConversionToBigintForCiJobArtifacts < ActiveRecord::Migration # We need to update the trigger function in order to make PostgreSQL to # regenerate the execution plan for it. This is to avoid type mismatch errors like # "type of parameter 15 (bigint) does not match that when preparing the plan (integer)" - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME).name([:id, :job_id], [:id_convert_to_bigint, :job_id_convert_to_bigint]) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection).name([:id, :job_id], [:id_convert_to_bigint, :job_id_convert_to_bigint]) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" # Swap defaults diff --git a/db/post_migrate/20210824174615_prepare_ci_builds_metadata_and_ci_build_async_indexes.rb b/db/post_migrate/20210824174615_prepare_ci_builds_metadata_and_ci_build_async_indexes.rb index 0a0fda7e870..f63645b4ffa 100644 --- a/db/post_migrate/20210824174615_prepare_ci_builds_metadata_and_ci_build_async_indexes.rb +++ b/db/post_migrate/20210824174615_prepare_ci_builds_metadata_and_ci_build_async_indexes.rb @@ -42,7 +42,7 @@ class PrepareCiBuildsMetadataAndCiBuildAsyncIndexes < ActiveRecord::Migration[6. return if index_name_exists?(table_name, index_name) - async_index = Gitlab::Database::AsyncIndexes::PostgresAsyncIndex.safe_find_or_create_by!(name: index_name) do |rec| + async_index = Gitlab::Database::AsyncIndexes::PostgresAsyncIndex.find_or_create_by!(name: index_name) do |rec| rec.table_name = table_name rec.definition = definition end diff --git a/db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb b/db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb index 02f98833703..7544842c196 100644 --- a/db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb +++ b/db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb @@ -136,7 +136,7 @@ class FinalizeCiBuildsBigintConversion < Gitlab::Database::Migration[1.0] execute "ALTER TABLE #{quoted_table_name} RENAME COLUMN #{quote_column_name(temporary_name)} TO #{quote_column_name(:id_convert_to_bigint)}" # Reset the function so PG drops the plan cache for the incorrect integer type - function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME) + function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection) .name([:id, :stage_id], [:id_convert_to_bigint, :stage_id_convert_to_bigint]) execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL" diff --git a/db/post_migrate/20210923192648_remove_foreign_keys_from_open_project_data_table.rb b/db/post_migrate/20210923192648_remove_foreign_keys_from_open_project_data_table.rb new file mode 100644 index 00000000000..1da5aad0fab --- /dev/null +++ b/db/post_migrate/20210923192648_remove_foreign_keys_from_open_project_data_table.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class RemoveForeignKeysFromOpenProjectDataTable < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + with_lock_retries do + remove_foreign_key :open_project_tracker_data, column: :service_id + end + end + + def down + with_lock_retries do + add_foreign_key :open_project_tracker_data, :integrations, column: :service_id, on_delete: :cascade + end + end +end diff --git a/db/post_migrate/20210923192649_remove_open_project_data_table.rb b/db/post_migrate/20210923192649_remove_open_project_data_table.rb new file mode 100644 index 00000000000..252d7e07261 --- /dev/null +++ b/db/post_migrate/20210923192649_remove_open_project_data_table.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class RemoveOpenProjectDataTable < Gitlab::Database::Migration[1.0] + def up + drop_table :open_project_tracker_data + end + + def down + create_table :open_project_tracker_data do |t| + t.integer :service_id, index: { name: 'index_open_project_tracker_data_on_service_id' }, null: false + t.timestamps_with_timezone + t.string :encrypted_url, limit: 255 + t.string :encrypted_url_iv, limit: 255 + t.string :encrypted_api_url, limit: 255 + t.string :encrypted_api_url_iv, limit: 255 + t.string :encrypted_token, limit: 255 + t.string :encrypted_token_iv, limit: 255 + t.string :closed_status_id, limit: 5 + t.string :project_identifier_code, limit: 100 + end + end +end diff --git a/db/post_migrate/20210930211936_backfill_user_namespace.rb b/db/post_migrate/20210930211936_backfill_user_namespace.rb new file mode 100644 index 00000000000..c5dd170f18e --- /dev/null +++ b/db/post_migrate/20210930211936_backfill_user_namespace.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +class BackfillUserNamespace < Gitlab::Database::Migration[1.0] + MIGRATION = 'BackfillUserNamespace' + INTERVAL = 2.minutes + BATCH_SIZE = 1_000 + SUB_BATCH_SIZE = 200 + DOWNTIME = false + + def up + queue_batched_background_migration( + MIGRATION, + :namespaces, + :id, + job_interval: INTERVAL, + batch_size: BATCH_SIZE, + sub_batch_size: SUB_BATCH_SIZE + ) + end + + def down + Gitlab::Database::BackgroundMigration::BatchedMigration + .for_configuration(MIGRATION, :namespaces, :id, []) + .delete_all + end +end diff --git a/db/post_migrate/20211004120135_schedule_add_primary_email_to_emails_if_user_confirmed.rb b/db/post_migrate/20211004120135_schedule_add_primary_email_to_emails_if_user_confirmed.rb new file mode 100644 index 00000000000..d7b213b384a --- /dev/null +++ b/db/post_migrate/20211004120135_schedule_add_primary_email_to_emails_if_user_confirmed.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +class ScheduleAddPrimaryEmailToEmailsIfUserConfirmed < Gitlab::Database::Migration[1.0] + INTERVAL = 2.minutes.to_i + BATCH_SIZE = 10_000 + MIGRATION = 'AddPrimaryEmailToEmailsIfUserConfirmed' + + disable_ddl_transaction! + + class User < ActiveRecord::Base + include ::EachBatch + + self.table_name = 'users' + self.inheritance_column = :_type_disabled + end + + def up + queue_background_migration_jobs_by_range_at_intervals( + User, + MIGRATION, + INTERVAL, + batch_size: BATCH_SIZE, + track_jobs: true + ) + end + + def down + # intentionally blank + end +end diff --git a/db/post_migrate/20211005194425_schedule_requirements_migration.rb b/db/post_migrate/20211005194425_schedule_requirements_migration.rb new file mode 100644 index 00000000000..56211989b8e --- /dev/null +++ b/db/post_migrate/20211005194425_schedule_requirements_migration.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +class ScheduleRequirementsMigration < Gitlab::Database::Migration[1.0] + DOWNTIME = false + + # 2021-10-05 requirements count: ~12500 + # + # Using 30 as batch size and 120 seconds default interval will produce: + # ~420 jobs - taking ~14 hours to perform + BATCH_SIZE = 30 + + MIGRATION = 'MigrateRequirementsToWorkItems' + + disable_ddl_transaction! + + class Requirement < ActiveRecord::Base + include EachBatch + + self.table_name = 'requirements' + end + + def up + queue_background_migration_jobs_by_range_at_intervals( + Requirement.where(issue_id: nil), + MIGRATION, + 2.minutes, + batch_size: BATCH_SIZE, + track_jobs: true + ) + end + + def down + # NO OP + end +end diff --git a/db/post_migrate/20211011104843_add_new_loose_fk_index.rb b/db/post_migrate/20211011104843_add_new_loose_fk_index.rb new file mode 100644 index 00000000000..710d0917d7f --- /dev/null +++ b/db/post_migrate/20211011104843_add_new_loose_fk_index.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class AddNewLooseFkIndex < Gitlab::Database::Migration[1.0] + include Gitlab::Database::PartitioningMigrationHelpers + + disable_ddl_transaction! + + INDEX_NAME = 'index_loose_foreign_keys_deleted_records_for_loading_records' + + def up + add_concurrent_partitioned_index :loose_foreign_keys_deleted_records, + %I[fully_qualified_table_name id primary_key_value partition], + where: 'status = 1', + name: INDEX_NAME + end + + def down + remove_concurrent_partitioned_index_by_name :loose_foreign_keys_deleted_records, INDEX_NAME + end +end diff --git a/db/post_migrate/20211012051221_add_index_btree_namespaces_traversal_ids.rb b/db/post_migrate/20211012051221_add_index_btree_namespaces_traversal_ids.rb new file mode 100644 index 00000000000..882351ab974 --- /dev/null +++ b/db/post_migrate/20211012051221_add_index_btree_namespaces_traversal_ids.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddIndexBtreeNamespacesTraversalIds < Gitlab::Database::Migration[1.0] + INDEX_NAME = 'index_btree_namespaces_traversal_ids' + + disable_ddl_transaction! + + def up + add_concurrent_index :namespaces, :traversal_ids, using: :btree, name: INDEX_NAME + end + + def down + remove_concurrent_index :namespaces, :traversal_ids, name: INDEX_NAME + end +end diff --git a/db/post_migrate/20211012143815_remove_merge_request_diff_commit_columns.rb b/db/post_migrate/20211012143815_remove_merge_request_diff_commit_columns.rb new file mode 100644 index 00000000000..80ed834903c --- /dev/null +++ b/db/post_migrate/20211012143815_remove_merge_request_diff_commit_columns.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class RemoveMergeRequestDiffCommitColumns < Gitlab::Database::Migration[1.0] + enable_lock_retries! + + COLUMNS = %i[author_name author_email committer_name committer_email].freeze + + def change + COLUMNS.each do |column| + remove_column(:merge_request_diff_commits, column, :text) + end + end +end diff --git a/db/post_migrate/20211013125341_create_index_security_ci_builds_on_name_and_id_parser_features.rb b/db/post_migrate/20211013125341_create_index_security_ci_builds_on_name_and_id_parser_features.rb new file mode 100644 index 00000000000..2efbfad6c56 --- /dev/null +++ b/db/post_migrate/20211013125341_create_index_security_ci_builds_on_name_and_id_parser_features.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +class CreateIndexSecurityCiBuildsOnNameAndIdParserFeatures < Gitlab::Database::Migration[1.0] + TABLE = "ci_builds" + COLUMNS = %i[name id] + INDEX_NAME = "index_security_ci_builds_on_name_and_id_parser_features" + CONSTRAINTS = "(name::text = ANY (ARRAY['container_scanning'::character varying::text, + 'dast'::character varying::text, + 'dependency_scanning'::character varying::text, + 'license_management'::character varying::text, + 'sast'::character varying::text, + 'secret_detection'::character varying::text, + 'coverage_fuzzing'::character varying::text, + 'license_scanning'::character varying::text]) + ) AND type::text = 'Ci::Build'::text" + + disable_ddl_transaction! + + def up + add_concurrent_index(TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS) + end + + def down + remove_concurrent_index(TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS) + end +end diff --git a/db/post_migrate/20211018101552_add_index_to_tmp_project_id_column_on_namespaces_table.rb b/db/post_migrate/20211018101552_add_index_to_tmp_project_id_column_on_namespaces_table.rb new file mode 100644 index 00000000000..b50b7fa21a5 --- /dev/null +++ b/db/post_migrate/20211018101552_add_index_to_tmp_project_id_column_on_namespaces_table.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddIndexToTmpProjectIdColumnOnNamespacesTable < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + INDEX_NAME = 'tmp_index_on_tmp_project_id_on_namespaces' + + def up + add_concurrent_index :namespaces, :tmp_project_id, name: INDEX_NAME, unique: true + end + + def down + remove_concurrent_index_by_name :namespaces, INDEX_NAME + end +end diff --git a/db/post_migrate/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb b/db/post_migrate/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb new file mode 100644 index 00000000000..f2772389d02 --- /dev/null +++ b/db/post_migrate/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class AddFkToTmpProjectIdColumnOnNamespacesTable < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + add_concurrent_foreign_key :namespaces, :projects, column: :tmp_project_id + end + + def down + remove_foreign_key :namespaces, column: :tmp_project_id + end +end diff --git a/db/post_migrate/20211018102252_add_index_to_group_id_column_on_webhooks_table.rb b/db/post_migrate/20211018102252_add_index_to_group_id_column_on_webhooks_table.rb new file mode 100644 index 00000000000..d5fac373ca4 --- /dev/null +++ b/db/post_migrate/20211018102252_add_index_to_group_id_column_on_webhooks_table.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddIndexToGroupIdColumnOnWebhooksTable < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + INDEX_NAME = 'index_on_group_id_on_webhooks' + + def up + add_concurrent_index :web_hooks, :group_id, name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :web_hooks, INDEX_NAME + end +end diff --git a/db/post_migrate/20211018123316_remove_not_null_constraint_and_default_for_public_email.rb b/db/post_migrate/20211018123316_remove_not_null_constraint_and_default_for_public_email.rb new file mode 100644 index 00000000000..72a5970b6d7 --- /dev/null +++ b/db/post_migrate/20211018123316_remove_not_null_constraint_and_default_for_public_email.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class RemoveNotNullConstraintAndDefaultForPublicEmail < Gitlab::Database::Migration[1.0] + enable_lock_retries! + + def up + change_column_null :users, :public_email, true + change_column_default :users, :public_email, from: '', to: nil + end + + def down + # There may now be nulls in the table, so we cannot re-add the constraint here. + change_column_default :users, :public_email, from: nil, to: '' + end +end diff --git a/db/post_migrate/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3.rb b/db/post_migrate/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3.rb new file mode 100644 index 00000000000..ecad4466c53 --- /dev/null +++ b/db/post_migrate/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class ScheduleRemoveDuplicateVulnerabilitiesFindings3 < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + MIGRATION = 'RemoveDuplicateVulnerabilitiesFindings' + DELAY_INTERVAL = 2.minutes.to_i + BATCH_SIZE = 5_000 + + def up + queue_background_migration_jobs_by_range_at_intervals( + define_batchable_model('vulnerability_occurrences'), + MIGRATION, + DELAY_INTERVAL, + batch_size: BATCH_SIZE + ) + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20211021131217_add_deployments_environment_id_and_ref_index.rb b/db/post_migrate/20211021131217_add_deployments_environment_id_and_ref_index.rb new file mode 100644 index 00000000000..8014c006f35 --- /dev/null +++ b/db/post_migrate/20211021131217_add_deployments_environment_id_and_ref_index.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddDeploymentsEnvironmentIdAndRefIndex < Gitlab::Database::Migration[1.0] + INDEX_NAME = 'index_deployments_on_environment_id_and_ref' + + disable_ddl_transaction! + + def up + add_concurrent_index :deployments, [:environment_id, :ref], name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :deployments, INDEX_NAME + end +end diff --git a/db/post_migrate/20211021140426_remove_geo_upload_deprecated_fields.rb b/db/post_migrate/20211021140426_remove_geo_upload_deprecated_fields.rb new file mode 100644 index 00000000000..7d0033c0ab9 --- /dev/null +++ b/db/post_migrate/20211021140426_remove_geo_upload_deprecated_fields.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +class RemoveGeoUploadDeprecatedFields < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + with_lock_retries do + remove_column :geo_event_log, :upload_deleted_event_id, :bigint + end + end + + def down + with_lock_retries do + add_column(:geo_event_log, :upload_deleted_event_id, :bigint) unless column_exists?(:geo_event_log, :upload_deleted_event_id) + end + + add_concurrent_foreign_key :geo_event_log, :geo_upload_deleted_events, + column: :upload_deleted_event_id, + name: 'fk_c1f241c70d', + on_delete: :cascade + + add_concurrent_index :geo_event_log, + :upload_deleted_event_id, + name: 'index_geo_event_log_on_upload_deleted_event_id', + where: "(upload_deleted_event_id IS NOT NULL)" + end +end diff --git a/db/post_migrate/20211021141930_drop_geo_upload_deleted_events_table.rb b/db/post_migrate/20211021141930_drop_geo_upload_deleted_events_table.rb new file mode 100644 index 00000000000..b6987e68fb1 --- /dev/null +++ b/db/post_migrate/20211021141930_drop_geo_upload_deleted_events_table.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class DropGeoUploadDeletedEventsTable < Gitlab::Database::Migration[1.0] + def up + drop_table :geo_upload_deleted_events + end + + def down + create_table :geo_upload_deleted_events, id: :bigserial do |t| + t.integer :upload_id, null: false, index: true + t.string :file_path, null: false + t.integer :model_id, null: false + t.string :model_type, null: false + t.string :uploader, null: false + end + end +end diff --git a/db/post_migrate/20211022112202_add_cluster_id_location_index_to_vulnerability_occurrences.rb b/db/post_migrate/20211022112202_add_cluster_id_location_index_to_vulnerability_occurrences.rb new file mode 100644 index 00000000000..9c40e81f527 --- /dev/null +++ b/db/post_migrate/20211022112202_add_cluster_id_location_index_to_vulnerability_occurrences.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddClusterIdLocationIndexToVulnerabilityOccurrences < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + INDEX_NAME = 'index_vulnerability_occurrences_on_location_cluster_id' + + def up + add_concurrent_index :vulnerability_occurrences, "(location -> 'cluster_id')", + using: 'GIN', + where: 'report_type = 7', + name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME + end +end diff --git a/db/post_migrate/20211022113000_drop_index_security_ci_builds_on_name_and_id_parser_features_broken.rb b/db/post_migrate/20211022113000_drop_index_security_ci_builds_on_name_and_id_parser_features_broken.rb new file mode 100644 index 00000000000..9ee1b10a072 --- /dev/null +++ b/db/post_migrate/20211022113000_drop_index_security_ci_builds_on_name_and_id_parser_features_broken.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +class DropIndexSecurityCiBuildsOnNameAndIdParserFeaturesBroken < Gitlab::Database::Migration[1.0] + TABLE = "ci_builds" + COLUMNS = %i[name id] + INDEX_NAME = "index_security_ci_builds_on_name_and_id_parser_features_broken" + CONSTRAINTS = "(name::text = ANY (ARRAY['container_scanning'::character varying::text, + 'dast'::character varying::text, + 'dependency_scanning'::character varying::text, + 'license_management'::character varying::text, + 'sast'::character varying::text, + 'secret_detection'::character varying::text, + 'coverage_fuzzing'::character varying::text, + 'license_scanning'::character varying::text]) + ) AND type::text = 'Ci::Build'::text" + + disable_ddl_transaction! + + def up + remove_concurrent_index(TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS) + end + + def down + add_concurrent_index(TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS) + end +end diff --git a/db/post_migrate/20211022160154_remove_outdated_fields_from_geo_node_status.rb b/db/post_migrate/20211022160154_remove_outdated_fields_from_geo_node_status.rb new file mode 100644 index 00000000000..5b117f9e4b8 --- /dev/null +++ b/db/post_migrate/20211022160154_remove_outdated_fields_from_geo_node_status.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class RemoveOutdatedFieldsFromGeoNodeStatus < Gitlab::Database::Migration[1.0] + enable_lock_retries! + + def change + remove_column :geo_node_statuses, :attachments_count, :integer + remove_column :geo_node_statuses, :attachments_synced_count, :integer + remove_column :geo_node_statuses, :attachments_failed_count, :integer + remove_column :geo_node_statuses, :attachments_synced_missing_on_primary_count, :integer + end +end diff --git a/db/post_migrate/20211027064021_track_deletions_in_ci_runners.rb b/db/post_migrate/20211027064021_track_deletions_in_ci_runners.rb new file mode 100644 index 00000000000..14cf305fb2e --- /dev/null +++ b/db/post_migrate/20211027064021_track_deletions_in_ci_runners.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class TrackDeletionsInCiRunners < Gitlab::Database::Migration[1.0] + include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers + + enable_lock_retries! + + def up + track_record_deletions(:ci_runners) + end + + def down + untrack_record_deletions(:ci_runners) + end +end diff --git a/db/post_migrate/20211027064156_track_deletions_in_chat_names.rb b/db/post_migrate/20211027064156_track_deletions_in_chat_names.rb new file mode 100644 index 00000000000..1c8f9d5196a --- /dev/null +++ b/db/post_migrate/20211027064156_track_deletions_in_chat_names.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class TrackDeletionsInChatNames < Gitlab::Database::Migration[1.0] + include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers + + enable_lock_retries! + + def up + track_record_deletions(:chat_names) + end + + def down + untrack_record_deletions(:chat_names) + end +end diff --git a/db/post_migrate/20211027112901_drop_index_keys_on_expires_at_and_before_expiry_notification_undelivered.rb b/db/post_migrate/20211027112901_drop_index_keys_on_expires_at_and_before_expiry_notification_undelivered.rb new file mode 100644 index 00000000000..3447c4da81a --- /dev/null +++ b/db/post_migrate/20211027112901_drop_index_keys_on_expires_at_and_before_expiry_notification_undelivered.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class DropIndexKeysOnExpiresAtAndBeforeExpiryNotificationUndelivered < Gitlab::Database::Migration[1.0] + DOWNTIME = false + INDEX_NAME = 'index_keys_on_expires_at_and_expiry_notification_undelivered' + disable_ddl_transaction! + + def up + remove_concurrent_index_by_name(:keys, INDEX_NAME) + end + + def down + add_concurrent_index :keys, + "date(timezone('UTC', expires_at)), expiry_notification_delivered_at", + where: 'expiry_notification_delivered_at IS NULL', name: INDEX_NAME + end +end diff --git a/db/post_migrate/20211027204011_remove_index_for_dormant_users.rb b/db/post_migrate/20211027204011_remove_index_for_dormant_users.rb new file mode 100644 index 00000000000..5e556fe1f32 --- /dev/null +++ b/db/post_migrate/20211027204011_remove_index_for_dormant_users.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class RemoveIndexForDormantUsers < Gitlab::Database::Migration[1.0] + INDEX_NAME = 'index_users_on_id_and_last_activity_on_for_non_internal_active' + + disable_ddl_transaction! + + def up + remove_concurrent_index_by_name :users, INDEX_NAME + end + + def down + index_condition = "state = 'active' AND (users.user_type IS NULL OR users.user_type IN (NULL, 6, 4))" + + add_concurrent_index :users, [:id, :last_activity_on], where: index_condition, name: INDEX_NAME + end +end diff --git a/db/post_migrate/20211028085926_add_occurrence_id_id_desc_index_to_vulnerability_occurrence_pipelines.rb b/db/post_migrate/20211028085926_add_occurrence_id_id_desc_index_to_vulnerability_occurrence_pipelines.rb new file mode 100644 index 00000000000..1f03e39aa81 --- /dev/null +++ b/db/post_migrate/20211028085926_add_occurrence_id_id_desc_index_to_vulnerability_occurrence_pipelines.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class AddOccurrenceIdIdDescIndexToVulnerabilityOccurrencePipelines < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + INDEX_NAME = "index_vulnerability_occurrence_pipelines_occurrence_id_and_id" + + def up + add_concurrent_index( + :vulnerability_occurrence_pipelines, + [:occurrence_id, :id], + order: { id: :desc }, + name: INDEX_NAME + ) + end + + def down + remove_concurrent_index_by_name( + :vulnerability_occurrence_pipelines, + INDEX_NAME + ) + end +end diff --git a/db/post_migrate/20211028100303_tmp_index_for_delete_issue_merge_request_taggings_records.rb b/db/post_migrate/20211028100303_tmp_index_for_delete_issue_merge_request_taggings_records.rb new file mode 100644 index 00000000000..98984239ca4 --- /dev/null +++ b/db/post_migrate/20211028100303_tmp_index_for_delete_issue_merge_request_taggings_records.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class TmpIndexForDeleteIssueMergeRequestTaggingsRecords < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + INDEX_NAME = 'tmp_index_taggings_on_id_where_taggable_type_issue_mr' + INDEX_CONDITION = "taggable_type IN ('Issue', 'MergeRequest')" + + def up + add_concurrent_index :taggings, :id, where: INDEX_CONDITION, name: INDEX_NAME # rubocop:disable Migration/PreventIndexCreation + end + + def down + remove_concurrent_index_by_name :taggings, INDEX_NAME + end +end diff --git a/db/post_migrate/20211028100843_delete_issue_merge_request_taggings_records.rb b/db/post_migrate/20211028100843_delete_issue_merge_request_taggings_records.rb new file mode 100644 index 00000000000..1ceaa1b5aef --- /dev/null +++ b/db/post_migrate/20211028100843_delete_issue_merge_request_taggings_records.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class DeleteIssueMergeRequestTaggingsRecords < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + INDEX_NAME = 'tmp_index_taggings_on_id_where_taggable_type_issue_mr' + + BATCH_SIZE = 3_000 + TAGGABLE_TYPES = %w(Issue MergeRequest) + + def up + sleep 2 while ActsAsTaggableOn::Tagging.where(taggable_type: TAGGABLE_TYPES).limit(BATCH_SIZE).delete_all > 0 + + remove_concurrent_index_by_name :taggings, INDEX_NAME + end + + def down + end +end diff --git a/db/post_migrate/20211028123412_add_async_index_on_events_using_btree_created_at_id.rb b/db/post_migrate/20211028123412_add_async_index_on_events_using_btree_created_at_id.rb new file mode 100644 index 00000000000..03e461dfcd0 --- /dev/null +++ b/db/post_migrate/20211028123412_add_async_index_on_events_using_btree_created_at_id.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class AddAsyncIndexOnEventsUsingBtreeCreatedAtId < Gitlab::Database::Migration[1.0] + INDEX_NAME = 'index_events_on_created_at_and_id' + TABLE = :events + COLUMNS = %i[created_at id] + CONSTRAINTS = "created_at > '2021-08-27'" + + def up + prepare_async_index TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS + end + + def down + unprepare_async_index TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS + end +end diff --git a/db/post_migrate/20211028155449_schedule_fix_merge_request_diff_commit_users_migration.rb b/db/post_migrate/20211028155449_schedule_fix_merge_request_diff_commit_users_migration.rb new file mode 100644 index 00000000000..659cb7b76b2 --- /dev/null +++ b/db/post_migrate/20211028155449_schedule_fix_merge_request_diff_commit_users_migration.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +class ScheduleFixMergeRequestDiffCommitUsersMigration < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + MIGRATION_CLASS = 'FixMergeRequestDiffCommitUsers' + + class Project < ApplicationRecord + include EachBatch + + self.table_name = 'projects' + end + + def up + # This is the day on which we merged + # https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63669. Since the + # deploy of this MR we may have imported projects using the old format, but + # after their merge_request_diff_id range had been migrated by Sidekiq. As a + # result, there may be rows without a committer_id or commit_author_id + # field. + date = '2021-07-07 00:00:00' + + transaction do + Project.each_batch(of: 10_000) do |batch| + time = Time.now.utc + rows = batch + .where('created_at >= ?', date) + .where(import_type: 'gitlab_project') + .pluck(:id) + .map do |id| + Gitlab::Database::BackgroundMigrationJob.new( + class_name: MIGRATION_CLASS, + arguments: [id], + created_at: time, + updated_at: time + ) + end + + Gitlab::Database::BackgroundMigrationJob + .bulk_insert!(rows, validate: false) + end + end + + job = Gitlab::Database::BackgroundMigrationJob + .for_migration_class(MIGRATION_CLASS) + .pending + .first + + migrate_in(2.minutes, MIGRATION_CLASS, job.arguments) if job + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20211029102822_add_open_source_plan.rb b/db/post_migrate/20211029102822_add_open_source_plan.rb new file mode 100644 index 00000000000..00266640f03 --- /dev/null +++ b/db/post_migrate/20211029102822_add_open_source_plan.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +class AddOpenSourcePlan < Gitlab::Database::Migration[1.0] + class Plan < ActiveRecord::Base + self.inheritance_column = :_type_disabled + + has_one :limits, class_name: 'PlanLimits' + + def actual_limits + self.limits || self.build_limits + end + end + + class PlanLimits < ActiveRecord::Base + self.inheritance_column = :_type_disabled + + belongs_to :plan + end + + def create_plan_limits(plan_limit_name, plan) + plan_limit = Plan.find_or_initialize_by(name: plan_limit_name).actual_limits.dup + plan_limit.plan = plan + plan_limit.save! + end + + def up + return unless Gitlab.dev_env_or_com? + + opensource = Plan.create!(name: 'opensource', title: 'Open Source Program') + + create_plan_limits('ultimate', opensource) + end + + def down + return unless Gitlab.dev_env_or_com? + + Plan.where(name: 'opensource').delete_all + end +end diff --git a/db/post_migrate/20211031152417_add_indexes_to_issue_stage_events.rb b/db/post_migrate/20211031152417_add_indexes_to_issue_stage_events.rb new file mode 100644 index 00000000000..73b70ad1e27 --- /dev/null +++ b/db/post_migrate/20211031152417_add_indexes_to_issue_stage_events.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +class AddIndexesToIssueStageEvents < Gitlab::Database::Migration[1.0] + include Gitlab::Database::PartitioningMigrationHelpers + + disable_ddl_transaction! + + GROUP_INDEX_NAME = 'index_issue_stage_events_group_duration' + GROUP_IN_PROGRESS_INDEX_NAME = 'index_issue_stage_events_group_in_progress_duration' + PROJECT_INDEX_NAME = 'index_issue_stage_events_project_duration' + PROJECT_IN_PROGRESS_INDEX_NAME = 'index_issue_stage_events_project_in_progress_duration' + + def up + add_concurrent_partitioned_index :analytics_cycle_analytics_issue_stage_events, + 'stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp', + where: 'end_event_timestamp IS NOT NULL', + name: GROUP_INDEX_NAME + + add_concurrent_partitioned_index :analytics_cycle_analytics_issue_stage_events, + 'stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp', + where: 'end_event_timestamp IS NOT NULL', + name: PROJECT_INDEX_NAME + + add_concurrent_partitioned_index :analytics_cycle_analytics_issue_stage_events, + 'stage_event_hash_id, group_id, start_event_timestamp, issue_id', + where: 'end_event_timestamp IS NULL AND state_id = 1', + name: GROUP_IN_PROGRESS_INDEX_NAME + + add_concurrent_partitioned_index :analytics_cycle_analytics_issue_stage_events, + 'stage_event_hash_id, project_id, start_event_timestamp, issue_id', + where: 'end_event_timestamp IS NULL AND state_id = 1', + name: PROJECT_IN_PROGRESS_INDEX_NAME + end + + def down + remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_issue_stage_events, GROUP_INDEX_NAME + remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_issue_stage_events, PROJECT_INDEX_NAME + remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_issue_stage_events, GROUP_IN_PROGRESS_INDEX_NAME + remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_issue_stage_events, PROJECT_IN_PROGRESS_INDEX_NAME + end +end diff --git a/db/post_migrate/20211031154919_add_indexes_to_merge_request_stage_events.rb b/db/post_migrate/20211031154919_add_indexes_to_merge_request_stage_events.rb new file mode 100644 index 00000000000..9cc9d73c968 --- /dev/null +++ b/db/post_migrate/20211031154919_add_indexes_to_merge_request_stage_events.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +class AddIndexesToMergeRequestStageEvents < Gitlab::Database::Migration[1.0] + include Gitlab::Database::PartitioningMigrationHelpers + + disable_ddl_transaction! + + GROUP_INDEX_NAME = 'index_merge_request_stage_events_group_duration' + GROUP_IN_PROGRESS_INDEX_NAME = 'index_merge_request_stage_events_group_in_progress_duration' + PROJECT_INDEX_NAME = 'index_merge_request_stage_events_project_duration' + PROJECT_IN_PROGRESS_INDEX_NAME = 'index_merge_request_stage_events_project_in_progress_duration' + + def up + add_concurrent_partitioned_index :analytics_cycle_analytics_merge_request_stage_events, + 'stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp', + where: 'end_event_timestamp IS NOT NULL', + name: GROUP_INDEX_NAME + + add_concurrent_partitioned_index :analytics_cycle_analytics_merge_request_stage_events, + 'stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp', + where: 'end_event_timestamp IS NOT NULL', + name: PROJECT_INDEX_NAME + + add_concurrent_partitioned_index :analytics_cycle_analytics_merge_request_stage_events, + 'stage_event_hash_id, group_id, start_event_timestamp, merge_request_id', + where: 'end_event_timestamp IS NULL AND state_id = 1', + name: GROUP_IN_PROGRESS_INDEX_NAME + + add_concurrent_partitioned_index :analytics_cycle_analytics_merge_request_stage_events, + 'stage_event_hash_id, project_id, start_event_timestamp, merge_request_id', + where: 'end_event_timestamp IS NULL AND state_id = 1', + name: PROJECT_IN_PROGRESS_INDEX_NAME + end + + def down + remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_merge_request_stage_events, GROUP_INDEX_NAME + remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_merge_request_stage_events, PROJECT_INDEX_NAME + remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_merge_request_stage_events, GROUP_IN_PROGRESS_INDEX_NAME + remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_merge_request_stage_events, PROJECT_IN_PROGRESS_INDEX_NAME + end +end diff --git a/db/post_migrate/20211102103127_add_temp_index_to_vulnerability_occurrences.rb b/db/post_migrate/20211102103127_add_temp_index_to_vulnerability_occurrences.rb new file mode 100644 index 00000000000..4aee79950dc --- /dev/null +++ b/db/post_migrate/20211102103127_add_temp_index_to_vulnerability_occurrences.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddTempIndexToVulnerabilityOccurrences < Gitlab::Database::Migration[1.0] + INDEX_NAME = 'vulnerability_occurrences_location_temp_index' + + disable_ddl_transaction! + + def up + add_concurrent_index :vulnerability_occurrences, :id, where: 'location IS NULL', name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :vulnerability_occurrences, name: INDEX_NAME + end +end diff --git a/db/post_migrate/20211102114802_update_vulnerability_occurrences_location.rb b/db/post_migrate/20211102114802_update_vulnerability_occurrences_location.rb new file mode 100644 index 00000000000..44e2630af06 --- /dev/null +++ b/db/post_migrate/20211102114802_update_vulnerability_occurrences_location.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +class UpdateVulnerabilityOccurrencesLocation < Gitlab::Database::Migration[1.0] + BATCH_SIZE = 20_000 + DELAY_INTERVAL = 3.minutes + MIGRATION_NAME = 'UpdateVulnerabilityOccurrencesLocation' + + disable_ddl_transaction! + + def up + return unless Gitlab.ee? + + relation = Gitlab::BackgroundMigration::UpdateVulnerabilityOccurrencesLocation::Occurrence.where(location: nil) + queue_background_migration_jobs_by_range_at_intervals(relation, + MIGRATION_NAME, + DELAY_INTERVAL, + batch_size: BATCH_SIZE, + track_jobs: true) + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20211103162025_add_index_on_events_using_btree_created_at_id.rb b/db/post_migrate/20211103162025_add_index_on_events_using_btree_created_at_id.rb new file mode 100644 index 00000000000..33d5833db1a --- /dev/null +++ b/db/post_migrate/20211103162025_add_index_on_events_using_btree_created_at_id.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIndexOnEventsUsingBtreeCreatedAtId < Gitlab::Database::Migration[1.0] + INDEX_NAME = 'index_events_on_created_at_and_id' + TABLE = :events + COLUMNS = %i[created_at id] + CONSTRAINTS = "created_at > '2021-08-27 00:00:00+00'" + disable_ddl_transaction! + + def up + add_concurrent_index TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS + end + + def down + remove_concurrent_index TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS + end +end diff --git a/db/post_migrate/20211104044453_remove_redundant_events_index.rb b/db/post_migrate/20211104044453_remove_redundant_events_index.rb new file mode 100644 index 00000000000..54e71e1b54b --- /dev/null +++ b/db/post_migrate/20211104044453_remove_redundant_events_index.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class RemoveRedundantEventsIndex < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + remove_concurrent_index_by_name :events, :index_events_on_target_type_and_target_id + end + + def down + add_concurrent_index :events, [:target_type, :target_id], name: :index_events_on_target_type_and_target_id + end +end diff --git a/db/post_migrate/20211105135157_drop_ci_build_trace_sections.rb b/db/post_migrate/20211105135157_drop_ci_build_trace_sections.rb new file mode 100644 index 00000000000..1595068952d --- /dev/null +++ b/db/post_migrate/20211105135157_drop_ci_build_trace_sections.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true + +class DropCiBuildTraceSections < Gitlab::Database::Migration[1.0] + include Gitlab::Database::SchemaHelpers + + disable_ddl_transaction! + + def up + with_lock_retries do + remove_foreign_key_if_exists(:dep_ci_build_trace_sections, column: :project_id) + end + + with_lock_retries do + remove_foreign_key_if_exists(:dep_ci_build_trace_section_names, column: :project_id) + end + + if table_exists?(:dep_ci_build_trace_sections) + with_lock_retries do + drop_table :dep_ci_build_trace_sections + end + end + + if table_exists?(:dep_ci_build_trace_section_names) + with_lock_retries do + drop_table :dep_ci_build_trace_section_names + end + end + + drop_function('trigger_91dc388a5fe6') + end + + def down + execute(<<~SQL) + CREATE OR REPLACE FUNCTION trigger_91dc388a5fe6() RETURNS trigger + LANGUAGE plpgsql + AS $$ + BEGIN + NEW."build_id_convert_to_bigint" := NEW."build_id"; + RETURN NEW; + END; + $$; + SQL + + execute_in_transaction(<<~SQL, !table_exists?(:dep_ci_build_trace_section_names)) + CREATE TABLE dep_ci_build_trace_section_names ( + id integer NOT NULL, + project_id integer NOT NULL, + name character varying NOT NULL + ); + + CREATE SEQUENCE dep_ci_build_trace_section_names_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + ALTER SEQUENCE dep_ci_build_trace_section_names_id_seq OWNED BY dep_ci_build_trace_section_names.id; + + ALTER TABLE ONLY dep_ci_build_trace_section_names ALTER COLUMN id SET DEFAULT nextval('dep_ci_build_trace_section_names_id_seq'::regclass); + ALTER TABLE ONLY dep_ci_build_trace_section_names ADD CONSTRAINT dep_ci_build_trace_section_names_pkey PRIMARY KEY (id); + SQL + + execute_in_transaction(<<~SQL, !table_exists?(:dep_ci_build_trace_sections)) + CREATE TABLE dep_ci_build_trace_sections ( + project_id integer NOT NULL, + date_start timestamp without time zone NOT NULL, + date_end timestamp without time zone NOT NULL, + byte_start bigint NOT NULL, + byte_end bigint NOT NULL, + build_id integer NOT NULL, + section_name_id integer NOT NULL, + build_id_convert_to_bigint bigint DEFAULT 0 NOT NULL + ); + + ALTER TABLE ONLY dep_ci_build_trace_sections ADD CONSTRAINT ci_build_trace_sections_pkey PRIMARY KEY (build_id, section_name_id); + CREATE TRIGGER trigger_91dc388a5fe6 BEFORE INSERT OR UPDATE ON dep_ci_build_trace_sections FOR EACH ROW EXECUTE FUNCTION trigger_91dc388a5fe6(); + SQL + + add_concurrent_index :dep_ci_build_trace_section_names, [:project_id, :name], unique: true, name: 'index_dep_ci_build_trace_section_names_on_project_id_and_name' + add_concurrent_index :dep_ci_build_trace_sections, :project_id, name: 'index_dep_ci_build_trace_sections_on_project_id' + add_concurrent_index :dep_ci_build_trace_sections, :section_name_id, name: 'index_dep_ci_build_trace_sections_on_section_name_id' + + add_concurrent_foreign_key :dep_ci_build_trace_sections, :dep_ci_build_trace_section_names, column: :section_name_id, on_delete: :cascade, name: 'fk_264e112c66' + add_concurrent_foreign_key :dep_ci_build_trace_sections, :projects, column: :project_id, on_delete: :cascade, name: 'fk_ab7c104e26' + add_concurrent_foreign_key :dep_ci_build_trace_section_names, :projects, column: :project_id, on_delete: :cascade, name: 'fk_f8cd72cd26' + end + + private + + def execute_in_transaction(sql, condition) + return unless condition + + transaction do + execute(sql) + end + end +end diff --git a/db/post_migrate/20211109112454_drop_old_loose_fk_deleted_records_index.rb b/db/post_migrate/20211109112454_drop_old_loose_fk_deleted_records_index.rb new file mode 100644 index 00000000000..ef5a70713d0 --- /dev/null +++ b/db/post_migrate/20211109112454_drop_old_loose_fk_deleted_records_index.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class DropOldLooseFkDeletedRecordsIndex < Gitlab::Database::Migration[1.0] + include Gitlab::Database::PartitioningMigrationHelpers + + disable_ddl_transaction! + + INDEX_NAME = 'index_loose_foreign_keys_deleted_records_for_loading_records' + + def up + remove_concurrent_partitioned_index_by_name :loose_foreign_keys_deleted_records, INDEX_NAME + end + + def down + add_concurrent_partitioned_index :loose_foreign_keys_deleted_records, + %I[fully_qualified_table_name id primary_key_value partition], + where: 'status = 1', + name: INDEX_NAME + end +end diff --git a/db/post_migrate/20211112113300_remove_ci_pipeline_chat_data_fk_on_chat_names.rb b/db/post_migrate/20211112113300_remove_ci_pipeline_chat_data_fk_on_chat_names.rb new file mode 100644 index 00000000000..19adc6c7084 --- /dev/null +++ b/db/post_migrate/20211112113300_remove_ci_pipeline_chat_data_fk_on_chat_names.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class RemoveCiPipelineChatDataFkOnChatNames < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + with_lock_retries do + remove_foreign_key_if_exists(:ci_pipeline_chat_data, :chat_names, name: "fk_rails_f300456b63") + end + end + + def down + # Remove orphaned rows + execute <<~SQL + DELETE FROM ci_pipeline_chat_data + WHERE + NOT EXISTS (SELECT 1 FROM chat_names WHERE chat_names.id=ci_pipeline_chat_data.chat_name_id) + SQL + + add_concurrent_foreign_key(:ci_pipeline_chat_data, :chat_names, name: "fk_rails_f300456b63", column: :chat_name_id, target_column: :id, on_delete: "cascade") + end +end diff --git a/db/post_migrate/20211115151704_add_index_on_projects_import_type_id.rb b/db/post_migrate/20211115151704_add_index_on_projects_import_type_id.rb new file mode 100644 index 00000000000..b54edc1cf73 --- /dev/null +++ b/db/post_migrate/20211115151704_add_index_on_projects_import_type_id.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddIndexOnProjectsImportTypeId < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + INDEX_NAME = 'index_imported_projects_on_import_type_id' + + def up + add_concurrent_index(:projects, [:import_type, :id], where: 'import_type IS NOT NULL', name: INDEX_NAME) + end + + def down + remove_concurrent_index_by_name(:projects, INDEX_NAME) + end +end diff --git a/db/schema_migrations/20200102140148 b/db/schema_migrations/20200102140148 deleted file mode 100644 index 5238acd0478..00000000000 --- a/db/schema_migrations/20200102140148 +++ /dev/null @@ -1 +0,0 @@ -c92babf7e04f018d85380348545bd023db0a5337c1ba75341393e2d77921c907
\ No newline at end of file diff --git a/db/schema_migrations/20200102170221 b/db/schema_migrations/20200102170221 deleted file mode 100644 index f1581b378f6..00000000000 --- a/db/schema_migrations/20200102170221 +++ /dev/null @@ -1 +0,0 @@ -12373b45cfcef55fe29492ffa24d91770683d8c3f02f3bc7381044e097420da9
\ No newline at end of file diff --git a/db/schema_migrations/20200103190741 b/db/schema_migrations/20200103190741 deleted file mode 100644 index b84ba1d485e..00000000000 --- a/db/schema_migrations/20200103190741 +++ /dev/null @@ -1 +0,0 @@ -c648f714c029501e10d1d5aaaa7a8d844e950bdc54e6e675806cfcf310542e6a
\ No newline at end of file diff --git a/db/schema_migrations/20200103192859 b/db/schema_migrations/20200103192859 deleted file mode 100644 index 91eb68d9fe6..00000000000 --- a/db/schema_migrations/20200103192859 +++ /dev/null @@ -1 +0,0 @@ -903ec05dbe2bf0dd6908ebe536082396a4abfdc4c52d24b5c3d8bf5b567ad6ac
\ No newline at end of file diff --git a/db/schema_migrations/20200103192914 b/db/schema_migrations/20200103192914 deleted file mode 100644 index e83883506d9..00000000000 --- a/db/schema_migrations/20200103192914 +++ /dev/null @@ -1 +0,0 @@ -ac8d93ce6b0a4c1088673cfe7a86e1dd7d1bf3321ad86b4d626026f866c01343
\ No newline at end of file diff --git a/db/schema_migrations/20200103195205 b/db/schema_migrations/20200103195205 deleted file mode 100644 index bf519d8198b..00000000000 --- a/db/schema_migrations/20200103195205 +++ /dev/null @@ -1 +0,0 @@ -13c574741955afcf6c9142710453e4974e014019b1b045ffc7a41ec48d983de6
\ No newline at end of file diff --git a/db/schema_migrations/20200104113850 b/db/schema_migrations/20200104113850 deleted file mode 100644 index a82ba279b88..00000000000 --- a/db/schema_migrations/20200104113850 +++ /dev/null @@ -1 +0,0 @@ -c424f5d5b25ba4a7da3757498200cbba3a27693f20db93cf6750c20fccda8de7
\ No newline at end of file diff --git a/db/schema_migrations/20200106071113 b/db/schema_migrations/20200106071113 deleted file mode 100644 index 4b6b29ebaff..00000000000 --- a/db/schema_migrations/20200106071113 +++ /dev/null @@ -1 +0,0 @@ -d9f594a3c50f85d4f543e37e45dea45976763ba959fe84dc28a58b87ab60a509
\ No newline at end of file diff --git a/db/schema_migrations/20200106085831 b/db/schema_migrations/20200106085831 deleted file mode 100644 index ff67d1772f2..00000000000 --- a/db/schema_migrations/20200106085831 +++ /dev/null @@ -1 +0,0 @@ -f398ad67fdef4992495c3aeaf2be2659cf5a3594ad08112b33471c6cbe496a2b
\ No newline at end of file diff --git a/db/schema_migrations/20200107172020 b/db/schema_migrations/20200107172020 deleted file mode 100644 index 9bcf05557f4..00000000000 --- a/db/schema_migrations/20200107172020 +++ /dev/null @@ -1 +0,0 @@ -6dfa2dec4773dea596097e3735df899f4fe22d94ec9dcbef70cd610ed848ae4e
\ No newline at end of file diff --git a/db/schema_migrations/20200108100603 b/db/schema_migrations/20200108100603 deleted file mode 100644 index 8f0c730a87b..00000000000 --- a/db/schema_migrations/20200108100603 +++ /dev/null @@ -1 +0,0 @@ -5c2c00f6ce104f6ba87f3495c0d6464fd553c0c66c83de14ba80af8cff132b64
\ No newline at end of file diff --git a/db/schema_migrations/20200108155731 b/db/schema_migrations/20200108155731 deleted file mode 100644 index c00bd7bbb6f..00000000000 --- a/db/schema_migrations/20200108155731 +++ /dev/null @@ -1 +0,0 @@ -dd7df8deaeacebf372507cf636a5750cc0e8afc8f5a0dc80abc928a0c1d6d97c
\ No newline at end of file diff --git a/db/schema_migrations/20200108233040 b/db/schema_migrations/20200108233040 deleted file mode 100644 index 03644c321d7..00000000000 --- a/db/schema_migrations/20200108233040 +++ /dev/null @@ -1 +0,0 @@ -010c50e90d138ac7d4a1c337cd320526fb6d137e634747977b72ee9306ea05a6
\ No newline at end of file diff --git a/db/schema_migrations/20200109030418 b/db/schema_migrations/20200109030418 deleted file mode 100644 index 8c95f4745a8..00000000000 --- a/db/schema_migrations/20200109030418 +++ /dev/null @@ -1 +0,0 @@ -05d9a1433e6c00f9df21430dce8467d4b9b29c9aa38375da8a9dc1d77a54e215
\ No newline at end of file diff --git a/db/schema_migrations/20200109085206 b/db/schema_migrations/20200109085206 deleted file mode 100644 index 56ad16062fe..00000000000 --- a/db/schema_migrations/20200109085206 +++ /dev/null @@ -1 +0,0 @@ -ed6174d9e7b660068050f78f8bd9e66f4d7bdaf761da6007cabb7d891ee51605
\ No newline at end of file diff --git a/db/schema_migrations/20200109233938 b/db/schema_migrations/20200109233938 deleted file mode 100644 index 04a9475c023..00000000000 --- a/db/schema_migrations/20200109233938 +++ /dev/null @@ -1 +0,0 @@ -3fabb8446e67bbb1fdb111d05bbba68f25d4c2e6518750c535db7d1d23c5fe26
\ No newline at end of file diff --git a/db/schema_migrations/20200110089001 b/db/schema_migrations/20200110089001 deleted file mode 100644 index 2e09521dcbe..00000000000 --- a/db/schema_migrations/20200110089001 +++ /dev/null @@ -1 +0,0 @@ -910b8664a55402ca97dd17020c9be4aba5780d1fae6acfab1d930e106968875e
\ No newline at end of file diff --git a/db/schema_migrations/20200110090153 b/db/schema_migrations/20200110090153 deleted file mode 100644 index 3622eff8263..00000000000 --- a/db/schema_migrations/20200110090153 +++ /dev/null @@ -1 +0,0 @@ -2bf0234bcc5dbb97c38040fd4016b223dc80300592628a8211f2e912bcfc1d8f
\ No newline at end of file diff --git a/db/schema_migrations/20200110121314 b/db/schema_migrations/20200110121314 deleted file mode 100644 index 021f4605524..00000000000 --- a/db/schema_migrations/20200110121314 +++ /dev/null @@ -1 +0,0 @@ -ac34cb0e41262117918b812e5322f76bda29d35c9b91bee11aad1f8dd16833b1
\ No newline at end of file diff --git a/db/schema_migrations/20200110144316 b/db/schema_migrations/20200110144316 deleted file mode 100644 index 334423df1ba..00000000000 --- a/db/schema_migrations/20200110144316 +++ /dev/null @@ -1 +0,0 @@ -6c592c74d8182794ea8e791368f7a72f49ca3e85b4293d7bf2d88060d6223c36
\ No newline at end of file diff --git a/db/schema_migrations/20200110203532 b/db/schema_migrations/20200110203532 deleted file mode 100644 index 14ab27d84c6..00000000000 --- a/db/schema_migrations/20200110203532 +++ /dev/null @@ -1 +0,0 @@ -35a709042705267f5b7581c593949c048dc93dd185d914b5e27e2c0735b4fd7d
\ No newline at end of file diff --git a/db/schema_migrations/20200113133352 b/db/schema_migrations/20200113133352 deleted file mode 100644 index fad80f3bbc9..00000000000 --- a/db/schema_migrations/20200113133352 +++ /dev/null @@ -1 +0,0 @@ -1bdcb05f24558107315b88d26a5aa39a50f9c04871e422290526abaa8e3cbb17
\ No newline at end of file diff --git a/db/schema_migrations/20200113151354 b/db/schema_migrations/20200113151354 deleted file mode 100644 index 4f92d11f56b..00000000000 --- a/db/schema_migrations/20200113151354 +++ /dev/null @@ -1 +0,0 @@ -ab7745e3b9beff8e352c097ab08db4ed8da18a41f3463e3077e0d9388753d6c6
\ No newline at end of file diff --git a/db/schema_migrations/20200114112932 b/db/schema_migrations/20200114112932 deleted file mode 100644 index aa02583018c..00000000000 --- a/db/schema_migrations/20200114112932 +++ /dev/null @@ -1 +0,0 @@ -f147e272eec80e34957ea4dd80669f7e1e7b49ca9714bf63afe386efaff71a75
\ No newline at end of file diff --git a/db/schema_migrations/20200114113341 b/db/schema_migrations/20200114113341 deleted file mode 100644 index 0ba8e96275c..00000000000 --- a/db/schema_migrations/20200114113341 +++ /dev/null @@ -1 +0,0 @@ -59814f51a5849cf979c7b98df8bd6c6eeef754935fbb3a0fe6444b5e3def99af
\ No newline at end of file diff --git a/db/schema_migrations/20200114140305 b/db/schema_migrations/20200114140305 deleted file mode 100644 index 180ee4abc63..00000000000 --- a/db/schema_migrations/20200114140305 +++ /dev/null @@ -1 +0,0 @@ -57589e2252e1a2aa440b3df13db3c1bc089adf3dd8a159ee7a95f42e80581ec6
\ No newline at end of file diff --git a/db/schema_migrations/20200114204949 b/db/schema_migrations/20200114204949 deleted file mode 100644 index 02e5970a74d..00000000000 --- a/db/schema_migrations/20200114204949 +++ /dev/null @@ -1 +0,0 @@ -8acd1453e24c3163b06c3f10a8a01695b00f51be067eb932f459875d03301038
\ No newline at end of file diff --git a/db/schema_migrations/20200115135132 b/db/schema_migrations/20200115135132 deleted file mode 100644 index 0bb4de40e24..00000000000 --- a/db/schema_migrations/20200115135132 +++ /dev/null @@ -1 +0,0 @@ -a28043256d4df1ef5b5fa2661a220a54f7440a6b116d2bb9e0ff16f5396c5857
\ No newline at end of file diff --git a/db/schema_migrations/20200115135234 b/db/schema_migrations/20200115135234 deleted file mode 100644 index a332094fd17..00000000000 --- a/db/schema_migrations/20200115135234 +++ /dev/null @@ -1 +0,0 @@ -642d13d32940f108e43be044509be9df3be9eeab68f36de6af89f8f94327ca84
\ No newline at end of file diff --git a/db/schema_migrations/20200116051619 b/db/schema_migrations/20200116051619 deleted file mode 100644 index d5aac9425a2..00000000000 --- a/db/schema_migrations/20200116051619 +++ /dev/null @@ -1 +0,0 @@ -3f7a744bd4e3cfcd34b158d1c18fe491fd34092cf873faf81af9fe32146e2d4c
\ No newline at end of file diff --git a/db/schema_migrations/20200116175538 b/db/schema_migrations/20200116175538 deleted file mode 100644 index 85045596827..00000000000 --- a/db/schema_migrations/20200116175538 +++ /dev/null @@ -1 +0,0 @@ -9960ac62201ae313b2b884b027740778ab7fce655a8017d2f966097a537eb9b0
\ No newline at end of file diff --git a/db/schema_migrations/20200117112554 b/db/schema_migrations/20200117112554 deleted file mode 100644 index 9c1ac447570..00000000000 --- a/db/schema_migrations/20200117112554 +++ /dev/null @@ -1 +0,0 @@ -d0ee4a357bfbbcb0211623171a48d443a6373b88a409c341ac1a49e3e0a773ce
\ No newline at end of file diff --git a/db/schema_migrations/20200117194830 b/db/schema_migrations/20200117194830 deleted file mode 100644 index d9d2a6a1953..00000000000 --- a/db/schema_migrations/20200117194830 +++ /dev/null @@ -1 +0,0 @@ -52ae64fef3e148e45a2b65eab37122a6cc7c1c580fc9391aaed898f7b3b3e3aa
\ No newline at end of file diff --git a/db/schema_migrations/20200117194840 b/db/schema_migrations/20200117194840 deleted file mode 100644 index 9673da5ce3f..00000000000 --- a/db/schema_migrations/20200117194840 +++ /dev/null @@ -1 +0,0 @@ -0a1278d223cafcb4fb164bc8f77b1b1be076ea576b0f610ba63c0a33aed35fc5
\ No newline at end of file diff --git a/db/schema_migrations/20200117194850 b/db/schema_migrations/20200117194850 deleted file mode 100644 index a388909900b..00000000000 --- a/db/schema_migrations/20200117194850 +++ /dev/null @@ -1 +0,0 @@ -6da075c7e03efc1d67cc1ad2c3142e748cfe6ca8324174bc4a75fe06bf3a9846
\ No newline at end of file diff --git a/db/schema_migrations/20200117194900 b/db/schema_migrations/20200117194900 deleted file mode 100644 index e0514abc560..00000000000 --- a/db/schema_migrations/20200117194900 +++ /dev/null @@ -1 +0,0 @@ -0a0701f610ed956bc57ad5197852acbd7eded9e598ccf30926735cf6209319c9
\ No newline at end of file diff --git a/db/schema_migrations/20200120083607 b/db/schema_migrations/20200120083607 deleted file mode 100644 index 2c5eb55b2c1..00000000000 --- a/db/schema_migrations/20200120083607 +++ /dev/null @@ -1 +0,0 @@ -d4949ac7b3ca7d2039daaf2afb39b606ff2cf4413c888958307e865e451a4209
\ No newline at end of file diff --git a/db/schema_migrations/20200121132641 b/db/schema_migrations/20200121132641 deleted file mode 100644 index 09b12d4aa0a..00000000000 --- a/db/schema_migrations/20200121132641 +++ /dev/null @@ -1 +0,0 @@ -e94dc0cc71ddba02eeeda68a476220c5912c58f214b83f20d62b98caa142240a
\ No newline at end of file diff --git a/db/schema_migrations/20200121192942 b/db/schema_migrations/20200121192942 deleted file mode 100644 index 91283f119fd..00000000000 --- a/db/schema_migrations/20200121192942 +++ /dev/null @@ -1 +0,0 @@ -a4b140e11ffccaede80f263ca4bf0a9f72e9bf95f166da519b4ee2054a96ec69
\ No newline at end of file diff --git a/db/schema_migrations/20200121194000 b/db/schema_migrations/20200121194000 deleted file mode 100644 index 6f2fdc0cc4e..00000000000 --- a/db/schema_migrations/20200121194000 +++ /dev/null @@ -1 +0,0 @@ -4b799208cf30f9dc30f3bdeb228b6c30b63550a32b897975fa0cbb3079a0c07e
\ No newline at end of file diff --git a/db/schema_migrations/20200121194048 b/db/schema_migrations/20200121194048 deleted file mode 100644 index bddbab9f16b..00000000000 --- a/db/schema_migrations/20200121194048 +++ /dev/null @@ -1 +0,0 @@ -33ba0b07d98f6902ac198ecd3b14487b525055ddfe9d0d563cc934731ff6767d
\ No newline at end of file diff --git a/db/schema_migrations/20200121194154 b/db/schema_migrations/20200121194154 deleted file mode 100644 index 90260047fb9..00000000000 --- a/db/schema_migrations/20200121194154 +++ /dev/null @@ -1 +0,0 @@ -f0da6b9af1c5890918837d8c061123c7b961874c3571828daf2931e4a70f0ed1
\ No newline at end of file diff --git a/db/schema_migrations/20200121200203 b/db/schema_migrations/20200121200203 deleted file mode 100644 index 5f63cbb42e4..00000000000 --- a/db/schema_migrations/20200121200203 +++ /dev/null @@ -1 +0,0 @@ -ab639a76eeb5524ff8c8b708d26821ddefbf1839e61dcfc884d8a8b18f4c50e4
\ No newline at end of file diff --git a/db/schema_migrations/20200122123016 b/db/schema_migrations/20200122123016 deleted file mode 100644 index 69584f7dfc7..00000000000 --- a/db/schema_migrations/20200122123016 +++ /dev/null @@ -1 +0,0 @@ -608e4f1c327085dd1121e7af04be07676a0d7812290ad6bddf92c40a76d8fb21
\ No newline at end of file diff --git a/db/schema_migrations/20200122144759 b/db/schema_migrations/20200122144759 deleted file mode 100644 index a049c6fe18e..00000000000 --- a/db/schema_migrations/20200122144759 +++ /dev/null @@ -1 +0,0 @@ -a0af4050dda77d1caf4f3a989f7d4183ffff328af983f691c0ba98329d1283d7
\ No newline at end of file diff --git a/db/schema_migrations/20200122161638 b/db/schema_migrations/20200122161638 deleted file mode 100644 index a1172c9ae71..00000000000 --- a/db/schema_migrations/20200122161638 +++ /dev/null @@ -1 +0,0 @@ -9465b28cf31235cab10a0cbcbfc7cdffe3277b5b01d65b390272cfa91af2c5dd
\ No newline at end of file diff --git a/db/schema_migrations/20200123040535 b/db/schema_migrations/20200123040535 deleted file mode 100644 index 52a47270607..00000000000 --- a/db/schema_migrations/20200123040535 +++ /dev/null @@ -1 +0,0 @@ -e3e21ce28714322b679a59476c9ce449c4ba7d6bee42754ecfa43b4b5fa5da73
\ No newline at end of file diff --git a/db/schema_migrations/20200123045415 b/db/schema_migrations/20200123045415 deleted file mode 100644 index 673952ec64b..00000000000 --- a/db/schema_migrations/20200123045415 +++ /dev/null @@ -1 +0,0 @@ -4c97265771d7dd793da2857391bc2d7092ae6c3a92c2a4249abe58420f7ac5f1
\ No newline at end of file diff --git a/db/schema_migrations/20200123090839 b/db/schema_migrations/20200123090839 deleted file mode 100644 index 94ecb06f298..00000000000 --- a/db/schema_migrations/20200123090839 +++ /dev/null @@ -1 +0,0 @@ -3b3292b611e5596f02ef63ae09e89f15a897ff748f4fbd8758fa35e30195fb78
\ No newline at end of file diff --git a/db/schema_migrations/20200123091422 b/db/schema_migrations/20200123091422 deleted file mode 100644 index f65804e4261..00000000000 --- a/db/schema_migrations/20200123091422 +++ /dev/null @@ -1 +0,0 @@ -f98df22c6c6d522ae4e2b143404d1e4434cc31ff1d8b1c9be8e33cbde8c7ea9d
\ No newline at end of file diff --git a/db/schema_migrations/20200123091622 b/db/schema_migrations/20200123091622 deleted file mode 100644 index 44cc7d7bf6f..00000000000 --- a/db/schema_migrations/20200123091622 +++ /dev/null @@ -1 +0,0 @@ -028253e34270832d6aa7d7fe69a8f33958d85d5d12cee46b9ea47b523202e48a
\ No newline at end of file diff --git a/db/schema_migrations/20200123091734 b/db/schema_migrations/20200123091734 deleted file mode 100644 index 5e1ac40dcd7..00000000000 --- a/db/schema_migrations/20200123091734 +++ /dev/null @@ -1 +0,0 @@ -ce02c924eed148ac534b93056691d1d0306c7a45dad92f3dc91fd76b7a0792b7
\ No newline at end of file diff --git a/db/schema_migrations/20200123091854 b/db/schema_migrations/20200123091854 deleted file mode 100644 index ad06c23b2fd..00000000000 --- a/db/schema_migrations/20200123091854 +++ /dev/null @@ -1 +0,0 @@ -7094292c63f651c6efa63cd2be16ff9068cb6b914c60aabefe4c9dec98097d0e
\ No newline at end of file diff --git a/db/schema_migrations/20200123155929 b/db/schema_migrations/20200123155929 deleted file mode 100644 index 5bc6645766c..00000000000 --- a/db/schema_migrations/20200123155929 +++ /dev/null @@ -1 +0,0 @@ -27b0cd6f4503caab38dd480df6c928a00b178accb66f30015159bcc7dd7ce1f5
\ No newline at end of file diff --git a/db/schema_migrations/20200124053531 b/db/schema_migrations/20200124053531 deleted file mode 100644 index 5deab13f348..00000000000 --- a/db/schema_migrations/20200124053531 +++ /dev/null @@ -1 +0,0 @@ -809f368efa8d0b3d6129af9d41a59901495bd77e2727f2e16f8f60d3955b907d
\ No newline at end of file diff --git a/db/schema_migrations/20200124110831 b/db/schema_migrations/20200124110831 deleted file mode 100644 index 836990c915d..00000000000 --- a/db/schema_migrations/20200124110831 +++ /dev/null @@ -1 +0,0 @@ -06cea4564bf349dad9fd3daea7d07d6e20a799d28e4b88bf4a5540b2d3e43312
\ No newline at end of file diff --git a/db/schema_migrations/20200124143014 b/db/schema_migrations/20200124143014 deleted file mode 100644 index bedad0bc3d2..00000000000 --- a/db/schema_migrations/20200124143014 +++ /dev/null @@ -1 +0,0 @@ -184b52cc62b60bb5cb591ab97f308cfe9c18c7a50a56a2cda10e3a368ca25eed
\ No newline at end of file diff --git a/db/schema_migrations/20200127090233 b/db/schema_migrations/20200127090233 deleted file mode 100644 index e40ff846729..00000000000 --- a/db/schema_migrations/20200127090233 +++ /dev/null @@ -1 +0,0 @@ -551f27aa8b30b0bb567f53b0d64035a9d78bac1d41f2092a97393e17e70c699d
\ No newline at end of file diff --git a/db/schema_migrations/20200127111840 b/db/schema_migrations/20200127111840 deleted file mode 100644 index 089d3e2ed4e..00000000000 --- a/db/schema_migrations/20200127111840 +++ /dev/null @@ -1 +0,0 @@ -6431cf736beb0ce1143e87b79072984f016588eaf5b84524e6c30d6073912aa2
\ No newline at end of file diff --git a/db/schema_migrations/20200128105731 b/db/schema_migrations/20200128105731 deleted file mode 100644 index c67dff213e8..00000000000 --- a/db/schema_migrations/20200128105731 +++ /dev/null @@ -1 +0,0 @@ -5f99d04999b9653ad52c45cdf1466f18a5e77642c39b23ee10ffb8f7c0f67c51
\ No newline at end of file diff --git a/db/schema_migrations/20200128132510 b/db/schema_migrations/20200128132510 deleted file mode 100644 index 4283d949452..00000000000 --- a/db/schema_migrations/20200128132510 +++ /dev/null @@ -1 +0,0 @@ -b8a2d0b16a9bd1ea04f1f9aff36d70438fddd01a526421e347b69ddf9536a573
\ No newline at end of file diff --git a/db/schema_migrations/20200128133510 b/db/schema_migrations/20200128133510 deleted file mode 100644 index 176cb596b5b..00000000000 --- a/db/schema_migrations/20200128133510 +++ /dev/null @@ -1 +0,0 @@ -a58d4bb491a6f263757a45b3e60a54398cab9af071d1a665b315d920281f5dd4
\ No newline at end of file diff --git a/db/schema_migrations/20200128134110 b/db/schema_migrations/20200128134110 deleted file mode 100644 index b979354def7..00000000000 --- a/db/schema_migrations/20200128134110 +++ /dev/null @@ -1 +0,0 @@ -d6d0fda1962dd14759f986c5e9b749af56d95fa145a8092bc96b3c90a1f9437a
\ No newline at end of file diff --git a/db/schema_migrations/20200128141125 b/db/schema_migrations/20200128141125 deleted file mode 100644 index 21edb204f8f..00000000000 --- a/db/schema_migrations/20200128141125 +++ /dev/null @@ -1 +0,0 @@ -180c07b1fb133fb49793fd32ae7d2754ad3868dcc62628ea4f620592239964cc
\ No newline at end of file diff --git a/db/schema_migrations/20200128184209 b/db/schema_migrations/20200128184209 deleted file mode 100644 index 2fc1db50a49..00000000000 --- a/db/schema_migrations/20200128184209 +++ /dev/null @@ -1 +0,0 @@ -7acc066caad15b0081e68385f88e4c7df202626b4d105dc80249d60fec042674
\ No newline at end of file diff --git a/db/schema_migrations/20200128210353 b/db/schema_migrations/20200128210353 deleted file mode 100644 index aadede5c768..00000000000 --- a/db/schema_migrations/20200128210353 +++ /dev/null @@ -1 +0,0 @@ -03a6e7814edab68dccd70b7311c7a4be35012b22e32a24892202ace2de2c1fc2
\ No newline at end of file diff --git a/db/schema_migrations/20200129034515 b/db/schema_migrations/20200129034515 deleted file mode 100644 index bc0b6847679..00000000000 --- a/db/schema_migrations/20200129034515 +++ /dev/null @@ -1 +0,0 @@ -fd61c456af5fe87c8b6f4f914c745ac925542f6ac1720ecbbb4b737b0c6ab269
\ No newline at end of file diff --git a/db/schema_migrations/20200129035446 b/db/schema_migrations/20200129035446 deleted file mode 100644 index 806b6d57607..00000000000 --- a/db/schema_migrations/20200129035446 +++ /dev/null @@ -1 +0,0 @@ -752c46974acf90a65b8b06890df69a34323f9ced16f6f66b0cc2e7ffde0ed40d
\ No newline at end of file diff --git a/db/schema_migrations/20200129035708 b/db/schema_migrations/20200129035708 deleted file mode 100644 index 781fef03fae..00000000000 --- a/db/schema_migrations/20200129035708 +++ /dev/null @@ -1 +0,0 @@ -b20f3a33b73b01a377632ad283d750fbc14981703bf81568394a427343600c5d
\ No newline at end of file diff --git a/db/schema_migrations/20200129133716 b/db/schema_migrations/20200129133716 deleted file mode 100644 index 6496b3adfb1..00000000000 --- a/db/schema_migrations/20200129133716 +++ /dev/null @@ -1 +0,0 @@ -8e81ca233cbdbde9e3cfe80e98cd696215a0afcfffbf7f7beceddd64e4f3e45c
\ No newline at end of file diff --git a/db/schema_migrations/20200129172428 b/db/schema_migrations/20200129172428 deleted file mode 100644 index e340d839982..00000000000 --- a/db/schema_migrations/20200129172428 +++ /dev/null @@ -1 +0,0 @@ -b31323a82c1dd1a243b239f3dc7e153c5382414d58e4e5705ec1172daf2ed904
\ No newline at end of file diff --git a/db/schema_migrations/20200130134335 b/db/schema_migrations/20200130134335 deleted file mode 100644 index c367634e88e..00000000000 --- a/db/schema_migrations/20200130134335 +++ /dev/null @@ -1 +0,0 @@ -42b0bcb9478b21bfe36b706f522840102ac51b262bcb39c8869d08982df5b9d7
\ No newline at end of file diff --git a/db/schema_migrations/20200130145430 b/db/schema_migrations/20200130145430 deleted file mode 100644 index 3307a7b4644..00000000000 --- a/db/schema_migrations/20200130145430 +++ /dev/null @@ -1 +0,0 @@ -fa9812acb3fbd3ac0675a2e4b8b507d03bcd6a6511505f80c8ee0fae96d9e533
\ No newline at end of file diff --git a/db/schema_migrations/20200130161817 b/db/schema_migrations/20200130161817 deleted file mode 100644 index b675f896375..00000000000 --- a/db/schema_migrations/20200130161817 +++ /dev/null @@ -1 +0,0 @@ -ff833f3f95571a8efadea98a5b8c5752252289ac6a99de8e13f695a25d2c4706
\ No newline at end of file diff --git a/db/schema_migrations/20200131140428 b/db/schema_migrations/20200131140428 deleted file mode 100644 index 5874ec0f1ce..00000000000 --- a/db/schema_migrations/20200131140428 +++ /dev/null @@ -1 +0,0 @@ -0dda3b200923e502f27c3b7107cc2ff1967d906987b4065d5992a9c43f73d46f
\ No newline at end of file diff --git a/db/schema_migrations/20200131181354 b/db/schema_migrations/20200131181354 deleted file mode 100644 index 043c3c99347..00000000000 --- a/db/schema_migrations/20200131181354 +++ /dev/null @@ -1 +0,0 @@ -d7c68a93d9f4251d0b070d1b351afc9acb122b60e7c1456b23b928d4202c7ff5
\ No newline at end of file diff --git a/db/schema_migrations/20200131191754 b/db/schema_migrations/20200131191754 deleted file mode 100644 index 12d8189825f..00000000000 --- a/db/schema_migrations/20200131191754 +++ /dev/null @@ -1 +0,0 @@ -4ca4376f967f2e61f19e42ee61504acb30b53be6a1f8bfe3180a55739dcac73d
\ No newline at end of file diff --git a/db/schema_migrations/20200202100932 b/db/schema_migrations/20200202100932 deleted file mode 100644 index 3a42f098816..00000000000 --- a/db/schema_migrations/20200202100932 +++ /dev/null @@ -1 +0,0 @@ -5b6bf2e370759e18c2a0558b89b215e00bf9d20b28773a72a5935a649c673bfd
\ No newline at end of file diff --git a/db/schema_migrations/20200203015140 b/db/schema_migrations/20200203015140 deleted file mode 100644 index 36669bd5265..00000000000 --- a/db/schema_migrations/20200203015140 +++ /dev/null @@ -1 +0,0 @@ -b6e93d2a0e293f4701fe9a228deb1926cff595ae50860f783417ac834dcfef4f
\ No newline at end of file diff --git a/db/schema_migrations/20200203025400 b/db/schema_migrations/20200203025400 deleted file mode 100644 index 7f0bcc12d5f..00000000000 --- a/db/schema_migrations/20200203025400 +++ /dev/null @@ -1 +0,0 @@ -e88f8eb40e5a16da89ba555c26aa886ac0653115dd1333ce1def6ad648cf7f03
\ No newline at end of file diff --git a/db/schema_migrations/20200203025602 b/db/schema_migrations/20200203025602 deleted file mode 100644 index 8ae10e3e6a8..00000000000 --- a/db/schema_migrations/20200203025602 +++ /dev/null @@ -1 +0,0 @@ -3867f94f138297bd3219fbc7e52aa5448d24ff9447664869e836d0097cae4b4c
\ No newline at end of file diff --git a/db/schema_migrations/20200203025619 b/db/schema_migrations/20200203025619 deleted file mode 100644 index f5937cf8f3a..00000000000 --- a/db/schema_migrations/20200203025619 +++ /dev/null @@ -1 +0,0 @@ -202883912d9728bcbad2a63af9935c116833e51c0f8dec198f76c635f76409fa
\ No newline at end of file diff --git a/db/schema_migrations/20200203025744 b/db/schema_migrations/20200203025744 deleted file mode 100644 index 9711a318f91..00000000000 --- a/db/schema_migrations/20200203025744 +++ /dev/null @@ -1 +0,0 @@ -a20b4d064d76718dc97014b62e751dad983db2730b552a39bd2f5255f50d6a72
\ No newline at end of file diff --git a/db/schema_migrations/20200203025801 b/db/schema_migrations/20200203025801 deleted file mode 100644 index a892f83100c..00000000000 --- a/db/schema_migrations/20200203025801 +++ /dev/null @@ -1 +0,0 @@ -906db40d8d7d2f645b42b1a23b2ecbb67efc5bb80d2ff06a7ab17097e9a002e1
\ No newline at end of file diff --git a/db/schema_migrations/20200203025821 b/db/schema_migrations/20200203025821 deleted file mode 100644 index f1bc002ea10..00000000000 --- a/db/schema_migrations/20200203025821 +++ /dev/null @@ -1 +0,0 @@ -fe4238c19b0cd8abf83198477fa6d74cca873b111bd3d5e63e13a511aed29022
\ No newline at end of file diff --git a/db/schema_migrations/20200203104214 b/db/schema_migrations/20200203104214 deleted file mode 100644 index 57996942284..00000000000 --- a/db/schema_migrations/20200203104214 +++ /dev/null @@ -1 +0,0 @@ -f72dce36394a51516dd9306b1626cde4151317ef891d2d00fd6668e33c734bcd
\ No newline at end of file diff --git a/db/schema_migrations/20200203173508 b/db/schema_migrations/20200203173508 deleted file mode 100644 index 8d9157c61f0..00000000000 --- a/db/schema_migrations/20200203173508 +++ /dev/null @@ -1 +0,0 @@ -e0a7a10f8e2d21b859b67f51926d8404c650db1642800738938509653f680fd9
\ No newline at end of file diff --git a/db/schema_migrations/20200203183508 b/db/schema_migrations/20200203183508 deleted file mode 100644 index 63ef7355c99..00000000000 --- a/db/schema_migrations/20200203183508 +++ /dev/null @@ -1 +0,0 @@ -87cfeb92aa7257a249c3a0504d72a372f8da17671da68373efda75e8d9153be4
\ No newline at end of file diff --git a/db/schema_migrations/20200203232433 b/db/schema_migrations/20200203232433 deleted file mode 100644 index 2ad3579da47..00000000000 --- a/db/schema_migrations/20200203232433 +++ /dev/null @@ -1 +0,0 @@ -6a23d6bd7573f193189d224283920da13dde870f432bf4e2d72f256162a87aa4
\ No newline at end of file diff --git a/db/schema_migrations/20200204070729 b/db/schema_migrations/20200204070729 deleted file mode 100644 index c2e1cc805f7..00000000000 --- a/db/schema_migrations/20200204070729 +++ /dev/null @@ -1 +0,0 @@ -df733328a6bb6b430d510757104e767ba9a37b6f6ee8b6d1423a4b1579f7a342
\ No newline at end of file diff --git a/db/schema_migrations/20200204113223 b/db/schema_migrations/20200204113223 deleted file mode 100644 index 4447990a16b..00000000000 --- a/db/schema_migrations/20200204113223 +++ /dev/null @@ -1 +0,0 @@ -301ec018abcab2311852c952f925460dad9c374ca3df146cbddfcc17821c0d85
\ No newline at end of file diff --git a/db/schema_migrations/20200204113224 b/db/schema_migrations/20200204113224 deleted file mode 100644 index ce45309a877..00000000000 --- a/db/schema_migrations/20200204113224 +++ /dev/null @@ -1 +0,0 @@ -4fc5ffc3ce0519a9a79559644f0453439582577fbfffb434c7b0f33c5942aa36
\ No newline at end of file diff --git a/db/schema_migrations/20200204113225 b/db/schema_migrations/20200204113225 deleted file mode 100644 index 44b779d5f86..00000000000 --- a/db/schema_migrations/20200204113225 +++ /dev/null @@ -1 +0,0 @@ -13e39ebe5de6076f1702fa92421d9906984587a8acd92d210b96fc14060c555d
\ No newline at end of file diff --git a/db/schema_migrations/20200204131054 b/db/schema_migrations/20200204131054 deleted file mode 100644 index 98dd8225bd8..00000000000 --- a/db/schema_migrations/20200204131054 +++ /dev/null @@ -1 +0,0 @@ -5eddc68cf19810dd065a687e90e5e487fde581d907490756fc297862e2a56dc3
\ No newline at end of file diff --git a/db/schema_migrations/20200204131831 b/db/schema_migrations/20200204131831 deleted file mode 100644 index ca41129f6d9..00000000000 --- a/db/schema_migrations/20200204131831 +++ /dev/null @@ -1 +0,0 @@ -6b0162763fae1fa73ed940928e889637e52dd918af2c3fe4d338b958c1ccbb03
\ No newline at end of file diff --git a/db/schema_migrations/20200205143231 b/db/schema_migrations/20200205143231 deleted file mode 100644 index 3e7ff885264..00000000000 --- a/db/schema_migrations/20200205143231 +++ /dev/null @@ -1 +0,0 @@ -c982bf7b26305e060ef268cc5a963f761a3feadbae71ac008a7b3a76a59e71ca
\ No newline at end of file diff --git a/db/schema_migrations/20200206091544 b/db/schema_migrations/20200206091544 deleted file mode 100644 index 55660a6ae53..00000000000 --- a/db/schema_migrations/20200206091544 +++ /dev/null @@ -1 +0,0 @@ -bce288b2da2165a690e20a1c6ad02bf652ed5bb4b9b249b90ca77aef5ad8006b
\ No newline at end of file diff --git a/db/schema_migrations/20200206112850 b/db/schema_migrations/20200206112850 deleted file mode 100644 index 85d21501d86..00000000000 --- a/db/schema_migrations/20200206112850 +++ /dev/null @@ -1 +0,0 @@ -05f0fd8358bc134c358365b6fd054e29d9d2aaf4607e6f6e8f0e464cc99b0789
\ No newline at end of file diff --git a/db/schema_migrations/20200206135203 b/db/schema_migrations/20200206135203 deleted file mode 100644 index 63969a76fb8..00000000000 --- a/db/schema_migrations/20200206135203 +++ /dev/null @@ -1 +0,0 @@ -3637bebdf55d4210796153fafb481295f2f571552ea941fd02b5c34e753992ad
\ No newline at end of file diff --git a/db/schema_migrations/20200206141511 b/db/schema_migrations/20200206141511 deleted file mode 100644 index 4b7ade65253..00000000000 --- a/db/schema_migrations/20200206141511 +++ /dev/null @@ -1 +0,0 @@ -49493da849aaa283ad04d44146befabdc917db759eba6e8a9192823655a27321
\ No newline at end of file diff --git a/db/schema_migrations/20200207062728 b/db/schema_migrations/20200207062728 deleted file mode 100644 index e89908e233b..00000000000 --- a/db/schema_migrations/20200207062728 +++ /dev/null @@ -1 +0,0 @@ -3dfd44b1ca862a568577b5f5d81727ccdc21e818c55741c60763324084206aff
\ No newline at end of file diff --git a/db/schema_migrations/20200207090921 b/db/schema_migrations/20200207090921 deleted file mode 100644 index fe8b0073109..00000000000 --- a/db/schema_migrations/20200207090921 +++ /dev/null @@ -1 +0,0 @@ -86d3faf27e816d5f9ef4b7125baa2d24cd8bc0987cdc796fea34e84f7ad15213
\ No newline at end of file diff --git a/db/schema_migrations/20200207132752 b/db/schema_migrations/20200207132752 deleted file mode 100644 index 5c4d98baf7a..00000000000 --- a/db/schema_migrations/20200207132752 +++ /dev/null @@ -1 +0,0 @@ -c3b9788fcd9e434a061ed82f481781eb9960829ff6e2174637b17f857f747163
\ No newline at end of file diff --git a/db/schema_migrations/20200207151640 b/db/schema_migrations/20200207151640 deleted file mode 100644 index 202427114f0..00000000000 --- a/db/schema_migrations/20200207151640 +++ /dev/null @@ -1 +0,0 @@ -c40ba483437d4cfcff73488d272efc9010922bf58f05790dcab99681653dcec7
\ No newline at end of file diff --git a/db/schema_migrations/20200207182131 b/db/schema_migrations/20200207182131 deleted file mode 100644 index d57e44c992b..00000000000 --- a/db/schema_migrations/20200207182131 +++ /dev/null @@ -1 +0,0 @@ -ec80914c6c7ffcede1cba96e99dcb650d497f8f75ac786e449da83cae72284f1
\ No newline at end of file diff --git a/db/schema_migrations/20200207184023 b/db/schema_migrations/20200207184023 deleted file mode 100644 index 99c06c639b4..00000000000 --- a/db/schema_migrations/20200207184023 +++ /dev/null @@ -1 +0,0 @@ -de7546a714536c45d64ebc81d6a32e5159baed049b3b0d84c5d0e6f175098f8f
\ No newline at end of file diff --git a/db/schema_migrations/20200207185149 b/db/schema_migrations/20200207185149 deleted file mode 100644 index 8fd081c423b..00000000000 --- a/db/schema_migrations/20200207185149 +++ /dev/null @@ -1 +0,0 @@ -6f89d4a9bebbfe12efab87caf4715577e33ff3f72c6adb5e847c9a946231eba2
\ No newline at end of file diff --git a/db/schema_migrations/20200209131152 b/db/schema_migrations/20200209131152 deleted file mode 100644 index 26243203758..00000000000 --- a/db/schema_migrations/20200209131152 +++ /dev/null @@ -1 +0,0 @@ -cc86dc6e5a4dc194da858e900720be169f0491d8bdf43e3be2c239d835db81a9
\ No newline at end of file diff --git a/db/schema_migrations/20200210062432 b/db/schema_migrations/20200210062432 deleted file mode 100644 index ed644130bbf..00000000000 --- a/db/schema_migrations/20200210062432 +++ /dev/null @@ -1 +0,0 @@ -42b2970731451f93f6a704634e91e236fd0303781cd55848d6ea7d8d28993ba6
\ No newline at end of file diff --git a/db/schema_migrations/20200210092405 b/db/schema_migrations/20200210092405 deleted file mode 100644 index f984f9692db..00000000000 --- a/db/schema_migrations/20200210092405 +++ /dev/null @@ -1 +0,0 @@ -034b1ef6728823ce13e68223e447713145e2c5ccedcdaee0294cc33a4ea0f345
\ No newline at end of file diff --git a/db/schema_migrations/20200210135504 b/db/schema_migrations/20200210135504 deleted file mode 100644 index 25c336ea54e..00000000000 --- a/db/schema_migrations/20200210135504 +++ /dev/null @@ -1 +0,0 @@ -bc188c6727b80851c0d051162ec08c142863854a4aea020f79f986c94425a4f7
\ No newline at end of file diff --git a/db/schema_migrations/20200210184410 b/db/schema_migrations/20200210184410 deleted file mode 100644 index 51584a0e3f0..00000000000 --- a/db/schema_migrations/20200210184410 +++ /dev/null @@ -1 +0,0 @@ -6dda1a048429cd241b2556446c3d6b05ac175f16fb024542af30e6047a3638b8
\ No newline at end of file diff --git a/db/schema_migrations/20200210184420 b/db/schema_migrations/20200210184420 deleted file mode 100644 index 5e527eee87d..00000000000 --- a/db/schema_migrations/20200210184420 +++ /dev/null @@ -1 +0,0 @@ -9b14148bd5c9137f1b90bfd256f31b2ea292d64e407e1de851fd139af7669db5
\ No newline at end of file diff --git a/db/schema_migrations/20200211152410 b/db/schema_migrations/20200211152410 deleted file mode 100644 index fb54ddf486c..00000000000 --- a/db/schema_migrations/20200211152410 +++ /dev/null @@ -1 +0,0 @@ -41958f432ea338232ec656daf78211207d08aa322005aed41d5da48d35b1c9da
\ No newline at end of file diff --git a/db/schema_migrations/20200211155000 b/db/schema_migrations/20200211155000 deleted file mode 100644 index 7a7264ec94b..00000000000 --- a/db/schema_migrations/20200211155000 +++ /dev/null @@ -1 +0,0 @@ -02f03e83a36adc41dc830ba58346c57195cca016dccd1c1301ac1d8614c68d08
\ No newline at end of file diff --git a/db/schema_migrations/20200211155100 b/db/schema_migrations/20200211155100 deleted file mode 100644 index a9a12f034a4..00000000000 --- a/db/schema_migrations/20200211155100 +++ /dev/null @@ -1 +0,0 @@ -669b32d2fe15eeb319efb3a9274cb9b1bc70e3cf6008d3d8df73cdcec657d7cc
\ No newline at end of file diff --git a/db/schema_migrations/20200211155539 b/db/schema_migrations/20200211155539 deleted file mode 100644 index aa9fa6d2ea5..00000000000 --- a/db/schema_migrations/20200211155539 +++ /dev/null @@ -1 +0,0 @@ -e0ed779651b1a271d4e71836275922e01c37fba895466390ebc30ec27b67b1e6
\ No newline at end of file diff --git a/db/schema_migrations/20200211174946 b/db/schema_migrations/20200211174946 deleted file mode 100644 index 8bc4d6c52fa..00000000000 --- a/db/schema_migrations/20200211174946 +++ /dev/null @@ -1 +0,0 @@ -8766a3d8973df6c402059abd7b63dfd52a8e2f49999bb8bb1b5595efa1c13844
\ No newline at end of file diff --git a/db/schema_migrations/20200212014653 b/db/schema_migrations/20200212014653 deleted file mode 100644 index 5c09818b0c9..00000000000 --- a/db/schema_migrations/20200212014653 +++ /dev/null @@ -1 +0,0 @@ -145e354e2c5249c75748f91d95d8f174f9b9d20a59dcb1f70d0cfaab6d082c28
\ No newline at end of file diff --git a/db/schema_migrations/20200212052620 b/db/schema_migrations/20200212052620 deleted file mode 100644 index 4a0adc09483..00000000000 --- a/db/schema_migrations/20200212052620 +++ /dev/null @@ -1 +0,0 @@ -355923f56df66ac6d4b24c47b9fad214553b783e3d5b45d76128c8872e1ada93
\ No newline at end of file diff --git a/db/schema_migrations/20200212133945 b/db/schema_migrations/20200212133945 deleted file mode 100644 index d812ae5161a..00000000000 --- a/db/schema_migrations/20200212133945 +++ /dev/null @@ -1 +0,0 @@ -cd0206f5a636002299b526b13bfcc3a684f74826a7963151c50e35902ba63dc4
\ No newline at end of file diff --git a/db/schema_migrations/20200212134201 b/db/schema_migrations/20200212134201 deleted file mode 100644 index 5fa3a35de15..00000000000 --- a/db/schema_migrations/20200212134201 +++ /dev/null @@ -1 +0,0 @@ -b757fdcd5e6afafa966911506d687d78e16e6d51a0a23c96821935e28661d89f
\ No newline at end of file diff --git a/db/schema_migrations/20200213093702 b/db/schema_migrations/20200213093702 deleted file mode 100644 index f41a455a24a..00000000000 --- a/db/schema_migrations/20200213093702 +++ /dev/null @@ -1 +0,0 @@ -d0fb4e573879340191432e9e653b6326aaf69b53c7f5fe3c18c5cee9d795d169
\ No newline at end of file diff --git a/db/schema_migrations/20200213100530 b/db/schema_migrations/20200213100530 deleted file mode 100644 index aaa91ba9906..00000000000 --- a/db/schema_migrations/20200213100530 +++ /dev/null @@ -1 +0,0 @@ -f96d42370627657876a3b2fa30ce40b0988a78132ed97a733e76429023967c31
\ No newline at end of file diff --git a/db/schema_migrations/20200213155311 b/db/schema_migrations/20200213155311 deleted file mode 100644 index 724b411345e..00000000000 --- a/db/schema_migrations/20200213155311 +++ /dev/null @@ -1 +0,0 @@ -a2905bcfdda4f5c43cb797653fe06f93e6bdaa28e77d204c64f3299daa58a276
\ No newline at end of file diff --git a/db/schema_migrations/20200213204737 b/db/schema_migrations/20200213204737 deleted file mode 100644 index 649f9927f7c..00000000000 --- a/db/schema_migrations/20200213204737 +++ /dev/null @@ -1 +0,0 @@ -2bdaa84098768e63eabbcb282339946404f04a0bcee6df0fb9c55a92bed7ac96
\ No newline at end of file diff --git a/db/schema_migrations/20200213220159 b/db/schema_migrations/20200213220159 deleted file mode 100644 index 3be052e646d..00000000000 --- a/db/schema_migrations/20200213220159 +++ /dev/null @@ -1 +0,0 @@ -4cc3d7904c7d8cb8437fa3f0638d250653f9f9d4ba4a749213995565b4d2b453
\ No newline at end of file diff --git a/db/schema_migrations/20200213220211 b/db/schema_migrations/20200213220211 deleted file mode 100644 index 4083c2dbc86..00000000000 --- a/db/schema_migrations/20200213220211 +++ /dev/null @@ -1 +0,0 @@ -c9a8e253caf9866b989f91344e51552ace7bcc11a79f8e8532df6c437938003c
\ No newline at end of file diff --git a/db/schema_migrations/20200213224220 b/db/schema_migrations/20200213224220 deleted file mode 100644 index bb2bfec2832..00000000000 --- a/db/schema_migrations/20200213224220 +++ /dev/null @@ -1 +0,0 @@ -05d38262b89290923aec19056eba00a8033801035584078b114be942602829fd
\ No newline at end of file diff --git a/db/schema_migrations/20200214025454 b/db/schema_migrations/20200214025454 deleted file mode 100644 index dd316902059..00000000000 --- a/db/schema_migrations/20200214025454 +++ /dev/null @@ -1 +0,0 @@ -9d6f4df037418ec3d15fbf4b478d8436086a14db4cd99fb274821b0d507016da
\ No newline at end of file diff --git a/db/schema_migrations/20200214034836 b/db/schema_migrations/20200214034836 deleted file mode 100644 index ae1fd50853c..00000000000 --- a/db/schema_migrations/20200214034836 +++ /dev/null @@ -1 +0,0 @@ -9fc56490b8122fe535405b88cd066b955ab8ec26fc9ed930217d8b544ff94924
\ No newline at end of file diff --git a/db/schema_migrations/20200214085940 b/db/schema_migrations/20200214085940 deleted file mode 100644 index 10c55e8f6f8..00000000000 --- a/db/schema_migrations/20200214085940 +++ /dev/null @@ -1 +0,0 @@ -785efb7b3966d2eedac586ef9fb76958f4e8569fa26460a9fa1f56c0adffb018
\ No newline at end of file diff --git a/db/schema_migrations/20200214214934 b/db/schema_migrations/20200214214934 deleted file mode 100644 index d0558255902..00000000000 --- a/db/schema_migrations/20200214214934 +++ /dev/null @@ -1 +0,0 @@ -08d552ba41c948f9b86d808ab3dfcd3f6d87932bf2a7e8b553931772d538644e
\ No newline at end of file diff --git a/db/schema_migrations/20200215222507 b/db/schema_migrations/20200215222507 deleted file mode 100644 index 9679ada2092..00000000000 --- a/db/schema_migrations/20200215222507 +++ /dev/null @@ -1 +0,0 @@ -d8e12f44580369a24e4ad521f91038ada113f0c404c5d834a88a2f992cb56fe3
\ No newline at end of file diff --git a/db/schema_migrations/20200215225103 b/db/schema_migrations/20200215225103 deleted file mode 100644 index 4a10c2d220f..00000000000 --- a/db/schema_migrations/20200215225103 +++ /dev/null @@ -1 +0,0 @@ -a59ad729a2ec17dde6a663903f0a5154b0cd79fa6dd915e637804c40fc75d27e
\ No newline at end of file diff --git a/db/schema_migrations/20200217210353 b/db/schema_migrations/20200217210353 deleted file mode 100644 index 6209436dd98..00000000000 --- a/db/schema_migrations/20200217210353 +++ /dev/null @@ -1 +0,0 @@ -1da054d1cc3544e37dbabd61475ac8e7944fa7542fb830d2bb317c1a8e49308e
\ No newline at end of file diff --git a/db/schema_migrations/20200217223651 b/db/schema_migrations/20200217223651 deleted file mode 100644 index c25e0437e2e..00000000000 --- a/db/schema_migrations/20200217223651 +++ /dev/null @@ -1 +0,0 @@ -c1040531e0993eebc432ecbca4bb44ae81e922689950d437ca0ba671cabaa6da
\ No newline at end of file diff --git a/db/schema_migrations/20200217225719 b/db/schema_migrations/20200217225719 deleted file mode 100644 index fe948d685ac..00000000000 --- a/db/schema_migrations/20200217225719 +++ /dev/null @@ -1 +0,0 @@ -effe679c2902af4598100760834a1a186a9f9bf4ba9c2bf1b578aa709973c3eb
\ No newline at end of file diff --git a/db/schema_migrations/20200218113721 b/db/schema_migrations/20200218113721 deleted file mode 100644 index 92f27184f71..00000000000 --- a/db/schema_migrations/20200218113721 +++ /dev/null @@ -1 +0,0 @@ -ebc9e7ab299805e98960828d15129b86364d7553a9479924a2535927f9d04ad0
\ No newline at end of file diff --git a/db/schema_migrations/20200219105209 b/db/schema_migrations/20200219105209 deleted file mode 100644 index 6339ba9c491..00000000000 --- a/db/schema_migrations/20200219105209 +++ /dev/null @@ -1 +0,0 @@ -043df0eb40876ff8e211a21fd7044d0e64d22df6a69fb666cbac0b73767dea1e
\ No newline at end of file diff --git a/db/schema_migrations/20200219133859 b/db/schema_migrations/20200219133859 deleted file mode 100644 index 8e8d60c771d..00000000000 --- a/db/schema_migrations/20200219133859 +++ /dev/null @@ -1 +0,0 @@ -7a98e68a00bc69823ead39868d76b8c1d81cfe491a98481c711effe488ed8544
\ No newline at end of file diff --git a/db/schema_migrations/20200219135440 b/db/schema_migrations/20200219135440 deleted file mode 100644 index 70e7c5a2dd9..00000000000 --- a/db/schema_migrations/20200219135440 +++ /dev/null @@ -1 +0,0 @@ -b6aab8e12c460e97d8c84128ad7186286c0a5d6bb94b55e86d5c112296d63e3a
\ No newline at end of file diff --git a/db/schema_migrations/20200219141307 b/db/schema_migrations/20200219141307 deleted file mode 100644 index 9e9fca81c8b..00000000000 --- a/db/schema_migrations/20200219141307 +++ /dev/null @@ -1 +0,0 @@ -e3a9c39f4d09885b5ddac27da42272e3bc8cab408871c4af0013759b39a1fc47
\ No newline at end of file diff --git a/db/schema_migrations/20200219142522 b/db/schema_migrations/20200219142522 deleted file mode 100644 index 6b9d9dbf295..00000000000 --- a/db/schema_migrations/20200219142522 +++ /dev/null @@ -1 +0,0 @@ -5e8ae04a1a398cb0d68c8a2e2eba55132a24049fc382876e657755993c322637
\ No newline at end of file diff --git a/db/schema_migrations/20200219183456 b/db/schema_migrations/20200219183456 deleted file mode 100644 index 085e82e2466..00000000000 --- a/db/schema_migrations/20200219183456 +++ /dev/null @@ -1 +0,0 @@ -bcb00dc5e3c6a5b929fa5a09b84a852daeacce3ab349ad3f225aaac7a8877495
\ No newline at end of file diff --git a/db/schema_migrations/20200219184219 b/db/schema_migrations/20200219184219 deleted file mode 100644 index 42a74bfaae7..00000000000 --- a/db/schema_migrations/20200219184219 +++ /dev/null @@ -1 +0,0 @@ -909be57df344b07c93404eb2b699f1d269c788bb05021fc89fb06f97a3bef2b3
\ No newline at end of file diff --git a/db/schema_migrations/20200219193058 b/db/schema_migrations/20200219193058 deleted file mode 100644 index 7ffa3ee314c..00000000000 --- a/db/schema_migrations/20200219193058 +++ /dev/null @@ -1 +0,0 @@ -8deaeff4e509d62c937be3facd3110ea3cb667df57ae07662b24d81678852fb5
\ No newline at end of file diff --git a/db/schema_migrations/20200219193117 b/db/schema_migrations/20200219193117 deleted file mode 100644 index d0dafc2a08d..00000000000 --- a/db/schema_migrations/20200219193117 +++ /dev/null @@ -1 +0,0 @@ -c09ada7750dbd41af67c76c85172e044600ea46011ba74c9e25ea4c818809494
\ No newline at end of file diff --git a/db/schema_migrations/20200220115023 b/db/schema_migrations/20200220115023 deleted file mode 100644 index b9078b285e5..00000000000 --- a/db/schema_migrations/20200220115023 +++ /dev/null @@ -1 +0,0 @@ -77d4e8365959a86ea77858273c89c2c0b8c788d2e89659213944edd3d5273813
\ No newline at end of file diff --git a/db/schema_migrations/20200220180944 b/db/schema_migrations/20200220180944 deleted file mode 100644 index 7dcadb16447..00000000000 --- a/db/schema_migrations/20200220180944 +++ /dev/null @@ -1 +0,0 @@ -5a2684c95dc33d601403cc775afe52071c55026aaa8744faefde0c15cc1b14fd
\ No newline at end of file diff --git a/db/schema_migrations/20200221023320 b/db/schema_migrations/20200221023320 deleted file mode 100644 index c66a766f493..00000000000 --- a/db/schema_migrations/20200221023320 +++ /dev/null @@ -1 +0,0 @@ -445c20a2bd9f1fef7f36fb8d3b046aef2fa42b52afada34b69e13d3c24359dd1
\ No newline at end of file diff --git a/db/schema_migrations/20200221074028 b/db/schema_migrations/20200221074028 deleted file mode 100644 index 444e71a7cac..00000000000 --- a/db/schema_migrations/20200221074028 +++ /dev/null @@ -1 +0,0 @@ -a4de683b8d61efdf99fdd5f7861619ce17f57b80c56b5a9f8f8cfc81c884882e
\ No newline at end of file diff --git a/db/schema_migrations/20200221100514 b/db/schema_migrations/20200221100514 deleted file mode 100644 index bd6047ddd88..00000000000 --- a/db/schema_migrations/20200221100514 +++ /dev/null @@ -1 +0,0 @@ -38e915b6d638314cafd6cb02bcf9b8d6a9c41ea2b3ddec55009f06bd30d39884
\ No newline at end of file diff --git a/db/schema_migrations/20200221105436 b/db/schema_migrations/20200221105436 deleted file mode 100644 index ee97ca1350f..00000000000 --- a/db/schema_migrations/20200221105436 +++ /dev/null @@ -1 +0,0 @@ -96c2536ce554abbd9080b64eeb5b540c040f812edd5e6dbeb463bded9940b772
\ No newline at end of file diff --git a/db/schema_migrations/20200221142216 b/db/schema_migrations/20200221142216 deleted file mode 100644 index 6c7a9f712b1..00000000000 --- a/db/schema_migrations/20200221142216 +++ /dev/null @@ -1 +0,0 @@ -142a4c2c00757bba97fddd8f4bafd00ab7f5861339d25600ad01daddd2e288b5
\ No newline at end of file diff --git a/db/schema_migrations/20200221144534 b/db/schema_migrations/20200221144534 deleted file mode 100644 index 67b6b33231b..00000000000 --- a/db/schema_migrations/20200221144534 +++ /dev/null @@ -1 +0,0 @@ -146c882020bb3b75e34a58e16ed456f166a9da61c1fd8b06945336eb0536fce2
\ No newline at end of file diff --git a/db/schema_migrations/20200222055543 b/db/schema_migrations/20200222055543 deleted file mode 100644 index 6a93c7d04a8..00000000000 --- a/db/schema_migrations/20200222055543 +++ /dev/null @@ -1 +0,0 @@ -2b3171889c440e68d912ed2809164f39f98992ae2a39874453fcaff56ea6e33c
\ No newline at end of file diff --git a/db/schema_migrations/20200224020219 b/db/schema_migrations/20200224020219 deleted file mode 100644 index c9c528c6ef5..00000000000 --- a/db/schema_migrations/20200224020219 +++ /dev/null @@ -1 +0,0 @@ -c691d9da73b528a116d4c7a046ff00e6e66dfa9dcecc95fe2509806b78872bef
\ No newline at end of file diff --git a/db/schema_migrations/20200224163804 b/db/schema_migrations/20200224163804 deleted file mode 100644 index f3324434357..00000000000 --- a/db/schema_migrations/20200224163804 +++ /dev/null @@ -1 +0,0 @@ -9d424b6fa0c80ea93d95ea2c4b40e5c96e4537e0da934aaa11f377c615afb813
\ No newline at end of file diff --git a/db/schema_migrations/20200224185814 b/db/schema_migrations/20200224185814 deleted file mode 100644 index 5dd2b5914d0..00000000000 --- a/db/schema_migrations/20200224185814 +++ /dev/null @@ -1 +0,0 @@ -e77d002b5ff690159e3433c9716211184bda2946d55d78001fac985e12fc368a
\ No newline at end of file diff --git a/db/schema_migrations/20200225111018 b/db/schema_migrations/20200225111018 deleted file mode 100644 index 6eec0048c59..00000000000 --- a/db/schema_migrations/20200225111018 +++ /dev/null @@ -1 +0,0 @@ -5db0994461870588d29b5c4b790d3a95b52fbfcac59798d3c892d397a4c409ec
\ No newline at end of file diff --git a/db/schema_migrations/20200225123228 b/db/schema_migrations/20200225123228 deleted file mode 100644 index 019085f9188..00000000000 --- a/db/schema_migrations/20200225123228 +++ /dev/null @@ -1 +0,0 @@ -10778414197502a02cbe57830c74287e5632f535322f9b5c5c950c451cb01d71
\ No newline at end of file diff --git a/db/schema_migrations/20200226100614 b/db/schema_migrations/20200226100614 deleted file mode 100644 index e7659a7253f..00000000000 --- a/db/schema_migrations/20200226100614 +++ /dev/null @@ -1 +0,0 @@ -c188525e1ac6e4da59b625bf7d91deff1b1812c918c44e5b73eb2bc2e0823f68
\ No newline at end of file diff --git a/db/schema_migrations/20200226100624 b/db/schema_migrations/20200226100624 deleted file mode 100644 index 8e056e090c9..00000000000 --- a/db/schema_migrations/20200226100624 +++ /dev/null @@ -1 +0,0 @@ -829f7961954cb6bf41c30dc347033f3db7e6e39038e95c217b7ef9717c3a35eb
\ No newline at end of file diff --git a/db/schema_migrations/20200226100634 b/db/schema_migrations/20200226100634 deleted file mode 100644 index 5e8dee9d149..00000000000 --- a/db/schema_migrations/20200226100634 +++ /dev/null @@ -1 +0,0 @@ -af0febe1b18421cd8043731157ff9a2823b57cd60b7433ff67d724f210f9971a
\ No newline at end of file diff --git a/db/schema_migrations/20200226124757 b/db/schema_migrations/20200226124757 deleted file mode 100644 index 960eb9df3c0..00000000000 --- a/db/schema_migrations/20200226124757 +++ /dev/null @@ -1 +0,0 @@ -f73014dcbedc2aebf4da6358d7169d471e0e27fb6644786fe1c0b0403019b900
\ No newline at end of file diff --git a/db/schema_migrations/20200226162156 b/db/schema_migrations/20200226162156 deleted file mode 100644 index 364b67da3ee..00000000000 --- a/db/schema_migrations/20200226162156 +++ /dev/null @@ -1 +0,0 @@ -4696b79c9363893fc86300c3214c72dd13d0ab2aeef2ccbc878243c1549e0da5
\ No newline at end of file diff --git a/db/schema_migrations/20200226162239 b/db/schema_migrations/20200226162239 deleted file mode 100644 index b68bfbbc72a..00000000000 --- a/db/schema_migrations/20200226162239 +++ /dev/null @@ -1 +0,0 @@ -35c9e2a9eaf7d718d349551f42ac6831db7e53906ba6fcb63bd81ae862a26e30
\ No newline at end of file diff --git a/db/schema_migrations/20200226162634 b/db/schema_migrations/20200226162634 deleted file mode 100644 index 50ff6751b9a..00000000000 --- a/db/schema_migrations/20200226162634 +++ /dev/null @@ -1 +0,0 @@ -bd75dacfe0bdfc52579fd82612168968d64e162189aa9aeca9f190d46bc75f65
\ No newline at end of file diff --git a/db/schema_migrations/20200226162723 b/db/schema_migrations/20200226162723 deleted file mode 100644 index 9da5b508de3..00000000000 --- a/db/schema_migrations/20200226162723 +++ /dev/null @@ -1 +0,0 @@ -bf3bf81b45ead0a9b9ec66631f1d3dfe351b9e4fccd116bde4d2844181e8aced
\ No newline at end of file diff --git a/db/schema_migrations/20200227140242 b/db/schema_migrations/20200227140242 deleted file mode 100644 index 9d0f534d7f6..00000000000 --- a/db/schema_migrations/20200227140242 +++ /dev/null @@ -1 +0,0 @@ -6d798d258d1760c64c51b754c0fbf24f387470db7f6f11825d1e5467333086a7
\ No newline at end of file diff --git a/db/schema_migrations/20200227164113 b/db/schema_migrations/20200227164113 deleted file mode 100644 index 4af123a14fe..00000000000 --- a/db/schema_migrations/20200227164113 +++ /dev/null @@ -1 +0,0 @@ -2c29f99e94603aec1826717d1a36321d5c19da96acda4c58f74c6669c77e5615
\ No newline at end of file diff --git a/db/schema_migrations/20200227165129 b/db/schema_migrations/20200227165129 deleted file mode 100644 index 0407c71200f..00000000000 --- a/db/schema_migrations/20200227165129 +++ /dev/null @@ -1 +0,0 @@ -ad6c0fd0314342c442b1d712758f9cdb9e2067d9db8108ab2d48d29f2a2c816f
\ No newline at end of file diff --git a/db/schema_migrations/20200228160542 b/db/schema_migrations/20200228160542 deleted file mode 100644 index dafd6c44929..00000000000 --- a/db/schema_migrations/20200228160542 +++ /dev/null @@ -1 +0,0 @@ -df1d9de8bcb29fbb9dd1ae4f6d7016d9e543e3100ea0d832156700df311df345
\ No newline at end of file diff --git a/db/schema_migrations/20200229171700 b/db/schema_migrations/20200229171700 deleted file mode 100644 index 2c6ad5f1194..00000000000 --- a/db/schema_migrations/20200229171700 +++ /dev/null @@ -1 +0,0 @@ -edd4919ede4a4d3b81afd1eb5158ba0715eed60f589552e00d0b0c10203eef93
\ No newline at end of file diff --git a/db/schema_migrations/20200302142052 b/db/schema_migrations/20200302142052 deleted file mode 100644 index 5485ff3b1b3..00000000000 --- a/db/schema_migrations/20200302142052 +++ /dev/null @@ -1 +0,0 @@ -2a5668a6d45c193d51d0f946384a42a2fb56c9f1f778e95421b9b5bb48766094
\ No newline at end of file diff --git a/db/schema_migrations/20200302152516 b/db/schema_migrations/20200302152516 deleted file mode 100644 index b53a44c6fb7..00000000000 --- a/db/schema_migrations/20200302152516 +++ /dev/null @@ -1 +0,0 @@ -e336cdba6c665475254935455fc1f2ca4a8e04675f5aeab1a305e113ae698823
\ No newline at end of file diff --git a/db/schema_migrations/20200303055348 b/db/schema_migrations/20200303055348 deleted file mode 100644 index 5810297e066..00000000000 --- a/db/schema_migrations/20200303055348 +++ /dev/null @@ -1 +0,0 @@ -e5897eb553a9c90742b910a7c892e6b97b08e059d3ee3fe7a089ad2b4b5bd1de
\ No newline at end of file diff --git a/db/schema_migrations/20200303074328 b/db/schema_migrations/20200303074328 deleted file mode 100644 index 9b75422c78d..00000000000 --- a/db/schema_migrations/20200303074328 +++ /dev/null @@ -1 +0,0 @@ -4c577c630f6cba9440437c41628fa86297a9feae910e313a7da601cbbd363ea9
\ No newline at end of file diff --git a/db/schema_migrations/20200303181648 b/db/schema_migrations/20200303181648 deleted file mode 100644 index 017e9a7abbd..00000000000 --- a/db/schema_migrations/20200303181648 +++ /dev/null @@ -1 +0,0 @@ -868042e64c19e31071101b49615620c83c7a0e759e81887491212e0e075dfa77
\ No newline at end of file diff --git a/db/schema_migrations/20200304023245 b/db/schema_migrations/20200304023245 deleted file mode 100644 index 08fb4bf5dfe..00000000000 --- a/db/schema_migrations/20200304023245 +++ /dev/null @@ -1 +0,0 @@ -2c4c95edac5819f31d15817a15046e3679726924a3dcdbde2004660fc820da31
\ No newline at end of file diff --git a/db/schema_migrations/20200304023851 b/db/schema_migrations/20200304023851 deleted file mode 100644 index 6064bc6e09b..00000000000 --- a/db/schema_migrations/20200304023851 +++ /dev/null @@ -1 +0,0 @@ -d75e64d72eec07d96c0fbced1caefc48f9116ba5a73f24ab1e964872a5377dc0
\ No newline at end of file diff --git a/db/schema_migrations/20200304024025 b/db/schema_migrations/20200304024025 deleted file mode 100644 index d05a054141f..00000000000 --- a/db/schema_migrations/20200304024025 +++ /dev/null @@ -1 +0,0 @@ -3b92198ed0771cf06ef871fbc160d323fca89e473ed3a037142cdd59e4865819
\ No newline at end of file diff --git a/db/schema_migrations/20200304024042 b/db/schema_migrations/20200304024042 deleted file mode 100644 index fd74b708b69..00000000000 --- a/db/schema_migrations/20200304024042 +++ /dev/null @@ -1 +0,0 @@ -aa9b40a163e85908106752b3365ee6bea8c0328b6e4bebb0a9f1ab72c9ad3ab0
\ No newline at end of file diff --git a/db/schema_migrations/20200304085423 b/db/schema_migrations/20200304085423 deleted file mode 100644 index 5cf97433fa3..00000000000 --- a/db/schema_migrations/20200304085423 +++ /dev/null @@ -1 +0,0 @@ -e36f3179a9516a655fc3e499d2700e5964ac37db7678737c33c7376b00c6e5be
\ No newline at end of file diff --git a/db/schema_migrations/20200304090155 b/db/schema_migrations/20200304090155 deleted file mode 100644 index d58e94031fd..00000000000 --- a/db/schema_migrations/20200304090155 +++ /dev/null @@ -1 +0,0 @@ -4eabd24ebbee74cd5420199d5bbd79457daf0195a59cd4705ab4da36ab768cfc
\ No newline at end of file diff --git a/db/schema_migrations/20200304121828 b/db/schema_migrations/20200304121828 deleted file mode 100644 index 21bc444b211..00000000000 --- a/db/schema_migrations/20200304121828 +++ /dev/null @@ -1 +0,0 @@ -ffdb33a2619c6fd31e70eb62adfbbb7df088ca427613b052acc4b560aaab95e8
\ No newline at end of file diff --git a/db/schema_migrations/20200304121844 b/db/schema_migrations/20200304121844 deleted file mode 100644 index aed65d42d75..00000000000 --- a/db/schema_migrations/20200304121844 +++ /dev/null @@ -1 +0,0 @@ -5ba721346282f3bcc213ba5d3c2591fd9893a9bda3c1bd1592a9617ceb8c8215
\ No newline at end of file diff --git a/db/schema_migrations/20200304124406 b/db/schema_migrations/20200304124406 deleted file mode 100644 index f36befc06d3..00000000000 --- a/db/schema_migrations/20200304124406 +++ /dev/null @@ -1 +0,0 @@ -d6000f710394784a29cdbb519a2c4c0b58cc1106b1f34fd4926ffdac43689305
\ No newline at end of file diff --git a/db/schema_migrations/20200304160800 b/db/schema_migrations/20200304160800 deleted file mode 100644 index 532c2ab0e07..00000000000 --- a/db/schema_migrations/20200304160800 +++ /dev/null @@ -1 +0,0 @@ -f5a17d1b3078552e5152f667c327345885a13a92533a79cce4461fc4015ef9b9
\ No newline at end of file diff --git a/db/schema_migrations/20200304160801 b/db/schema_migrations/20200304160801 deleted file mode 100644 index ab94c3b8864..00000000000 --- a/db/schema_migrations/20200304160801 +++ /dev/null @@ -1 +0,0 @@ -6fa1624af4bdb1f8bdeaf2d3c92563004622872e7c996c273bcd405a4311c320
\ No newline at end of file diff --git a/db/schema_migrations/20200304160823 b/db/schema_migrations/20200304160823 deleted file mode 100644 index cfe062cf2da..00000000000 --- a/db/schema_migrations/20200304160823 +++ /dev/null @@ -1 +0,0 @@ -0ae0344d60f620c0186607428de4fb9e40afbbb468bfbe84181f16272a90389a
\ No newline at end of file diff --git a/db/schema_migrations/20200304211738 b/db/schema_migrations/20200304211738 deleted file mode 100644 index eacc3deb063..00000000000 --- a/db/schema_migrations/20200304211738 +++ /dev/null @@ -1 +0,0 @@ -54cbae339253353d594b0797aeb04529bfc67d1dc496f1872288e80e73d3fff5
\ No newline at end of file diff --git a/db/schema_migrations/20200305020458 b/db/schema_migrations/20200305020458 deleted file mode 100644 index 05b98b20918..00000000000 --- a/db/schema_migrations/20200305020458 +++ /dev/null @@ -1 +0,0 @@ -711df8d2c11579613771b2efc77917340ec04bc95c030b61463a3be88edace92
\ No newline at end of file diff --git a/db/schema_migrations/20200305020459 b/db/schema_migrations/20200305020459 deleted file mode 100644 index adfcb205538..00000000000 --- a/db/schema_migrations/20200305020459 +++ /dev/null @@ -1 +0,0 @@ -6f53fc13e262a806deba49caaebbf1a307938404289edca3394441d7bed07f68
\ No newline at end of file diff --git a/db/schema_migrations/20200305082754 b/db/schema_migrations/20200305082754 deleted file mode 100644 index 8742b8cc2a4..00000000000 --- a/db/schema_migrations/20200305082754 +++ /dev/null @@ -1 +0,0 @@ -e9f46e44b0caef2af159ab201d6a2868289fe9a0572c974ddc582dc023372ab6
\ No newline at end of file diff --git a/db/schema_migrations/20200305082858 b/db/schema_migrations/20200305082858 deleted file mode 100644 index f885f37fdff..00000000000 --- a/db/schema_migrations/20200305082858 +++ /dev/null @@ -1 +0,0 @@ -3a2954095c15360beaf5f0bb04b8173176a4b8801876eddb304fc1db03db4872
\ No newline at end of file diff --git a/db/schema_migrations/20200305121159 b/db/schema_migrations/20200305121159 deleted file mode 100644 index 862a3d304e5..00000000000 --- a/db/schema_migrations/20200305121159 +++ /dev/null @@ -1 +0,0 @@ -13afde45824bffa583d4ca6f891e874462b0bed3abba71322b865f9043a22221
\ No newline at end of file diff --git a/db/schema_migrations/20200305151736 b/db/schema_migrations/20200305151736 deleted file mode 100644 index bdeb42e8c04..00000000000 --- a/db/schema_migrations/20200305151736 +++ /dev/null @@ -1 +0,0 @@ -c9dad6555464ddf4e9a4b6a9298f2e6e64f1125ba8626c70b006123d31115d33
\ No newline at end of file diff --git a/db/schema_migrations/20200305200641 b/db/schema_migrations/20200305200641 deleted file mode 100644 index 12193653dd3..00000000000 --- a/db/schema_migrations/20200305200641 +++ /dev/null @@ -1 +0,0 @@ -b4c67b819c620a49ce0420fec883d8444e41a2a7970b45f94e9457799a041f7b
\ No newline at end of file diff --git a/db/schema_migrations/20200306095654 b/db/schema_migrations/20200306095654 deleted file mode 100644 index 952ba3063cd..00000000000 --- a/db/schema_migrations/20200306095654 +++ /dev/null @@ -1 +0,0 @@ -3c5edc5ce531b26a08ae2a8f1b086f03ce63df80fa55ec15817b50a94047f883
\ No newline at end of file diff --git a/db/schema_migrations/20200306160521 b/db/schema_migrations/20200306160521 deleted file mode 100644 index 66fe6845105..00000000000 --- a/db/schema_migrations/20200306160521 +++ /dev/null @@ -1 +0,0 @@ -dcfaa4bea94107f3ed16c79701da68a57a8edfa049375f8f1ddf7fe3233004a7
\ No newline at end of file diff --git a/db/schema_migrations/20200306170211 b/db/schema_migrations/20200306170211 deleted file mode 100644 index deba6e821eb..00000000000 --- a/db/schema_migrations/20200306170211 +++ /dev/null @@ -1 +0,0 @@ -e04fdcb0454c998e8c0f27d956cf1d19e1182775e0c600eefb8ba85b989b340c
\ No newline at end of file diff --git a/db/schema_migrations/20200306170321 b/db/schema_migrations/20200306170321 deleted file mode 100644 index 2eb720315c4..00000000000 --- a/db/schema_migrations/20200306170321 +++ /dev/null @@ -1 +0,0 @@ -b4b90b72e78fb77b6578f9f846b38061386fd2c81a2c72bb26fbdfeebbc6633b
\ No newline at end of file diff --git a/db/schema_migrations/20200306170531 b/db/schema_migrations/20200306170531 deleted file mode 100644 index 5ed60ceeb1c..00000000000 --- a/db/schema_migrations/20200306170531 +++ /dev/null @@ -1 +0,0 @@ -7352528945b66621a7ed1337ad9b518f232b1a5e4af778e3832929a5e4247a6e
\ No newline at end of file diff --git a/db/schema_migrations/20200306192548 b/db/schema_migrations/20200306192548 deleted file mode 100644 index 30c5559936b..00000000000 --- a/db/schema_migrations/20200306192548 +++ /dev/null @@ -1 +0,0 @@ -a8802d7c6b0b6db73601782ad30b84a745b34623a034de27fc73273deb61be73
\ No newline at end of file diff --git a/db/schema_migrations/20200306193236 b/db/schema_migrations/20200306193236 deleted file mode 100644 index 2326318c935..00000000000 --- a/db/schema_migrations/20200306193236 +++ /dev/null @@ -1 +0,0 @@ -7d33b0b8c044396c7cab9e7d70948f192d7e4f4c33a0921c29e3e21cdb6886c0
\ No newline at end of file diff --git a/db/schema_migrations/20200309140540 b/db/schema_migrations/20200309140540 deleted file mode 100644 index c9578f4e592..00000000000 --- a/db/schema_migrations/20200309140540 +++ /dev/null @@ -1 +0,0 @@ -a2e1ed7c70984bf045bdb1e9fc45296a5df0cc9464ca2fb297a992737f44d8a5
\ No newline at end of file diff --git a/db/schema_migrations/20200309162244 b/db/schema_migrations/20200309162244 deleted file mode 100644 index a5ea72c4b0b..00000000000 --- a/db/schema_migrations/20200309162244 +++ /dev/null @@ -1 +0,0 @@ -51e4ce90feccd894a5064bbb4e58141f5a2ca7c66d329d73b1d46ec54a6838e7
\ No newline at end of file diff --git a/db/schema_migrations/20200309195209 b/db/schema_migrations/20200309195209 deleted file mode 100644 index e9b65afe467..00000000000 --- a/db/schema_migrations/20200309195209 +++ /dev/null @@ -1 +0,0 @@ -602a765f26e04b90f726beceadf1834ecdcb8ab3c33cf0aec049219e88b3e2df
\ No newline at end of file diff --git a/db/schema_migrations/20200309195710 b/db/schema_migrations/20200309195710 deleted file mode 100644 index a31b61397ec..00000000000 --- a/db/schema_migrations/20200309195710 +++ /dev/null @@ -1 +0,0 @@ -ef8bd48e0ed97debb1baf1c0b317e093219e9285cc0dd4be6e9b6ac5659fc7fe
\ No newline at end of file diff --git a/db/schema_migrations/20200310075115 b/db/schema_migrations/20200310075115 deleted file mode 100644 index 93343f7ce71..00000000000 --- a/db/schema_migrations/20200310075115 +++ /dev/null @@ -1 +0,0 @@ -18e55800f012a784a5b67a104a4c95e1e8c9639c30e3712c79f518e11ef9b574
\ No newline at end of file diff --git a/db/schema_migrations/20200310123229 b/db/schema_migrations/20200310123229 deleted file mode 100644 index 8f750d1ca27..00000000000 --- a/db/schema_migrations/20200310123229 +++ /dev/null @@ -1 +0,0 @@ -774729ae47cdfb721f3e6cbfb6bd2b9835e699c236f27beab2674063efa35490
\ No newline at end of file diff --git a/db/schema_migrations/20200310132654 b/db/schema_migrations/20200310132654 deleted file mode 100644 index 467bc655b5d..00000000000 --- a/db/schema_migrations/20200310132654 +++ /dev/null @@ -1 +0,0 @@ -afb893004e505821b0c12db31dfc9b979c3a75ebd9a74699f242baecef9a76e3
\ No newline at end of file diff --git a/db/schema_migrations/20200310133822 b/db/schema_migrations/20200310133822 deleted file mode 100644 index a68413bc2ab..00000000000 --- a/db/schema_migrations/20200310133822 +++ /dev/null @@ -1 +0,0 @@ -0641a80bb43d760cdb3018f3b7259f4f7d7c5b5d7f5335b584b12a8b2906d44f
\ No newline at end of file diff --git a/db/schema_migrations/20200310135818 b/db/schema_migrations/20200310135818 deleted file mode 100644 index 1957f7bd435..00000000000 --- a/db/schema_migrations/20200310135818 +++ /dev/null @@ -1 +0,0 @@ -f4070758551c6872379e3ef86a4a25905cf86d85c497f6339f6b6a3c231ec353
\ No newline at end of file diff --git a/db/schema_migrations/20200310135823 b/db/schema_migrations/20200310135823 deleted file mode 100644 index 8fcd808fedd..00000000000 --- a/db/schema_migrations/20200310135823 +++ /dev/null @@ -1 +0,0 @@ -0c82a979c3abb9890f133af9ed6d309fdcd42bc80808ef80d5f4b5c1699fdef9
\ No newline at end of file diff --git a/db/schema_migrations/20200310145304 b/db/schema_migrations/20200310145304 deleted file mode 100644 index b1593a9d69d..00000000000 --- a/db/schema_migrations/20200310145304 +++ /dev/null @@ -1 +0,0 @@ -a02188273892e26f48d9f83b5b5d3a8ba91f3bfb0d88cf8c6b00df935cdd0970
\ No newline at end of file diff --git a/db/schema_migrations/20200310215714 b/db/schema_migrations/20200310215714 deleted file mode 100644 index 24a3be57bc3..00000000000 --- a/db/schema_migrations/20200310215714 +++ /dev/null @@ -1 +0,0 @@ -08721b8f7ca6b10f504cae7f9f29692ae24a4b01e5e039b5f560301b737a99d0
\ No newline at end of file diff --git a/db/schema_migrations/20200311074438 b/db/schema_migrations/20200311074438 deleted file mode 100644 index de949b8a26b..00000000000 --- a/db/schema_migrations/20200311074438 +++ /dev/null @@ -1 +0,0 @@ -dcb08c60aafbd8272cf848bc522f52f5e95b8ecc611c4c25bb9fdd97d64906ea
\ No newline at end of file diff --git a/db/schema_migrations/20200311082301 b/db/schema_migrations/20200311082301 deleted file mode 100644 index 2c2645075c9..00000000000 --- a/db/schema_migrations/20200311082301 +++ /dev/null @@ -1 +0,0 @@ -2dd88c42483913abb2dcf5ef75e0915301ce763af4efac4c8e84c075c38a71fd
\ No newline at end of file diff --git a/db/schema_migrations/20200311084025 b/db/schema_migrations/20200311084025 deleted file mode 100644 index a8583d22146..00000000000 --- a/db/schema_migrations/20200311084025 +++ /dev/null @@ -1 +0,0 @@ -b8c934fc9d03bb0b9800042806158b7a516995afea6db2f25d2bf4138cb3fca0
\ No newline at end of file diff --git a/db/schema_migrations/20200311093210 b/db/schema_migrations/20200311093210 deleted file mode 100644 index dfc7d91b288..00000000000 --- a/db/schema_migrations/20200311093210 +++ /dev/null @@ -1 +0,0 @@ -549476c8bc28208b6be4e0db39e44f82214f4e0891fda09998127a28b8acd915
\ No newline at end of file diff --git a/db/schema_migrations/20200311094020 b/db/schema_migrations/20200311094020 deleted file mode 100644 index c7ad298ccab..00000000000 --- a/db/schema_migrations/20200311094020 +++ /dev/null @@ -1 +0,0 @@ -9d35ebc7b3c7a04ae4dd90873b30c8a81bec4a017bc4baba803d850b83e2a84d
\ No newline at end of file diff --git a/db/schema_migrations/20200311130802 b/db/schema_migrations/20200311130802 deleted file mode 100644 index 0305e261260..00000000000 --- a/db/schema_migrations/20200311130802 +++ /dev/null @@ -1 +0,0 @@ -2ef9122411c81a770b1f1d558e65d192d4e50239b342a091b7317db18f1b3716
\ No newline at end of file diff --git a/db/schema_migrations/20200311141053 b/db/schema_migrations/20200311141053 deleted file mode 100644 index 2bb2bc9448d..00000000000 --- a/db/schema_migrations/20200311141053 +++ /dev/null @@ -1 +0,0 @@ -1a8b7230a5024487c88bb8d805e89cdf8afb297872a6a96b71b50a52d39ce970
\ No newline at end of file diff --git a/db/schema_migrations/20200311141943 b/db/schema_migrations/20200311141943 deleted file mode 100644 index 224f353b8d2..00000000000 --- a/db/schema_migrations/20200311141943 +++ /dev/null @@ -1 +0,0 @@ -32a0727652c4abffaf4a6871749acc07b56f20c0fc04d97c3d12c4b340f89177
\ No newline at end of file diff --git a/db/schema_migrations/20200311154110 b/db/schema_migrations/20200311154110 deleted file mode 100644 index 25066a85b63..00000000000 --- a/db/schema_migrations/20200311154110 +++ /dev/null @@ -1 +0,0 @@ -a98f79efb7145a8ea0c7034f1055dfadb1a3ad37e5498af081e2ee450a594b96
\ No newline at end of file diff --git a/db/schema_migrations/20200311165635 b/db/schema_migrations/20200311165635 deleted file mode 100644 index e6cf4f1c608..00000000000 --- a/db/schema_migrations/20200311165635 +++ /dev/null @@ -1 +0,0 @@ -badc13de8e33d9ce3b8068742e42d447ef50fcb73a288478ec2e81d0967495c9
\ No newline at end of file diff --git a/db/schema_migrations/20200311192351 b/db/schema_migrations/20200311192351 deleted file mode 100644 index 9b9a658a7b8..00000000000 --- a/db/schema_migrations/20200311192351 +++ /dev/null @@ -1 +0,0 @@ -fdfd959cf2e0f57f8f6259853a7a4607e7086ebf62eba00fa7dff3aef7f75e41
\ No newline at end of file diff --git a/db/schema_migrations/20200311214912 b/db/schema_migrations/20200311214912 deleted file mode 100644 index 904718d973c..00000000000 --- a/db/schema_migrations/20200311214912 +++ /dev/null @@ -1 +0,0 @@ -ac785cd0a9670cf6d6e02741dfc5c0d8531fd19f672ac761e59814a6adcf631e
\ No newline at end of file diff --git a/db/schema_migrations/20200312053852 b/db/schema_migrations/20200312053852 deleted file mode 100644 index 85a60ad7a07..00000000000 --- a/db/schema_migrations/20200312053852 +++ /dev/null @@ -1 +0,0 @@ -18651a257b1a3319eca7c3a57f493efb9c30a87a1f837ddd8b760831fe0c9251
\ No newline at end of file diff --git a/db/schema_migrations/20200312125121 b/db/schema_migrations/20200312125121 deleted file mode 100644 index 76ab0ef6d74..00000000000 --- a/db/schema_migrations/20200312125121 +++ /dev/null @@ -1 +0,0 @@ -41e4cba792ef058d93190c9e05299c98e28ab91aabea47fbb4506b818dab001a
\ No newline at end of file diff --git a/db/schema_migrations/20200312134637 b/db/schema_migrations/20200312134637 deleted file mode 100644 index c1520913ba7..00000000000 --- a/db/schema_migrations/20200312134637 +++ /dev/null @@ -1 +0,0 @@ -6db4c6d05fc80d7567515ed3601de4e099fd1c7012ab713593d8b3ed41c1fc67
\ No newline at end of file diff --git a/db/schema_migrations/20200312160532 b/db/schema_migrations/20200312160532 deleted file mode 100644 index d203d40429b..00000000000 --- a/db/schema_migrations/20200312160532 +++ /dev/null @@ -1 +0,0 @@ -40ae4e00c46cb0f09e639bcc20cf4e601ad3096e43586ba70693598ae51616e7
\ No newline at end of file diff --git a/db/schema_migrations/20200312163407 b/db/schema_migrations/20200312163407 deleted file mode 100644 index bf848fa052d..00000000000 --- a/db/schema_migrations/20200312163407 +++ /dev/null @@ -1 +0,0 @@ -209648af95eb386b8ccb97eceb34809a601cc876132a2c2d0f4cb8e714429000
\ No newline at end of file diff --git a/db/schema_migrations/20200313101649 b/db/schema_migrations/20200313101649 deleted file mode 100644 index f3eb89bd49c..00000000000 --- a/db/schema_migrations/20200313101649 +++ /dev/null @@ -1 +0,0 @@ -42a4437b341329f9eb970525ca247b3dda6fb5d333e1a248b71752466f1d0516
\ No newline at end of file diff --git a/db/schema_migrations/20200313123934 b/db/schema_migrations/20200313123934 deleted file mode 100644 index 5f5f93f5406..00000000000 --- a/db/schema_migrations/20200313123934 +++ /dev/null @@ -1 +0,0 @@ -3634ff12a2b164c30643c7a41e2ae0b68c7aa71c86ce0fa7d77472658c7165c3
\ No newline at end of file diff --git a/db/schema_migrations/20200313202430 b/db/schema_migrations/20200313202430 deleted file mode 100644 index f5e6b0d8371..00000000000 --- a/db/schema_migrations/20200313202430 +++ /dev/null @@ -1 +0,0 @@ -196f237ecbb591567629015d2765a876084c88f8aef3d647e2ce424fc2564858
\ No newline at end of file diff --git a/db/schema_migrations/20200313203525 b/db/schema_migrations/20200313203525 deleted file mode 100644 index dc94f9c192e..00000000000 --- a/db/schema_migrations/20200313203525 +++ /dev/null @@ -1 +0,0 @@ -b504e2dd331a438b780d27250bf85c0a430ec283188a759cc6631b6ff5851216
\ No newline at end of file diff --git a/db/schema_migrations/20200313203550 b/db/schema_migrations/20200313203550 deleted file mode 100644 index f2600c1f912..00000000000 --- a/db/schema_migrations/20200313203550 +++ /dev/null @@ -1 +0,0 @@ -579a499a30e42644bc5ab0baf7fdcab76c505e66bfd24cb90923cea41b9d6a30
\ No newline at end of file diff --git a/db/schema_migrations/20200313204021 b/db/schema_migrations/20200313204021 deleted file mode 100644 index 80912edee66..00000000000 --- a/db/schema_migrations/20200313204021 +++ /dev/null @@ -1 +0,0 @@ -721037f898a71a327219e5761f175e200df999adb7402de3169158dfd1b50eb5
\ No newline at end of file diff --git a/db/schema_migrations/20200314060834 b/db/schema_migrations/20200314060834 deleted file mode 100644 index 4ffeae5cfc5..00000000000 --- a/db/schema_migrations/20200314060834 +++ /dev/null @@ -1 +0,0 @@ -c35ce19cf34ec8479accd180fb576a3e6d652654fa525faf6fce7520d98ce195
\ No newline at end of file diff --git a/db/schema_migrations/20200316111759 b/db/schema_migrations/20200316111759 deleted file mode 100644 index 74ce2aa78cf..00000000000 --- a/db/schema_migrations/20200316111759 +++ /dev/null @@ -1 +0,0 @@ -da09454649ee16b8857b027d70515c07c2e0658e53e32475cad1cfaff620a023
\ No newline at end of file diff --git a/db/schema_migrations/20200316162648 b/db/schema_migrations/20200316162648 deleted file mode 100644 index 63b760cddc1..00000000000 --- a/db/schema_migrations/20200316162648 +++ /dev/null @@ -1 +0,0 @@ -2ae07c094e3ff6436fa9915e7ccd937ea2b77b4d02482b4d33aca10cbbe2b4cd
\ No newline at end of file diff --git a/db/schema_migrations/20200316173312 b/db/schema_migrations/20200316173312 deleted file mode 100644 index b0486db7e68..00000000000 --- a/db/schema_migrations/20200316173312 +++ /dev/null @@ -1 +0,0 @@ -a91a2b875fdebeac752ee0c11d5c9713cbb86077bef1f2a3ddd3b4ea4f91fa97
\ No newline at end of file diff --git a/db/schema_migrations/20200317110602 b/db/schema_migrations/20200317110602 deleted file mode 100644 index 5b9d86bc0c0..00000000000 --- a/db/schema_migrations/20200317110602 +++ /dev/null @@ -1 +0,0 @@ -e9a391d4bc1b734541f208306112008c15e1f86e6581fe899c6ba680e2658474
\ No newline at end of file diff --git a/db/schema_migrations/20200317142110 b/db/schema_migrations/20200317142110 deleted file mode 100644 index 66a4d852f10..00000000000 --- a/db/schema_migrations/20200317142110 +++ /dev/null @@ -1 +0,0 @@ -6d5857c9183da9fe2a0a07d8947c5e97cedbc405c0603b054fbd013081cc1a85
\ No newline at end of file diff --git a/db/schema_migrations/20200318140400 b/db/schema_migrations/20200318140400 deleted file mode 100644 index c719bb32705..00000000000 --- a/db/schema_migrations/20200318140400 +++ /dev/null @@ -1 +0,0 @@ -0a51889bd781544a4aa1dd8b1fbb7b204820988fa99e99f937f85c5832cfdf4c
\ No newline at end of file diff --git a/db/schema_migrations/20200318152134 b/db/schema_migrations/20200318152134 deleted file mode 100644 index 44e4fee5d86..00000000000 --- a/db/schema_migrations/20200318152134 +++ /dev/null @@ -1 +0,0 @@ -7841e14170e1d1e3b6504007d21ecd01d848618465d010feee62c07cd2cd01c6
\ No newline at end of file diff --git a/db/schema_migrations/20200318162148 b/db/schema_migrations/20200318162148 deleted file mode 100644 index 061c59f594c..00000000000 --- a/db/schema_migrations/20200318162148 +++ /dev/null @@ -1 +0,0 @@ -2507f0e36664c2b08ab0a4b393c62cda45a36b94e98b95bc698f9683bf852948
\ No newline at end of file diff --git a/db/schema_migrations/20200318163148 b/db/schema_migrations/20200318163148 deleted file mode 100644 index bbc32ef7f25..00000000000 --- a/db/schema_migrations/20200318163148 +++ /dev/null @@ -1 +0,0 @@ -5848d98d3b1b8b3b26c46fdc9364707c21aeb0f5fcff1dfa546ad0c00d9f4dcc
\ No newline at end of file diff --git a/db/schema_migrations/20200318164448 b/db/schema_migrations/20200318164448 deleted file mode 100644 index cc021438aae..00000000000 --- a/db/schema_migrations/20200318164448 +++ /dev/null @@ -1 +0,0 @@ -bae13167af992c8689192066c36de88f9c3149804600813f9bdbc2c484ce047a
\ No newline at end of file diff --git a/db/schema_migrations/20200318165448 b/db/schema_migrations/20200318165448 deleted file mode 100644 index e466b2bc43b..00000000000 --- a/db/schema_migrations/20200318165448 +++ /dev/null @@ -1 +0,0 @@ -43e6afd5aba2eaae0aa8e4524c1de5c3d65b1c380421f9fd090e56bb4b91829a
\ No newline at end of file diff --git a/db/schema_migrations/20200318175008 b/db/schema_migrations/20200318175008 deleted file mode 100644 index d48a7431b5f..00000000000 --- a/db/schema_migrations/20200318175008 +++ /dev/null @@ -1 +0,0 @@ -96fae378336e330fce005c5c7a81eaf95b70181ce0be5bcb4b5e6f491328e288
\ No newline at end of file diff --git a/db/schema_migrations/20200318183553 b/db/schema_migrations/20200318183553 deleted file mode 100644 index 9c8e5f7f279..00000000000 --- a/db/schema_migrations/20200318183553 +++ /dev/null @@ -1 +0,0 @@ -32c96bda198bf41ba2e92b9e56d0508de394187e16118ae238769b54066a5bfc
\ No newline at end of file diff --git a/db/schema_migrations/20200319071702 b/db/schema_migrations/20200319071702 deleted file mode 100644 index 6e92d37e397..00000000000 --- a/db/schema_migrations/20200319071702 +++ /dev/null @@ -1 +0,0 @@ -8cc6e9e722d5ec31f8e3912ae39fe09fea01b6ee5130a6baaa86072fd9683cbb
\ No newline at end of file diff --git a/db/schema_migrations/20200319123041 b/db/schema_migrations/20200319123041 deleted file mode 100644 index a507feda89f..00000000000 --- a/db/schema_migrations/20200319123041 +++ /dev/null @@ -1 +0,0 @@ -11612949c4481c27e502eb6c6cb2bf7ed2a3812d905fcccaa4a047fa90b77dfd
\ No newline at end of file diff --git a/db/schema_migrations/20200319124127 b/db/schema_migrations/20200319124127 deleted file mode 100644 index 78099c75d28..00000000000 --- a/db/schema_migrations/20200319124127 +++ /dev/null @@ -1 +0,0 @@ -ad6b4f2ca19deec7d8e1b3a26c31995950b2c6de07248a8f684de4b3699eb319
\ No newline at end of file diff --git a/db/schema_migrations/20200319203901 b/db/schema_migrations/20200319203901 deleted file mode 100644 index 7c78df5001b..00000000000 --- a/db/schema_migrations/20200319203901 +++ /dev/null @@ -1 +0,0 @@ -356c0961a665eeef74a7f57f8d8bca51ecaa425d683a33621611ed1fd70f1153
\ No newline at end of file diff --git a/db/schema_migrations/20200320112455 b/db/schema_migrations/20200320112455 deleted file mode 100644 index ee71ec10136..00000000000 --- a/db/schema_migrations/20200320112455 +++ /dev/null @@ -1 +0,0 @@ -89c33274d4902df5ad710e6678970bc6c0155e39a8084c8f7481dc5105cf783b
\ No newline at end of file diff --git a/db/schema_migrations/20200320123839 b/db/schema_migrations/20200320123839 deleted file mode 100644 index f8b5c779071..00000000000 --- a/db/schema_migrations/20200320123839 +++ /dev/null @@ -1 +0,0 @@ -b25a96f19c673a0a00efb0226fd117274577f730538acc18791b0e33b8bc6d37
\ No newline at end of file diff --git a/db/schema_migrations/20200320212400 b/db/schema_migrations/20200320212400 deleted file mode 100644 index a28171d0557..00000000000 --- a/db/schema_migrations/20200320212400 +++ /dev/null @@ -1 +0,0 @@ -6aa64b6fefa51a01c99e36b56792500df4935b8106a3489e804d157921365437
\ No newline at end of file diff --git a/db/schema_migrations/20200323011225 b/db/schema_migrations/20200323011225 deleted file mode 100644 index 9d37658a8bf..00000000000 --- a/db/schema_migrations/20200323011225 +++ /dev/null @@ -1 +0,0 @@ -071e3909530f46f5d794bc0bc351dd7561cf9146ad4145a7fe5ad390974192c5
\ No newline at end of file diff --git a/db/schema_migrations/20200323011955 b/db/schema_migrations/20200323011955 deleted file mode 100644 index e39e29a73a4..00000000000 --- a/db/schema_migrations/20200323011955 +++ /dev/null @@ -1 +0,0 @@ -882a00f49cb253cb1a25995196c7667bedc049ec7f5273d76b3cc04686c7ef52
\ No newline at end of file diff --git a/db/schema_migrations/20200323071918 b/db/schema_migrations/20200323071918 deleted file mode 100644 index 92dd734108a..00000000000 --- a/db/schema_migrations/20200323071918 +++ /dev/null @@ -1 +0,0 @@ -44900b0260613b740c3845a97e521e28223a9b4ba000c9b1a318f5edef3d8542
\ No newline at end of file diff --git a/db/schema_migrations/20200323074147 b/db/schema_migrations/20200323074147 deleted file mode 100644 index cd9943747a1..00000000000 --- a/db/schema_migrations/20200323074147 +++ /dev/null @@ -1 +0,0 @@ -3177b710bbe037d68637c4218b3e957b8aaeb4ee03324b9e041cb1de2777ff09
\ No newline at end of file diff --git a/db/schema_migrations/20200323075043 b/db/schema_migrations/20200323075043 deleted file mode 100644 index 89a60bb67cf..00000000000 --- a/db/schema_migrations/20200323075043 +++ /dev/null @@ -1 +0,0 @@ -e1410b0006331f2ebf3dbf08d38ceaa2d69e08e4442b6d725fe046fc1aa5ebd7
\ No newline at end of file diff --git a/db/schema_migrations/20200323080714 b/db/schema_migrations/20200323080714 deleted file mode 100644 index 65ab49c25f6..00000000000 --- a/db/schema_migrations/20200323080714 +++ /dev/null @@ -1 +0,0 @@ -ebf04e48435aede0a69ca4e54a91aae20c938e3895458506ee11d33bf621ef22
\ No newline at end of file diff --git a/db/schema_migrations/20200323122201 b/db/schema_migrations/20200323122201 deleted file mode 100644 index 097933ec705..00000000000 --- a/db/schema_migrations/20200323122201 +++ /dev/null @@ -1 +0,0 @@ -0b0f8f7be445c37d198d6be81ea98b42151c108fea290f597878ce7b8efdd945
\ No newline at end of file diff --git a/db/schema_migrations/20200323134519 b/db/schema_migrations/20200323134519 deleted file mode 100644 index 781e49d9d83..00000000000 --- a/db/schema_migrations/20200323134519 +++ /dev/null @@ -1 +0,0 @@ -cae490689ea7e3addf1350765cfd02a5f0a560d3ef946aaa7f2db67e03a0642a
\ No newline at end of file diff --git a/db/schema_migrations/20200324093258 b/db/schema_migrations/20200324093258 deleted file mode 100644 index c188ab41bc5..00000000000 --- a/db/schema_migrations/20200324093258 +++ /dev/null @@ -1 +0,0 @@ -73632637610b92b6cc49d833053068cb2f4ac1724d641c1554470649f50177b9
\ No newline at end of file diff --git a/db/schema_migrations/20200324115359 b/db/schema_migrations/20200324115359 deleted file mode 100644 index 9d1111f7fd0..00000000000 --- a/db/schema_migrations/20200324115359 +++ /dev/null @@ -1 +0,0 @@ -bcc2e79aef3aec6424c533d777f5b78eb78b4e36a832c25f60f3bfbfe205da0d
\ No newline at end of file diff --git a/db/schema_migrations/20200325094612 b/db/schema_migrations/20200325094612 deleted file mode 100644 index e791a2cc8f2..00000000000 --- a/db/schema_migrations/20200325094612 +++ /dev/null @@ -1 +0,0 @@ -89bb13eb2e76071e5c2901dfae8fe250094135fb9723e1a94b538596e01b2d01
\ No newline at end of file diff --git a/db/schema_migrations/20200325104755 b/db/schema_migrations/20200325104755 deleted file mode 100644 index 41a36414b14..00000000000 --- a/db/schema_migrations/20200325104755 +++ /dev/null @@ -1 +0,0 @@ -be0cde3782a0845f5364493a738a52e3a65b4fb9a86c7e459e0239305e2f17ab
\ No newline at end of file diff --git a/db/schema_migrations/20200325104756 b/db/schema_migrations/20200325104756 deleted file mode 100644 index ada479d8896..00000000000 --- a/db/schema_migrations/20200325104756 +++ /dev/null @@ -1 +0,0 @@ -1c8000a2f9722795f220d70bf86f877a55f613e44cb7d6cce43e6d0e2639ddb0
\ No newline at end of file diff --git a/db/schema_migrations/20200325104833 b/db/schema_migrations/20200325104833 deleted file mode 100644 index 03ff24efa4f..00000000000 --- a/db/schema_migrations/20200325104833 +++ /dev/null @@ -1 +0,0 @@ -576a15f65fd06b783fd0b790b218d0ba14ccf8af29f9851cdad77cb244bb9ce6
\ No newline at end of file diff --git a/db/schema_migrations/20200325104834 b/db/schema_migrations/20200325104834 deleted file mode 100644 index c43c82d0536..00000000000 --- a/db/schema_migrations/20200325104834 +++ /dev/null @@ -1 +0,0 @@ -d0071a6c4cddc4fadab8313235756846c5245c9ef113d2d4e8b824e60e0a7195
\ No newline at end of file diff --git a/db/schema_migrations/20200325111432 b/db/schema_migrations/20200325111432 deleted file mode 100644 index dcf8493f6c9..00000000000 --- a/db/schema_migrations/20200325111432 +++ /dev/null @@ -1 +0,0 @@ -55e6e67ebd513edfb53601837ba9e5311c0c2562289bf5a0bff3d5c0aa33e3ba
\ No newline at end of file diff --git a/db/schema_migrations/20200325152327 b/db/schema_migrations/20200325152327 deleted file mode 100644 index 04a470f3090..00000000000 --- a/db/schema_migrations/20200325152327 +++ /dev/null @@ -1 +0,0 @@ -047ead050d2276e977f03fe5176a2e5dd122f6ca0572d510e0ae04298d868798
\ No newline at end of file diff --git a/db/schema_migrations/20200325160952 b/db/schema_migrations/20200325160952 deleted file mode 100644 index 7c1952374ed..00000000000 --- a/db/schema_migrations/20200325160952 +++ /dev/null @@ -1 +0,0 @@ -eec09683e458c023414a081232c3852dfd8bb6daa89bbaa61eabaf0f663eaf32
\ No newline at end of file diff --git a/db/schema_migrations/20200325162730 b/db/schema_migrations/20200325162730 deleted file mode 100644 index e7159a63c5d..00000000000 --- a/db/schema_migrations/20200325162730 +++ /dev/null @@ -1 +0,0 @@ -8370a5f5603a9e5d327e89ff1b1a8620346610c92ddaaa995589601331146dc8
\ No newline at end of file diff --git a/db/schema_migrations/20200325183636 b/db/schema_migrations/20200325183636 deleted file mode 100644 index 4b8f549b445..00000000000 --- a/db/schema_migrations/20200325183636 +++ /dev/null @@ -1 +0,0 @@ -0ff00e587e420e081e3603640d5b78ece243bb3818c1b2ee00fca4a217191ffa
\ No newline at end of file diff --git a/db/schema_migrations/20200326114443 b/db/schema_migrations/20200326114443 deleted file mode 100644 index eb11bc5bf8e..00000000000 --- a/db/schema_migrations/20200326114443 +++ /dev/null @@ -1 +0,0 @@ -1a3b8152ed77737392af8d3539c84d5fe1743496c05e9d28e0b9d8ad0910199c
\ No newline at end of file diff --git a/db/schema_migrations/20200326122700 b/db/schema_migrations/20200326122700 deleted file mode 100644 index fa36e1f273c..00000000000 --- a/db/schema_migrations/20200326122700 +++ /dev/null @@ -1 +0,0 @@ -e44d88030f6eb09fae4816b0d59c33bfed8e3606b6778246785a6c59cf8bb08c
\ No newline at end of file diff --git a/db/schema_migrations/20200326124443 b/db/schema_migrations/20200326124443 deleted file mode 100644 index d59477a3dc5..00000000000 --- a/db/schema_migrations/20200326124443 +++ /dev/null @@ -1 +0,0 @@ -b4c85d097d5b9b7851f0506708b0758271da09c4303e4994a14e3d5d868a1b0d
\ No newline at end of file diff --git a/db/schema_migrations/20200326134443 b/db/schema_migrations/20200326134443 deleted file mode 100644 index 474df3aa07f..00000000000 --- a/db/schema_migrations/20200326134443 +++ /dev/null @@ -1 +0,0 @@ -05857054d9b4e99bdc60d7afbbf889e704083f92cd6a071094cda3184d170db2
\ No newline at end of file diff --git a/db/schema_migrations/20200326135443 b/db/schema_migrations/20200326135443 deleted file mode 100644 index 5c2a84df576..00000000000 --- a/db/schema_migrations/20200326135443 +++ /dev/null @@ -1 +0,0 @@ -a0b50e7e2fba107d4545164eb26b31e35cab78ea77a53e59df22782f2ee4ce1d
\ No newline at end of file diff --git a/db/schema_migrations/20200326144443 b/db/schema_migrations/20200326144443 deleted file mode 100644 index b89062f9d94..00000000000 --- a/db/schema_migrations/20200326144443 +++ /dev/null @@ -1 +0,0 @@ -1787e42a5c7e551f0e6c706e882fc1987e9fc81d58f0ef6577a9b6b59321068a
\ No newline at end of file diff --git a/db/schema_migrations/20200326145443 b/db/schema_migrations/20200326145443 deleted file mode 100644 index 25a96a6ee19..00000000000 --- a/db/schema_migrations/20200326145443 +++ /dev/null @@ -1 +0,0 @@ -c230e90f90ffbdfda37aa2a263272904754c46379bf83a35a347e30d91c4fb7c
\ No newline at end of file diff --git a/db/schema_migrations/20200330074719 b/db/schema_migrations/20200330074719 deleted file mode 100644 index 52084e7cde9..00000000000 --- a/db/schema_migrations/20200330074719 +++ /dev/null @@ -1 +0,0 @@ -5fc04f403f2c97eb76e25948d37d3e66251d3d82020c949e7f841056730d5d89
\ No newline at end of file diff --git a/db/schema_migrations/20200330121000 b/db/schema_migrations/20200330121000 deleted file mode 100644 index bf27f0af290..00000000000 --- a/db/schema_migrations/20200330121000 +++ /dev/null @@ -1 +0,0 @@ -639e7e45f4a3027ad934aa28ed838a6db12ddfcacd4492e30b5d03781ecc5956
\ No newline at end of file diff --git a/db/schema_migrations/20200330123739 b/db/schema_migrations/20200330123739 deleted file mode 100644 index 02deb3a6781..00000000000 --- a/db/schema_migrations/20200330123739 +++ /dev/null @@ -1 +0,0 @@ -f921cd2ce82286517b9f8eeb753c7d6fd8fa1521e2ac4e721bb2c1753244d24a
\ No newline at end of file diff --git a/db/schema_migrations/20200330132913 b/db/schema_migrations/20200330132913 deleted file mode 100644 index 94787ebd2c2..00000000000 --- a/db/schema_migrations/20200330132913 +++ /dev/null @@ -1 +0,0 @@ -f64c9fb9222130fbe7f7af8dcaded0e47158b59ae13452a1faa397de428ebcad
\ No newline at end of file diff --git a/db/schema_migrations/20200330203826 b/db/schema_migrations/20200330203826 deleted file mode 100644 index cf1eef6772c..00000000000 --- a/db/schema_migrations/20200330203826 +++ /dev/null @@ -1 +0,0 @@ -6a43b94f1288e9250b7fbf596987e13bf96e2f6721df864ddda6cb39a30ecf9e
\ No newline at end of file diff --git a/db/schema_migrations/20200330203837 b/db/schema_migrations/20200330203837 deleted file mode 100644 index 2e5e418d326..00000000000 --- a/db/schema_migrations/20200330203837 +++ /dev/null @@ -1 +0,0 @@ -b7159c82d117371825bd0e0ab865eafc40ffc2821f7bbd93e5b53b4abb131c1a
\ No newline at end of file diff --git a/db/schema_migrations/20200331103637 b/db/schema_migrations/20200331103637 deleted file mode 100644 index 5314e785c43..00000000000 --- a/db/schema_migrations/20200331103637 +++ /dev/null @@ -1 +0,0 @@ -cb2570258c32c29a8db61740f7cab94339d4abf8402ad0234787ebd9d4ec900f
\ No newline at end of file diff --git a/db/schema_migrations/20200331113728 b/db/schema_migrations/20200331113728 deleted file mode 100644 index 606e88f2a69..00000000000 --- a/db/schema_migrations/20200331113728 +++ /dev/null @@ -1 +0,0 @@ -2bf98da41385dce10efa06b99c1d11efc71ffa0be1454c95b3095ba66561c2e1
\ No newline at end of file diff --git a/db/schema_migrations/20200331113738 b/db/schema_migrations/20200331113738 deleted file mode 100644 index 40003a85bc5..00000000000 --- a/db/schema_migrations/20200331113738 +++ /dev/null @@ -1 +0,0 @@ -1fe7c1b25d5cc5329b4e0799587d2b84431b5ac2811c6e679560c4b0c5e62290
\ No newline at end of file diff --git a/db/schema_migrations/20200331132103 b/db/schema_migrations/20200331132103 deleted file mode 100644 index e8dd1701bef..00000000000 --- a/db/schema_migrations/20200331132103 +++ /dev/null @@ -1 +0,0 @@ -d032949c960b1e237bbc5dff6d5cf9a92d2849ca316961335b01fe02dcd2910f
\ No newline at end of file diff --git a/db/schema_migrations/20200331195952 b/db/schema_migrations/20200331195952 deleted file mode 100644 index 65bfd531378..00000000000 --- a/db/schema_migrations/20200331195952 +++ /dev/null @@ -1 +0,0 @@ -11ffb5e733d4b696d63b74449d52c76c45df6e2bf5d9a758c3b43f59d88fa94d
\ No newline at end of file diff --git a/db/schema_migrations/20200331220930 b/db/schema_migrations/20200331220930 deleted file mode 100644 index 3e0619d1d55..00000000000 --- a/db/schema_migrations/20200331220930 +++ /dev/null @@ -1 +0,0 @@ -818714755d2ee77c1be834b8ea07b2b06f97f423f00a794da0132277c82cdb36
\ No newline at end of file diff --git a/db/schema_migrations/20200401091051 b/db/schema_migrations/20200401091051 deleted file mode 100644 index dd1b9eebc39..00000000000 --- a/db/schema_migrations/20200401091051 +++ /dev/null @@ -1 +0,0 @@ -e11619ace35714e76f2da4d82a95381a3d49a1215fc5def309281f9185d7d400
\ No newline at end of file diff --git a/db/schema_migrations/20200401095430 b/db/schema_migrations/20200401095430 deleted file mode 100644 index 1cba0e9e789..00000000000 --- a/db/schema_migrations/20200401095430 +++ /dev/null @@ -1 +0,0 @@ -b0f154bef54b6ab9f9b6722016e1cb8642c567bde1d57a66a31f70d8cca37fda
\ No newline at end of file diff --git a/db/schema_migrations/20200401211005 b/db/schema_migrations/20200401211005 deleted file mode 100644 index 68b2137760b..00000000000 --- a/db/schema_migrations/20200401211005 +++ /dev/null @@ -1 +0,0 @@ -a7941ffd4617b2a45a74febe9b338bee746df1bfb13349e38c3c519a5b21ca16
\ No newline at end of file diff --git a/db/schema_migrations/20200402001106 b/db/schema_migrations/20200402001106 deleted file mode 100644 index 42f281c36f0..00000000000 --- a/db/schema_migrations/20200402001106 +++ /dev/null @@ -1 +0,0 @@ -82fbcc682d7f86c667954d939e4ff747e5dddc91d1a7aa8ecd21911aeae605cb
\ No newline at end of file diff --git a/db/schema_migrations/20200402115013 b/db/schema_migrations/20200402115013 deleted file mode 100644 index 3fe1d246806..00000000000 --- a/db/schema_migrations/20200402115013 +++ /dev/null @@ -1 +0,0 @@ -5ef3cd4613e901716d9c0a026485076c9319737919a7bbce4c2eee4d4413aeec
\ No newline at end of file diff --git a/db/schema_migrations/20200402115623 b/db/schema_migrations/20200402115623 deleted file mode 100644 index bd93c32995c..00000000000 --- a/db/schema_migrations/20200402115623 +++ /dev/null @@ -1 +0,0 @@ -5c9ae74ad4efe967310773eefb3f8070ef6955b93ceca910b8e721a05243998e
\ No newline at end of file diff --git a/db/schema_migrations/20200402123926 b/db/schema_migrations/20200402123926 deleted file mode 100644 index 753097dae49..00000000000 --- a/db/schema_migrations/20200402123926 +++ /dev/null @@ -1 +0,0 @@ -c708ad745a0d858a6ecd993b5ca7f621e3a36b2d770b774c330f285948186311
\ No newline at end of file diff --git a/db/schema_migrations/20200402124802 b/db/schema_migrations/20200402124802 deleted file mode 100644 index eb23b9ad72d..00000000000 --- a/db/schema_migrations/20200402124802 +++ /dev/null @@ -1 +0,0 @@ -f27ff20edac6214fc34e19098a022ff0da5c90fa2c4d0051c1ef499022d9a3b6
\ No newline at end of file diff --git a/db/schema_migrations/20200402135250 b/db/schema_migrations/20200402135250 deleted file mode 100644 index e042be7b268..00000000000 --- a/db/schema_migrations/20200402135250 +++ /dev/null @@ -1 +0,0 @@ -b359d2f9a7b456aea2e4fa1b5d8ec7d28125cf696bb4d244532bfe448356c186
\ No newline at end of file diff --git a/db/schema_migrations/20200402185044 b/db/schema_migrations/20200402185044 deleted file mode 100644 index 74b0d9ed394..00000000000 --- a/db/schema_migrations/20200402185044 +++ /dev/null @@ -1 +0,0 @@ -d9ffe8bc5f2594ce164cf4f51ae969705fa0b5501c9a6e8529819d22cb6159e5
\ No newline at end of file diff --git a/db/schema_migrations/20200403132349 b/db/schema_migrations/20200403132349 deleted file mode 100644 index 093a56c8fd5..00000000000 --- a/db/schema_migrations/20200403132349 +++ /dev/null @@ -1 +0,0 @@ -a381d5675c3fa80ed0b3bc9108103e42553e697ac0db4ab78e31a79f93d9de1d
\ No newline at end of file diff --git a/db/schema_migrations/20200403184110 b/db/schema_migrations/20200403184110 deleted file mode 100644 index 5503fff93ac..00000000000 --- a/db/schema_migrations/20200403184110 +++ /dev/null @@ -1 +0,0 @@ -61c6f41c76381139c56e5ef8674b23f2dc87f76677d8ae16791db27ba129ea0c
\ No newline at end of file diff --git a/db/schema_migrations/20200403185127 b/db/schema_migrations/20200403185127 deleted file mode 100644 index bfe7eb68fe8..00000000000 --- a/db/schema_migrations/20200403185127 +++ /dev/null @@ -1 +0,0 @@ -134f0f3217952c5dfca109374c9b90cf3d76ceea527530713988ef25e0e237ee
\ No newline at end of file diff --git a/db/schema_migrations/20200403185422 b/db/schema_migrations/20200403185422 deleted file mode 100644 index a2fe5409efc..00000000000 --- a/db/schema_migrations/20200403185422 +++ /dev/null @@ -1 +0,0 @@ -b65b6a0905672f81d728021940e2480723913053b29eee16f1fa350c9a8b08eb
\ No newline at end of file diff --git a/db/schema_migrations/20200406095930 b/db/schema_migrations/20200406095930 deleted file mode 100644 index 27f74b9d92c..00000000000 --- a/db/schema_migrations/20200406095930 +++ /dev/null @@ -1 +0,0 @@ -3a5d20d3fa0b73f2e49aa38bed5b3e0aae267788b679f360535190de166e827f
\ No newline at end of file diff --git a/db/schema_migrations/20200406100909 b/db/schema_migrations/20200406100909 deleted file mode 100644 index 2ebe9dd6979..00000000000 --- a/db/schema_migrations/20200406100909 +++ /dev/null @@ -1 +0,0 @@ -7cf2f4a946bef35e4a8c2a9a45ca7102ad6535791ff84423af0890ea5644abc8
\ No newline at end of file diff --git a/db/schema_migrations/20200406102111 b/db/schema_migrations/20200406102111 deleted file mode 100644 index e61ba266223..00000000000 --- a/db/schema_migrations/20200406102111 +++ /dev/null @@ -1 +0,0 @@ -56efa5b6b0545b51d47c27c16b7fb8217d56fba701bff39b5776b5a9a2dbcdf2
\ No newline at end of file diff --git a/db/schema_migrations/20200406102120 b/db/schema_migrations/20200406102120 deleted file mode 100644 index 31727cf3607..00000000000 --- a/db/schema_migrations/20200406102120 +++ /dev/null @@ -1 +0,0 @@ -5e7ffbca4477555e55f650037502e38fec63084f6681358614f5caab896417f7
\ No newline at end of file diff --git a/db/schema_migrations/20200406132529 b/db/schema_migrations/20200406132529 deleted file mode 100644 index 05f9c71723e..00000000000 --- a/db/schema_migrations/20200406132529 +++ /dev/null @@ -1 +0,0 @@ -4b308b55824c8fc1b7ca6b2f847382be79cc82ecad6896969be551f630face6f
\ No newline at end of file diff --git a/db/schema_migrations/20200406135648 b/db/schema_migrations/20200406135648 deleted file mode 100644 index 563439ec8ba..00000000000 --- a/db/schema_migrations/20200406135648 +++ /dev/null @@ -1 +0,0 @@ -a9b4b9f33045f13e75cff4e26f0770270f291673776c85bc6d57beef4daad1f7
\ No newline at end of file diff --git a/db/schema_migrations/20200406141452 b/db/schema_migrations/20200406141452 deleted file mode 100644 index cd509e2fb97..00000000000 --- a/db/schema_migrations/20200406141452 +++ /dev/null @@ -1 +0,0 @@ -59c110c50bd77d05fffaca466e609090abc7bae9166ec3a754115cc353d2bb04
\ No newline at end of file diff --git a/db/schema_migrations/20200406192059 b/db/schema_migrations/20200406192059 deleted file mode 100644 index 1e71ed11efe..00000000000 --- a/db/schema_migrations/20200406192059 +++ /dev/null @@ -1 +0,0 @@ -db5445e1a50de06348cb1e0f4737b7f4f66426595bd7cd2de0078a74346eef5f
\ No newline at end of file diff --git a/db/schema_migrations/20200406193427 b/db/schema_migrations/20200406193427 deleted file mode 100644 index cfe16383f85..00000000000 --- a/db/schema_migrations/20200406193427 +++ /dev/null @@ -1 +0,0 @@ -26d6182d01dd7958dae153c22f13f2c1b7930cd74b912de067e7a6743084f6fb
\ No newline at end of file diff --git a/db/schema_migrations/20200407094005 b/db/schema_migrations/20200407094005 deleted file mode 100644 index 21bc7433a86..00000000000 --- a/db/schema_migrations/20200407094005 +++ /dev/null @@ -1 +0,0 @@ -deb40c4055e0c810a98ba26ac51be2be6b424b978a4f2cc64338233128c84927
\ No newline at end of file diff --git a/db/schema_migrations/20200407094923 b/db/schema_migrations/20200407094923 deleted file mode 100644 index fa71c965570..00000000000 --- a/db/schema_migrations/20200407094923 +++ /dev/null @@ -1 +0,0 @@ -b48e03a58fbcc140768112d120e5c927c20ceca64e1d5079f938ba75e23d9e43
\ No newline at end of file diff --git a/db/schema_migrations/20200407120000 b/db/schema_migrations/20200407120000 deleted file mode 100644 index 14df432f6c8..00000000000 --- a/db/schema_migrations/20200407120000 +++ /dev/null @@ -1 +0,0 @@ -eba6253dbb2ff86c108c801c67665a8e19b6d88293ff824a41006347d0b4a4c3
\ No newline at end of file diff --git a/db/schema_migrations/20200407121321 b/db/schema_migrations/20200407121321 deleted file mode 100644 index c3bf42bb675..00000000000 --- a/db/schema_migrations/20200407121321 +++ /dev/null @@ -1 +0,0 @@ -5cb21d0c39526d9d0a8f7e3d76ae41c8e1bc6d2389c597e0143175cd9cbbf93f
\ No newline at end of file diff --git a/db/schema_migrations/20200407171133 b/db/schema_migrations/20200407171133 deleted file mode 100644 index 4201b37e420..00000000000 --- a/db/schema_migrations/20200407171133 +++ /dev/null @@ -1 +0,0 @@ -3276dfca5d74628c56ee2bf72588faee21d7ca74b3876215c0d449a57d20094d
\ No newline at end of file diff --git a/db/schema_migrations/20200407171417 b/db/schema_migrations/20200407171417 deleted file mode 100644 index 239a4923b8b..00000000000 --- a/db/schema_migrations/20200407171417 +++ /dev/null @@ -1 +0,0 @@ -a9b99715636ae4cb61b1eb822ca559178a11d2351ae8858c6a68e4f37bf86626
\ No newline at end of file diff --git a/db/schema_migrations/20200407182205 b/db/schema_migrations/20200407182205 deleted file mode 100644 index 274720357a8..00000000000 --- a/db/schema_migrations/20200407182205 +++ /dev/null @@ -1 +0,0 @@ -450ebcd6b8ea2f0d29661b83cd601b270e10b332c0ee178e9147b4946f90de82
\ No newline at end of file diff --git a/db/schema_migrations/20200407222647 b/db/schema_migrations/20200407222647 deleted file mode 100644 index cefab8fbffe..00000000000 --- a/db/schema_migrations/20200407222647 +++ /dev/null @@ -1 +0,0 @@ -ff735eb514bbe19871943b1d66c19b427b4dc233ca25db81532555654abead4b
\ No newline at end of file diff --git a/db/schema_migrations/20200408110856 b/db/schema_migrations/20200408110856 deleted file mode 100644 index 6afc26ce1db..00000000000 --- a/db/schema_migrations/20200408110856 +++ /dev/null @@ -1 +0,0 @@ -be8dd7230c7564217758f6731f3406647af0dd283e83c59833e879330f9c9ce3
\ No newline at end of file diff --git a/db/schema_migrations/20200408125046 b/db/schema_migrations/20200408125046 deleted file mode 100644 index fcfc11208d3..00000000000 --- a/db/schema_migrations/20200408125046 +++ /dev/null @@ -1 +0,0 @@ -74eb691ef4d0f542ebaf2a0550b55b47ba296e7f623fe67d6f837c9f4d4c677f
\ No newline at end of file diff --git a/db/schema_migrations/20200408132152 b/db/schema_migrations/20200408132152 deleted file mode 100644 index e7cfebd605a..00000000000 --- a/db/schema_migrations/20200408132152 +++ /dev/null @@ -1 +0,0 @@ -3ccb2170880e362c243b4071f7a9c3c1edafecbef54a09f66f2fdc95e8c936e6
\ No newline at end of file diff --git a/db/schema_migrations/20200408133211 b/db/schema_migrations/20200408133211 deleted file mode 100644 index 417a58a5f1f..00000000000 --- a/db/schema_migrations/20200408133211 +++ /dev/null @@ -1 +0,0 @@ -6f780f20897959d4966b5a622cede02ce37b8b89d99f5cbf326cf2704f7f9164
\ No newline at end of file diff --git a/db/schema_migrations/20200408153842 b/db/schema_migrations/20200408153842 deleted file mode 100644 index 7c54b8f6023..00000000000 --- a/db/schema_migrations/20200408153842 +++ /dev/null @@ -1 +0,0 @@ -329f5b831d7285973819051c68bb56593f7d755792e745d16781bb947c5f3a24
\ No newline at end of file diff --git a/db/schema_migrations/20200408154331 b/db/schema_migrations/20200408154331 deleted file mode 100644 index b499cb0c75f..00000000000 --- a/db/schema_migrations/20200408154331 +++ /dev/null @@ -1 +0,0 @@ -c49fc5d4e91ada6606d2a2823d214bcb8ad6d383778555a0eb881ebc042feeae
\ No newline at end of file diff --git a/db/schema_migrations/20200408154349 b/db/schema_migrations/20200408154349 deleted file mode 100644 index d30aae8e990..00000000000 --- a/db/schema_migrations/20200408154349 +++ /dev/null @@ -1 +0,0 @@ -c65e4a9d015b0cc188c84b18bbd66b45d76d2d281f0d378946b8519705428350
\ No newline at end of file diff --git a/db/schema_migrations/20200408154411 b/db/schema_migrations/20200408154411 deleted file mode 100644 index fe885df8f9b..00000000000 --- a/db/schema_migrations/20200408154411 +++ /dev/null @@ -1 +0,0 @@ -13f95e797975de6456f30301cfc670f411c15470966afb9df83fa2a734edc4cc
\ No newline at end of file diff --git a/db/schema_migrations/20200408154428 b/db/schema_migrations/20200408154428 deleted file mode 100644 index 0d464c5841a..00000000000 --- a/db/schema_migrations/20200408154428 +++ /dev/null @@ -1 +0,0 @@ -cc52aced123adb89714f854c9f81166d4fd2f5b9c40222163fc7ae65266f0b0f
\ No newline at end of file diff --git a/db/schema_migrations/20200408154455 b/db/schema_migrations/20200408154455 deleted file mode 100644 index 874ee92d3a9..00000000000 --- a/db/schema_migrations/20200408154455 +++ /dev/null @@ -1 +0,0 @@ -4030a039abadc6200026c82a3a1a1a0731818fb21c2bf456ed2aa7e89b4cc201
\ No newline at end of file diff --git a/db/schema_migrations/20200408154533 b/db/schema_migrations/20200408154533 deleted file mode 100644 index bb8b13b28e8..00000000000 --- a/db/schema_migrations/20200408154533 +++ /dev/null @@ -1 +0,0 @@ -937d505687e4d4e2ebd531a02ef2fc1ea6ce3c8f281f859a4e97b3b9f8d53dfb
\ No newline at end of file diff --git a/db/schema_migrations/20200408154604 b/db/schema_migrations/20200408154604 deleted file mode 100644 index 93b5dc3d3a7..00000000000 --- a/db/schema_migrations/20200408154604 +++ /dev/null @@ -1 +0,0 @@ -49d34581b0a36a39acf5473bb6b90c66adbdc854b755ca4881cab31a4589cede
\ No newline at end of file diff --git a/db/schema_migrations/20200408154624 b/db/schema_migrations/20200408154624 deleted file mode 100644 index acdaafd630f..00000000000 --- a/db/schema_migrations/20200408154624 +++ /dev/null @@ -1 +0,0 @@ -e35b8efc06c3e9f15a21d9dacf5b2b0694439bc333fd46283d010d7e8dbce227
\ No newline at end of file diff --git a/db/schema_migrations/20200408175424 b/db/schema_migrations/20200408175424 deleted file mode 100644 index 5134721870e..00000000000 --- a/db/schema_migrations/20200408175424 +++ /dev/null @@ -1 +0,0 @@ -5a10ec51a9a1eec842931ccbc184988dfad86e1c212fccb61fbc3f59a22fbc33
\ No newline at end of file diff --git a/db/schema_migrations/20200408212219 b/db/schema_migrations/20200408212219 deleted file mode 100644 index 04c5dae1424..00000000000 --- a/db/schema_migrations/20200408212219 +++ /dev/null @@ -1 +0,0 @@ -41f095068e12a277174d45e10dbc60cd2104af2f8cfb5d4b82a94b57e3957c44
\ No newline at end of file diff --git a/db/schema_migrations/20200409085956 b/db/schema_migrations/20200409085956 deleted file mode 100644 index beaa92bdd00..00000000000 --- a/db/schema_migrations/20200409085956 +++ /dev/null @@ -1 +0,0 @@ -7cabe8105e1714e3387577420fafa06c418219e31c895803fa97908e2cf5b3b2
\ No newline at end of file diff --git a/db/schema_migrations/20200409105455 b/db/schema_migrations/20200409105455 deleted file mode 100644 index 80aac192a39..00000000000 --- a/db/schema_migrations/20200409105455 +++ /dev/null @@ -1 +0,0 @@ -5d412bb94282f7ab28848e6f96b9f18eef00ffe5913a33d2c7416a09251ae7c7
\ No newline at end of file diff --git a/db/schema_migrations/20200409105456 b/db/schema_migrations/20200409105456 deleted file mode 100644 index 20f393625f3..00000000000 --- a/db/schema_migrations/20200409105456 +++ /dev/null @@ -1 +0,0 @@ -a4a79070cd18c46575e2f9c6d2a798fc8152fbbc0a923244b82b8151d3bf680a
\ No newline at end of file diff --git a/db/schema_migrations/20200409211607 b/db/schema_migrations/20200409211607 deleted file mode 100644 index d7af855a6bd..00000000000 --- a/db/schema_migrations/20200409211607 +++ /dev/null @@ -1 +0,0 @@ -0468ea64248cb0fdf9acfed9aeff7fd05875dd505b548cfd92e195a8cc82668b
\ No newline at end of file diff --git a/db/schema_migrations/20200410104828 b/db/schema_migrations/20200410104828 deleted file mode 100644 index 665be131b9a..00000000000 --- a/db/schema_migrations/20200410104828 +++ /dev/null @@ -1 +0,0 @@ -2efdbd11929ce0164c5a035cb7e1d9a386f1bf375aa0dbc08e8bdc2c5788eebf
\ No newline at end of file diff --git a/db/schema_migrations/20200410232012 b/db/schema_migrations/20200410232012 deleted file mode 100644 index 54336ee1c13..00000000000 --- a/db/schema_migrations/20200410232012 +++ /dev/null @@ -1 +0,0 @@ -f8b29495edc391d3df303356ad6f6219bdfbe2d5655330030b229ab8ccabbc9c
\ No newline at end of file diff --git a/db/schema_migrations/20200411125656 b/db/schema_migrations/20200411125656 deleted file mode 100644 index 9e30c747d19..00000000000 --- a/db/schema_migrations/20200411125656 +++ /dev/null @@ -1 +0,0 @@ -8dcfe2eb5889767ce2011f9a1a130a7fe208a124f61134d067ec42b5dc021be3
\ No newline at end of file diff --git a/db/schema_migrations/20200413072059 b/db/schema_migrations/20200413072059 deleted file mode 100644 index ce70578ffc0..00000000000 --- a/db/schema_migrations/20200413072059 +++ /dev/null @@ -1 +0,0 @@ -f16f0227df3242e1bc4dd71c9dc014345ba9446ba7ab6053b156aef4620488ef
\ No newline at end of file diff --git a/db/schema_migrations/20200413230056 b/db/schema_migrations/20200413230056 deleted file mode 100644 index d352a8e8d92..00000000000 --- a/db/schema_migrations/20200413230056 +++ /dev/null @@ -1 +0,0 @@ -518f58c0edd4c6176c07d83739d4b990ed3cae490441be55bbdcee80ade127bb
\ No newline at end of file diff --git a/db/schema_migrations/20200414112444 b/db/schema_migrations/20200414112444 deleted file mode 100644 index 202ab7b6f48..00000000000 --- a/db/schema_migrations/20200414112444 +++ /dev/null @@ -1 +0,0 @@ -9693bca9cb23dcac4b35289ccb62b2ef154476a7460958cb16202f490bbfaf99
\ No newline at end of file diff --git a/db/schema_migrations/20200414114611 b/db/schema_migrations/20200414114611 deleted file mode 100644 index 5841d6c47be..00000000000 --- a/db/schema_migrations/20200414114611 +++ /dev/null @@ -1 +0,0 @@ -130600efce08e1dcac88785730ae99b924d484c5314d124998aaff32123490a3
\ No newline at end of file diff --git a/db/schema_migrations/20200414115801 b/db/schema_migrations/20200414115801 deleted file mode 100644 index ea087a6d98a..00000000000 --- a/db/schema_migrations/20200414115801 +++ /dev/null @@ -1 +0,0 @@ -e333b6dc2dfc70a82b8573fba748f7f1dcfdf92314657ca2bc98816afce91935
\ No newline at end of file diff --git a/db/schema_migrations/20200414144547 b/db/schema_migrations/20200414144547 deleted file mode 100644 index 392d4f56b3a..00000000000 --- a/db/schema_migrations/20200414144547 +++ /dev/null @@ -1 +0,0 @@ -e77b105a041f8dbec55236722f253c089f14f98997b28dc2a43617bfd9cd9b39
\ No newline at end of file diff --git a/db/schema_migrations/20200415153154 b/db/schema_migrations/20200415153154 deleted file mode 100644 index efbdccfdda7..00000000000 --- a/db/schema_migrations/20200415153154 +++ /dev/null @@ -1 +0,0 @@ -e288357c25540ce6b9f7e38fcb5e49585fc26929db40c71c14737999987855c1
\ No newline at end of file diff --git a/db/schema_migrations/20200415160722 b/db/schema_migrations/20200415160722 deleted file mode 100644 index 1252b3a5ab2..00000000000 --- a/db/schema_migrations/20200415160722 +++ /dev/null @@ -1 +0,0 @@ -c3d28ed4b2eb271d918a1eef1a4cfc0af302f4c8852773db9075d692b1691971
\ No newline at end of file diff --git a/db/schema_migrations/20200415161021 b/db/schema_migrations/20200415161021 deleted file mode 100644 index c7a0fb6144d..00000000000 --- a/db/schema_migrations/20200415161021 +++ /dev/null @@ -1 +0,0 @@ -731f7fa44d1b86ed619b7a7e4bd1fad6a943cf84a66b973b95581ae6d7b4a1db
\ No newline at end of file diff --git a/db/schema_migrations/20200415161206 b/db/schema_migrations/20200415161206 deleted file mode 100644 index 8d5b41dd105..00000000000 --- a/db/schema_migrations/20200415161206 +++ /dev/null @@ -1 +0,0 @@ -eb9abab7fe4e3dd07a8995c3c9f514c13c3dbf4d49b1c100722fc9ada3351d2e
\ No newline at end of file diff --git a/db/schema_migrations/20200415192656 b/db/schema_migrations/20200415192656 deleted file mode 100644 index 859f70b279c..00000000000 --- a/db/schema_migrations/20200415192656 +++ /dev/null @@ -1 +0,0 @@ -bc728b4d00992542a86324b0fc054ef435c9f35ccb5c31d74e9eef22fc8c03a7
\ No newline at end of file diff --git a/db/schema_migrations/20200415203024 b/db/schema_migrations/20200415203024 deleted file mode 100644 index 7ac44656255..00000000000 --- a/db/schema_migrations/20200415203024 +++ /dev/null @@ -1 +0,0 @@ -2fbdc8f9d10f9fbbbd1216b0a43d43183b659e7bcff7ee141d76a16100569005
\ No newline at end of file diff --git a/db/schema_migrations/20200416005331 b/db/schema_migrations/20200416005331 deleted file mode 100644 index 959c63e1054..00000000000 --- a/db/schema_migrations/20200416005331 +++ /dev/null @@ -1 +0,0 @@ -262e32b88e88bba1e7133cf002ee4a2209b23b0726b3ad1952a108ccdcf8802b
\ No newline at end of file diff --git a/db/schema_migrations/20200416111111 b/db/schema_migrations/20200416111111 deleted file mode 100644 index 5dacc01d27b..00000000000 --- a/db/schema_migrations/20200416111111 +++ /dev/null @@ -1 +0,0 @@ -d2c801f6867b16ccd0a20217e0c76a6c689e2fc7c560256460734c91a427e760
\ No newline at end of file diff --git a/db/schema_migrations/20200416120128 b/db/schema_migrations/20200416120128 deleted file mode 100644 index 14eef050991..00000000000 --- a/db/schema_migrations/20200416120128 +++ /dev/null @@ -1 +0,0 @@ -8d4b95f1e5aac6d9079b4e4801258259314327baefcd63a5aa50ed05b2450cd0
\ No newline at end of file diff --git a/db/schema_migrations/20200416120354 b/db/schema_migrations/20200416120354 deleted file mode 100644 index 6987eb606ac..00000000000 --- a/db/schema_migrations/20200416120354 +++ /dev/null @@ -1 +0,0 @@ -c2f2dadbbff62e1330c6ec10b0b0508bac0e92e780a0113915f348b164372ae7
\ No newline at end of file diff --git a/db/schema_migrations/20200417044453 b/db/schema_migrations/20200417044453 deleted file mode 100644 index a1d8c20f8da..00000000000 --- a/db/schema_migrations/20200417044453 +++ /dev/null @@ -1 +0,0 @@ -1f4f7f8c9e61381255a914449053586b7ef89b77c8ca6cc7aab3b0f37b746ada
\ No newline at end of file diff --git a/db/schema_migrations/20200417075843 b/db/schema_migrations/20200417075843 deleted file mode 100644 index 8d4daad0378..00000000000 --- a/db/schema_migrations/20200417075843 +++ /dev/null @@ -1 +0,0 @@ -b8ce568841406f2422a34c93f7d02d9009fd35d1e3c1f7a21f71f6af1e745919
\ No newline at end of file diff --git a/db/schema_migrations/20200417145946 b/db/schema_migrations/20200417145946 deleted file mode 100644 index 73d4647db5d..00000000000 --- a/db/schema_migrations/20200417145946 +++ /dev/null @@ -1 +0,0 @@ -cf47ac4249d03e49851ef6506129939f476218856d5715a719c0b01f258e55f9
\ No newline at end of file diff --git a/db/schema_migrations/20200420092011 b/db/schema_migrations/20200420092011 deleted file mode 100644 index b5c5d8e4cb0..00000000000 --- a/db/schema_migrations/20200420092011 +++ /dev/null @@ -1 +0,0 @@ -57c25e79b952319b38b6d913ac1d1fd1252c006cc34c2140a96bcb573f67db36
\ No newline at end of file diff --git a/db/schema_migrations/20200420094444 b/db/schema_migrations/20200420094444 deleted file mode 100644 index 6b430be98e7..00000000000 --- a/db/schema_migrations/20200420094444 +++ /dev/null @@ -1 +0,0 @@ -ee3a22f9d26c2a51e09b45ef55564a9770ecb1b523873292cc5c484c961c3573
\ No newline at end of file diff --git a/db/schema_migrations/20200420104303 b/db/schema_migrations/20200420104303 deleted file mode 100644 index 2be42260faf..00000000000 --- a/db/schema_migrations/20200420104303 +++ /dev/null @@ -1 +0,0 @@ -b0c3b8fa8257874dd28b6057313390af9261ceb934f1b89e4812f23c23909c9c
\ No newline at end of file diff --git a/db/schema_migrations/20200420104323 b/db/schema_migrations/20200420104323 deleted file mode 100644 index 8335c344f01..00000000000 --- a/db/schema_migrations/20200420104323 +++ /dev/null @@ -1 +0,0 @@ -c2729622353fec28de04009e1e14d99dd49cbd79ee9834b034858a851fb434e5
\ No newline at end of file diff --git a/db/schema_migrations/20200420115948 b/db/schema_migrations/20200420115948 deleted file mode 100644 index c6bc76b5c43..00000000000 --- a/db/schema_migrations/20200420115948 +++ /dev/null @@ -1 +0,0 @@ -d146fefc2c44e68a1067f504fd779328028b4e65a8aad840fff9c6f83fbb3a83
\ No newline at end of file diff --git a/db/schema_migrations/20200420141733 b/db/schema_migrations/20200420141733 deleted file mode 100644 index e714da7d2c3..00000000000 --- a/db/schema_migrations/20200420141733 +++ /dev/null @@ -1 +0,0 @@ -ac3ba795b92e8fa9d6d1d9be546f9f3464da8fc2ea4c8d317a64b3eec5631b7d
\ No newline at end of file diff --git a/db/schema_migrations/20200420162730 b/db/schema_migrations/20200420162730 deleted file mode 100644 index ea96207aba2..00000000000 --- a/db/schema_migrations/20200420162730 +++ /dev/null @@ -1 +0,0 @@ -75bcc7394a5c99cfd3a7156ede94e5a8a561bbed2f7770333dbacdfd6fd30e28
\ No newline at end of file diff --git a/db/schema_migrations/20200420172113 b/db/schema_migrations/20200420172113 deleted file mode 100644 index 9de48b9a489..00000000000 --- a/db/schema_migrations/20200420172113 +++ /dev/null @@ -1 +0,0 @@ -9eb84b3a43ad13c2f3559ebf2ef78f8a5ef2eb78819e05db431dac387a6f3e08
\ No newline at end of file diff --git a/db/schema_migrations/20200420172752 b/db/schema_migrations/20200420172752 deleted file mode 100644 index eac9c38d8fb..00000000000 --- a/db/schema_migrations/20200420172752 +++ /dev/null @@ -1 +0,0 @@ -57313ed166bf63588d2465b015efb887cabfc0b85d7513c16e91effb42dda3d7
\ No newline at end of file diff --git a/db/schema_migrations/20200420172927 b/db/schema_migrations/20200420172927 deleted file mode 100644 index f04bb675166..00000000000 --- a/db/schema_migrations/20200420172927 +++ /dev/null @@ -1 +0,0 @@ -dbf703edbfba23f5ce02ef075136f059a3c16f61d6ad70f084a089f41abb3579
\ No newline at end of file diff --git a/db/schema_migrations/20200420201933 b/db/schema_migrations/20200420201933 deleted file mode 100644 index fe300d98d2b..00000000000 --- a/db/schema_migrations/20200420201933 +++ /dev/null @@ -1 +0,0 @@ -2996752313cdf23d29312892f13751b3e37afa60d8353e8ff87354c77b60fc27
\ No newline at end of file diff --git a/db/schema_migrations/20200421054930 b/db/schema_migrations/20200421054930 deleted file mode 100644 index 9a2bbebd0fe..00000000000 --- a/db/schema_migrations/20200421054930 +++ /dev/null @@ -1 +0,0 @@ -61b72a69db5bb30f4533807241bba767870e9d04edf5cf2d7439d6a6582d88bb
\ No newline at end of file diff --git a/db/schema_migrations/20200421054948 b/db/schema_migrations/20200421054948 deleted file mode 100644 index 168fa5e9589..00000000000 --- a/db/schema_migrations/20200421054948 +++ /dev/null @@ -1 +0,0 @@ -5315f43f4049781962b042ce4372741b74585640c4fd82d954e7ef0ba39692cc
\ No newline at end of file diff --git a/db/schema_migrations/20200421092907 b/db/schema_migrations/20200421092907 deleted file mode 100644 index 06e6ee47e05..00000000000 --- a/db/schema_migrations/20200421092907 +++ /dev/null @@ -1 +0,0 @@ -952580ab54ef8e7380f3c344f09943f484ddedaeeede5d5f891832d54b8c12b3
\ No newline at end of file diff --git a/db/schema_migrations/20200421111005 b/db/schema_migrations/20200421111005 deleted file mode 100644 index a232b596dd7..00000000000 --- a/db/schema_migrations/20200421111005 +++ /dev/null @@ -1 +0,0 @@ -99226197b1efc5669616bb66a19d82ea301bfb29450174b0ab461d8fa13c8a59
\ No newline at end of file diff --git a/db/schema_migrations/20200421195234 b/db/schema_migrations/20200421195234 deleted file mode 100644 index a15e01cef69..00000000000 --- a/db/schema_migrations/20200421195234 +++ /dev/null @@ -1 +0,0 @@ -f3cb8c96656e246470b6f60fdae16d517ffd986486f640e7ed83e7e5abd5586b
\ No newline at end of file diff --git a/db/schema_migrations/20200421233150 b/db/schema_migrations/20200421233150 deleted file mode 100644 index 873a18e0ebc..00000000000 --- a/db/schema_migrations/20200421233150 +++ /dev/null @@ -1 +0,0 @@ -82f0d006e56af52b58fc8996729f4978f2aaa0611d546c5fff177952720d2b6b
\ No newline at end of file diff --git a/db/schema_migrations/20200422091541 b/db/schema_migrations/20200422091541 deleted file mode 100644 index dbe87f6ba3b..00000000000 --- a/db/schema_migrations/20200422091541 +++ /dev/null @@ -1 +0,0 @@ -574914c2c2fa66d7d673eb112bf97a05819f4ffffebeab2af898ebcf701cd90a
\ No newline at end of file diff --git a/db/schema_migrations/20200422213749 b/db/schema_migrations/20200422213749 deleted file mode 100644 index 8a551ff5598..00000000000 --- a/db/schema_migrations/20200422213749 +++ /dev/null @@ -1 +0,0 @@ -0383e827905b3dae8c489c7f7fafda7e77152eff3af27881d6b6f16091d78761
\ No newline at end of file diff --git a/db/schema_migrations/20200423075720 b/db/schema_migrations/20200423075720 deleted file mode 100644 index 4c51f084dd3..00000000000 --- a/db/schema_migrations/20200423075720 +++ /dev/null @@ -1 +0,0 @@ -cdbe8252533ee61c56822d625faae9ddb28f1ae95c76fc71b85a2ca3a95da356
\ No newline at end of file diff --git a/db/schema_migrations/20200423080334 b/db/schema_migrations/20200423080334 deleted file mode 100644 index 8857680d4a3..00000000000 --- a/db/schema_migrations/20200423080334 +++ /dev/null @@ -1 +0,0 @@ -6940b4bc344478480d8e048e0d036ddb9ad4edd6daf56b48a7cac5df3fbe6bf4
\ No newline at end of file diff --git a/db/schema_migrations/20200423080607 b/db/schema_migrations/20200423080607 deleted file mode 100644 index 662d1c68c37..00000000000 --- a/db/schema_migrations/20200423080607 +++ /dev/null @@ -1 +0,0 @@ -e283adde76a397d4fa3e843a7277e546fcfa158d8f92f4f50f517132244c6e84
\ No newline at end of file diff --git a/db/schema_migrations/20200423081409 b/db/schema_migrations/20200423081409 deleted file mode 100644 index f6dbd4aa5ff..00000000000 --- a/db/schema_migrations/20200423081409 +++ /dev/null @@ -1 +0,0 @@ -585a91a06cec65fbb89791df00a5b04a56617734d435bd64a7a6484f00fea509
\ No newline at end of file diff --git a/db/schema_migrations/20200423081441 b/db/schema_migrations/20200423081441 deleted file mode 100644 index 831110c361f..00000000000 --- a/db/schema_migrations/20200423081441 +++ /dev/null @@ -1 +0,0 @@ -f8a72dab94a79b4a9fb9d6a84dbe9248602cdcceafff775a37ee53078318dd43
\ No newline at end of file diff --git a/db/schema_migrations/20200423081519 b/db/schema_migrations/20200423081519 deleted file mode 100644 index ccdab2b88b2..00000000000 --- a/db/schema_migrations/20200423081519 +++ /dev/null @@ -1 +0,0 @@ -f6415849e3808390f7d760f31cb79f419ce04bc29ef4f1d39ca7f751de47b5d4
\ No newline at end of file diff --git a/db/schema_migrations/20200423101529 b/db/schema_migrations/20200423101529 deleted file mode 100644 index bd0e92b0cc7..00000000000 --- a/db/schema_migrations/20200423101529 +++ /dev/null @@ -1 +0,0 @@ -26750021476db448ca0cd22a8a4bc218d5b84e19b20202c9cf0a616461cc1ee1
\ No newline at end of file diff --git a/db/schema_migrations/20200424043515 b/db/schema_migrations/20200424043515 deleted file mode 100644 index 40a53f2cd0d..00000000000 --- a/db/schema_migrations/20200424043515 +++ /dev/null @@ -1 +0,0 @@ -c755d36c9e144a3bd6673bacadf24e2d34224c4de060b992dd589a52985ea337
\ No newline at end of file diff --git a/db/schema_migrations/20200424050250 b/db/schema_migrations/20200424050250 deleted file mode 100644 index 72d64451361..00000000000 --- a/db/schema_migrations/20200424050250 +++ /dev/null @@ -1 +0,0 @@ -2b2cd2e7101e8225dd177c9437c8fee2039dbca5c5f1558ce1a849d9799cc34c
\ No newline at end of file diff --git a/db/schema_migrations/20200424101920 b/db/schema_migrations/20200424101920 deleted file mode 100644 index 58be080faec..00000000000 --- a/db/schema_migrations/20200424101920 +++ /dev/null @@ -1 +0,0 @@ -d8f66da9290be14f8885b39be93ef234244a5b9394991d32f1d35a587665d932
\ No newline at end of file diff --git a/db/schema_migrations/20200424102023 b/db/schema_migrations/20200424102023 deleted file mode 100644 index 3aec6ddeac3..00000000000 --- a/db/schema_migrations/20200424102023 +++ /dev/null @@ -1 +0,0 @@ -e82c4e3ce433cf563e23fddf1847157ab8d9b01d5a3a996b3983dade301518b7
\ No newline at end of file diff --git a/db/schema_migrations/20200424135319 b/db/schema_migrations/20200424135319 deleted file mode 100644 index 0e16e201938..00000000000 --- a/db/schema_migrations/20200424135319 +++ /dev/null @@ -1 +0,0 @@ -d8adbb1b062a124704891926d0c7088b50a9c1fa12cb0145bd19fcf5a3fb4d05
\ No newline at end of file diff --git a/db/schema_migrations/20200427064130 b/db/schema_migrations/20200427064130 deleted file mode 100644 index 57595ecc200..00000000000 --- a/db/schema_migrations/20200427064130 +++ /dev/null @@ -1 +0,0 @@ -aaec2551c3b6eb7f8ec345516c681ba4bc33eed9171093ab98799db20efe0e94
\ No newline at end of file diff --git a/db/schema_migrations/20200428134356 b/db/schema_migrations/20200428134356 deleted file mode 100644 index 59b06c7e7db..00000000000 --- a/db/schema_migrations/20200428134356 +++ /dev/null @@ -1 +0,0 @@ -6994c8b015d85acc19a440f7d2c6191e927c411eec9e9c1083356a4c598a28f8
\ No newline at end of file diff --git a/db/schema_migrations/20200429001827 b/db/schema_migrations/20200429001827 deleted file mode 100644 index f74267fee7f..00000000000 --- a/db/schema_migrations/20200429001827 +++ /dev/null @@ -1 +0,0 @@ -81f35115909806c412ed96487a7692e61df6e6c519d2ad3f95a6089cc48cedab
\ No newline at end of file diff --git a/db/schema_migrations/20200429002150 b/db/schema_migrations/20200429002150 deleted file mode 100644 index f6d9998ea64..00000000000 --- a/db/schema_migrations/20200429002150 +++ /dev/null @@ -1 +0,0 @@ -0af3d8e0cc9efb4657e6ef93a213ba7edf3e383caf47ddd0809653cfb7418e55
\ No newline at end of file diff --git a/db/schema_migrations/20200429015603 b/db/schema_migrations/20200429015603 deleted file mode 100644 index b6788efb6f7..00000000000 --- a/db/schema_migrations/20200429015603 +++ /dev/null @@ -1 +0,0 @@ -ee8afc82ef3af2ec030696560fe195fc2056dddf80ec0cd908b454bd2378f2ae
\ No newline at end of file diff --git a/db/schema_migrations/20200429023324 b/db/schema_migrations/20200429023324 deleted file mode 100644 index 3758f11d8b1..00000000000 --- a/db/schema_migrations/20200429023324 +++ /dev/null @@ -1 +0,0 @@ -809558d31a390cf0d3a9653c9acb167150311819845a81c57164f74e26545340
\ No newline at end of file diff --git a/db/schema_migrations/20200429181335 b/db/schema_migrations/20200429181335 deleted file mode 100644 index e29e1758f54..00000000000 --- a/db/schema_migrations/20200429181335 +++ /dev/null @@ -1 +0,0 @@ -292ba62e0296154a31a2a497bb26b67b83d08d236306939762e48e8f67c6b423
\ No newline at end of file diff --git a/db/schema_migrations/20200429181955 b/db/schema_migrations/20200429181955 deleted file mode 100644 index dd94ec15a01..00000000000 --- a/db/schema_migrations/20200429181955 +++ /dev/null @@ -1 +0,0 @@ -73a342805f9857917e059e95793aff5da3049f1e943a883a7546985a6293d9d7
\ No newline at end of file diff --git a/db/schema_migrations/20200429182245 b/db/schema_migrations/20200429182245 deleted file mode 100644 index d88951fc011..00000000000 --- a/db/schema_migrations/20200429182245 +++ /dev/null @@ -1 +0,0 @@ -3dd9cc90ac048f208d8a966c72e532c74dca9c60801b29f3fb77e37816f91f16
\ No newline at end of file diff --git a/db/schema_migrations/20200430103158 b/db/schema_migrations/20200430103158 deleted file mode 100644 index 343599a6052..00000000000 --- a/db/schema_migrations/20200430103158 +++ /dev/null @@ -1 +0,0 @@ -c4957bc449caee04886713439666755d826120c9d8e5f335ac6eae0b860aa9ba
\ No newline at end of file diff --git a/db/schema_migrations/20200430123614 b/db/schema_migrations/20200430123614 deleted file mode 100644 index 7ea1a7676c4..00000000000 --- a/db/schema_migrations/20200430123614 +++ /dev/null @@ -1 +0,0 @@ -31dd2da9456eeec204e2008e78558aadf5d3172f66b3c640c87a0fb64e807080
\ No newline at end of file diff --git a/db/schema_migrations/20200430130048 b/db/schema_migrations/20200430130048 deleted file mode 100644 index e0adbfdc131..00000000000 --- a/db/schema_migrations/20200430130048 +++ /dev/null @@ -1 +0,0 @@ -4c6304f22783d1c7c142716f984d21b800d2e0c90896302c4861a1641732a805
\ No newline at end of file diff --git a/db/schema_migrations/20200430174637 b/db/schema_migrations/20200430174637 deleted file mode 100644 index b0790a1bce5..00000000000 --- a/db/schema_migrations/20200430174637 +++ /dev/null @@ -1 +0,0 @@ -e37a4bf461179c99adab8280d840439534d59ba317a12e1831390cd5f3ae7ef4
\ No newline at end of file diff --git a/db/schema_migrations/20200504191813 b/db/schema_migrations/20200504191813 deleted file mode 100644 index 0f377a32906..00000000000 --- a/db/schema_migrations/20200504191813 +++ /dev/null @@ -1 +0,0 @@ -b389d021c04ce2e3b8c35a2a829f0ab8c58ee8b2ab972ae1f7a8abb16a09670f
\ No newline at end of file diff --git a/db/schema_migrations/20200504200709 b/db/schema_migrations/20200504200709 deleted file mode 100644 index 780f3013fa7..00000000000 --- a/db/schema_migrations/20200504200709 +++ /dev/null @@ -1 +0,0 @@ -976e0c4614b6986f654fca6158c6ed2edf5c4e1031192e4f073fa77179d07eda
\ No newline at end of file diff --git a/db/schema_migrations/20200505164958 b/db/schema_migrations/20200505164958 deleted file mode 100644 index 23a952990cb..00000000000 --- a/db/schema_migrations/20200505164958 +++ /dev/null @@ -1 +0,0 @@ -b06f7fc8653259060ea2c227130ca3c87bdeba15cf721f21cf524e1658a61272
\ No newline at end of file diff --git a/db/schema_migrations/20200505171834 b/db/schema_migrations/20200505171834 deleted file mode 100644 index f8b0dd22cd5..00000000000 --- a/db/schema_migrations/20200505171834 +++ /dev/null @@ -1 +0,0 @@ -bc44ba4cb70c950ca3e8c3c63b73e431c266284dddc7bc8adb909570dfea0048
\ No newline at end of file diff --git a/db/schema_migrations/20200505172405 b/db/schema_migrations/20200505172405 deleted file mode 100644 index 3c993eff67d..00000000000 --- a/db/schema_migrations/20200505172405 +++ /dev/null @@ -1 +0,0 @@ -52c3872d632d45bfbcfe4be8a4e4579d135c4291c780950350d6650c54fd1708
\ No newline at end of file diff --git a/db/schema_migrations/20200506085748 b/db/schema_migrations/20200506085748 deleted file mode 100644 index 9759b03a822..00000000000 --- a/db/schema_migrations/20200506085748 +++ /dev/null @@ -1 +0,0 @@ -a1861b578967fdefdb15f3be93891c721e96692896f06c2d6198d4431c45cd13
\ No newline at end of file diff --git a/db/schema_migrations/20200506125731 b/db/schema_migrations/20200506125731 deleted file mode 100644 index 6064f0a487d..00000000000 --- a/db/schema_migrations/20200506125731 +++ /dev/null @@ -1 +0,0 @@ -d4cda8bcb5bccc1ebad9e6eaa6a4eeb5d0aca382d334fc103d23fe77556c4930
\ No newline at end of file diff --git a/db/schema_migrations/20200506154421 b/db/schema_migrations/20200506154421 deleted file mode 100644 index 5875086b0e5..00000000000 --- a/db/schema_migrations/20200506154421 +++ /dev/null @@ -1 +0,0 @@ -02205bcf95962023ca04392d7997f8546725c759660e641086812a2e98473224
\ No newline at end of file diff --git a/db/schema_migrations/20200507221434 b/db/schema_migrations/20200507221434 deleted file mode 100644 index 3089e877e4c..00000000000 --- a/db/schema_migrations/20200507221434 +++ /dev/null @@ -1 +0,0 @@ -fac210ae2e6a0d1ddcf3226271e61e5dfa308c23b349bf1641e3c09d9da2af37
\ No newline at end of file diff --git a/db/schema_migrations/20200508021128 b/db/schema_migrations/20200508021128 deleted file mode 100644 index 3d8681a1849..00000000000 --- a/db/schema_migrations/20200508021128 +++ /dev/null @@ -1 +0,0 @@ -f28fc16e9369913c2af69c613d5ceeb3fa210dea9314f50856875413e983bd4b
\ No newline at end of file diff --git a/db/schema_migrations/20200508050301 b/db/schema_migrations/20200508050301 deleted file mode 100644 index 880e30b0ed6..00000000000 --- a/db/schema_migrations/20200508050301 +++ /dev/null @@ -1 +0,0 @@ -f4c503dacfe784392b0b75759d0927bdda501a01a9edac3b41a2f78ec12b5936
\ No newline at end of file diff --git a/db/schema_migrations/20200508091106 b/db/schema_migrations/20200508091106 deleted file mode 100644 index d22f8d82bfc..00000000000 --- a/db/schema_migrations/20200508091106 +++ /dev/null @@ -1 +0,0 @@ -7359db223f77da3309198c2cc50f52ff942427a622e42956c987a758d5c2093b
\ No newline at end of file diff --git a/db/schema_migrations/20200508140959 b/db/schema_migrations/20200508140959 deleted file mode 100644 index d5ecd77abd5..00000000000 --- a/db/schema_migrations/20200508140959 +++ /dev/null @@ -1 +0,0 @@ -7696b248052522c8dd99ba8782c906a638bbdab894b455377f19d5fa3e6f7fd4
\ No newline at end of file diff --git a/db/schema_migrations/20200508203901 b/db/schema_migrations/20200508203901 deleted file mode 100644 index 08f72372d02..00000000000 --- a/db/schema_migrations/20200508203901 +++ /dev/null @@ -1 +0,0 @@ -849af945cca0656467a85b2037fd23d38fceba3588fbd053073a04ae20a3ed1f
\ No newline at end of file diff --git a/db/schema_migrations/20200509203901 b/db/schema_migrations/20200509203901 deleted file mode 100644 index f05f0f8ac7e..00000000000 --- a/db/schema_migrations/20200509203901 +++ /dev/null @@ -1 +0,0 @@ -fb9054b82d996d4e005efa9c05d1544f6d433389e46b715897a3eb5dc84493b5
\ No newline at end of file diff --git a/db/schema_migrations/20200510181937 b/db/schema_migrations/20200510181937 deleted file mode 100644 index 38d6b6c42a3..00000000000 --- a/db/schema_migrations/20200510181937 +++ /dev/null @@ -1 +0,0 @@ -31f8b5061bcea304f623cfcf4803bbbd97219acaf82d587a03b2f420253285b1
\ No newline at end of file diff --git a/db/schema_migrations/20200510182218 b/db/schema_migrations/20200510182218 deleted file mode 100644 index c944628b8ff..00000000000 --- a/db/schema_migrations/20200510182218 +++ /dev/null @@ -1 +0,0 @@ -25290ca5a685ca8648a626adb62e45b42ea45d91163c4af13761c98804a83af6
\ No newline at end of file diff --git a/db/schema_migrations/20200510182556 b/db/schema_migrations/20200510182556 deleted file mode 100644 index 0a58bb57500..00000000000 --- a/db/schema_migrations/20200510182556 +++ /dev/null @@ -1 +0,0 @@ -c23711f8795738bcd41323bfc83512c97fd71ad016c95432b28388c877db55d5
\ No newline at end of file diff --git a/db/schema_migrations/20200510182824 b/db/schema_migrations/20200510182824 deleted file mode 100644 index 071f2448f77..00000000000 --- a/db/schema_migrations/20200510182824 +++ /dev/null @@ -1 +0,0 @@ -55cd25621eac293c9616e7f2b211cfd8ed7183721bc6601754b3b8aea8557543
\ No newline at end of file diff --git a/db/schema_migrations/20200510183128 b/db/schema_migrations/20200510183128 deleted file mode 100644 index bee6fba9f18..00000000000 --- a/db/schema_migrations/20200510183128 +++ /dev/null @@ -1 +0,0 @@ -59c8b5178a495e8f2f128c50e9adaef1ab53ace9f6a053fc0cacb04672837e05
\ No newline at end of file diff --git a/db/schema_migrations/20200511080113 b/db/schema_migrations/20200511080113 deleted file mode 100644 index 6f7e5c3d900..00000000000 --- a/db/schema_migrations/20200511080113 +++ /dev/null @@ -1 +0,0 @@ -7edf72fd93034612ae93ea1999e84bbe8bfa96c7e3844614cb4985a559e40810
\ No newline at end of file diff --git a/db/schema_migrations/20200511083541 b/db/schema_migrations/20200511083541 deleted file mode 100644 index 3bcca26361e..00000000000 --- a/db/schema_migrations/20200511083541 +++ /dev/null @@ -1 +0,0 @@ -ccede137ca157c5195d83e8c1af4e29c1f7370b19f7caa4069d334ba1f7ea3a7
\ No newline at end of file diff --git a/db/schema_migrations/20200511092246 b/db/schema_migrations/20200511092246 deleted file mode 100644 index 83636dbd3e3..00000000000 --- a/db/schema_migrations/20200511092246 +++ /dev/null @@ -1 +0,0 @@ -0827d802fb94f625878da1ee1bed367b6f4fea795d3effe15000d833c67a5a7f
\ No newline at end of file diff --git a/db/schema_migrations/20200511092505 b/db/schema_migrations/20200511092505 deleted file mode 100644 index 67c2d966ead..00000000000 --- a/db/schema_migrations/20200511092505 +++ /dev/null @@ -1 +0,0 @@ -524cc3c6a25e12dd1fab7c16f13a0f3f28b7cfdb5d0c3669349ec12e61b54a98
\ No newline at end of file diff --git a/db/schema_migrations/20200511092714 b/db/schema_migrations/20200511092714 deleted file mode 100644 index 253a9d827ea..00000000000 --- a/db/schema_migrations/20200511092714 +++ /dev/null @@ -1 +0,0 @@ -8e3395ab9aaef740940cc9067860291410b5ce364769e95b0d04b676e14ef00b
\ No newline at end of file diff --git a/db/schema_migrations/20200511115430 b/db/schema_migrations/20200511115430 deleted file mode 100644 index 98fb6c7b313..00000000000 --- a/db/schema_migrations/20200511115430 +++ /dev/null @@ -1 +0,0 @@ -0013e34270a2bb137fec0223cff7509db04ef686c792b78ca6c67668b8296c61
\ No newline at end of file diff --git a/db/schema_migrations/20200511115431 b/db/schema_migrations/20200511115431 deleted file mode 100644 index 78b3fc574ed..00000000000 --- a/db/schema_migrations/20200511115431 +++ /dev/null @@ -1 +0,0 @@ -f0d0f98fec3649f0b2f2040880d9afff8b10a0943bf289834796c9376ce87932
\ No newline at end of file diff --git a/db/schema_migrations/20200511121549 b/db/schema_migrations/20200511121549 deleted file mode 100644 index ee9546a8a0c..00000000000 --- a/db/schema_migrations/20200511121549 +++ /dev/null @@ -1 +0,0 @@ -5101e6b2791c43fb3636a8f95a66fa01825a7bb9e60ea3f5d89606e45d96e9c3
\ No newline at end of file diff --git a/db/schema_migrations/20200511121610 b/db/schema_migrations/20200511121610 deleted file mode 100644 index ff13ce8c3e9..00000000000 --- a/db/schema_migrations/20200511121610 +++ /dev/null @@ -1 +0,0 @@ -e951ce098f4190af2e34bb7c0d020efca9ecaa4299d593fa7f0b23125ba5ccac
\ No newline at end of file diff --git a/db/schema_migrations/20200511121620 b/db/schema_migrations/20200511121620 deleted file mode 100644 index aeb38bb19b1..00000000000 --- a/db/schema_migrations/20200511121620 +++ /dev/null @@ -1 +0,0 @@ -13c7cfc19eba0b69d54eb3ac0b22eae489fb84c8472e3693f84b66b0c64b20b4
\ No newline at end of file diff --git a/db/schema_migrations/20200511130129 b/db/schema_migrations/20200511130129 deleted file mode 100644 index d30619b5d5a..00000000000 --- a/db/schema_migrations/20200511130129 +++ /dev/null @@ -1 +0,0 @@ -02e298e5f70427b5f1c74845dfc7ac93b31865dd2a5f431470fc34a9087a0e10
\ No newline at end of file diff --git a/db/schema_migrations/20200511130130 b/db/schema_migrations/20200511130130 deleted file mode 100644 index d263f6418c5..00000000000 --- a/db/schema_migrations/20200511130130 +++ /dev/null @@ -1 +0,0 @@ -edf2348492fed26ded2183de9a1154af18570804b8ce83a0ca56a8b0a6d8f3a6
\ No newline at end of file diff --git a/db/schema_migrations/20200511145545 b/db/schema_migrations/20200511145545 deleted file mode 100644 index be1b94cbf48..00000000000 --- a/db/schema_migrations/20200511145545 +++ /dev/null @@ -1 +0,0 @@ -50a8f2081d4d794a7b04ef4eec25f99863c2197770096d6999e2e5f18331390a
\ No newline at end of file diff --git a/db/schema_migrations/20200511162057 b/db/schema_migrations/20200511162057 deleted file mode 100644 index b58615221d1..00000000000 --- a/db/schema_migrations/20200511162057 +++ /dev/null @@ -1 +0,0 @@ -ad166c70d93630ae54fa26b926dade885e7b530f3c8af6a2516d54e05cb38383
\ No newline at end of file diff --git a/db/schema_migrations/20200511162115 b/db/schema_migrations/20200511162115 deleted file mode 100644 index 011592e64c8..00000000000 --- a/db/schema_migrations/20200511162115 +++ /dev/null @@ -1 +0,0 @@ -b1a26c6b9924656a61637f221f1e81c0f1d6d782a2e558012f0caf436c92943f
\ No newline at end of file diff --git a/db/schema_migrations/20200511181027 b/db/schema_migrations/20200511181027 deleted file mode 100644 index a918c934d69..00000000000 --- a/db/schema_migrations/20200511181027 +++ /dev/null @@ -1 +0,0 @@ -d3d5f1ac4411803a04ba7c32a254d1ff6112a3817c91769c2423892b870cc7f8
\ No newline at end of file diff --git a/db/schema_migrations/20200511191027 b/db/schema_migrations/20200511191027 deleted file mode 100644 index bc2e5e2ae62..00000000000 --- a/db/schema_migrations/20200511191027 +++ /dev/null @@ -1 +0,0 @@ -46a25f167afe98184717084ce2b893b55cd2849f38aee970bf39728602732588
\ No newline at end of file diff --git a/db/schema_migrations/20200511208012 b/db/schema_migrations/20200511208012 deleted file mode 100644 index 5eb7c0085b8..00000000000 --- a/db/schema_migrations/20200511208012 +++ /dev/null @@ -1 +0,0 @@ -0dfe02daa86fc37f067522b6af626cc2150010fc65e83d9430d29ee492f37b6f
\ No newline at end of file diff --git a/db/schema_migrations/20200511220023 b/db/schema_migrations/20200511220023 deleted file mode 100644 index f2316c579bc..00000000000 --- a/db/schema_migrations/20200511220023 +++ /dev/null @@ -1 +0,0 @@ -b9fb78494d9aa1da1a90e0d4a308b574c21d627d30f4b4bfe358cd7bd8f1bbc1
\ No newline at end of file diff --git a/db/schema_migrations/20200512085150 b/db/schema_migrations/20200512085150 deleted file mode 100644 index 735a2896f43..00000000000 --- a/db/schema_migrations/20200512085150 +++ /dev/null @@ -1 +0,0 @@ -c8c83c508e1d54dfd540ca034ef6f3d67184fc513fb4ebab957597e0cd0293b2
\ No newline at end of file diff --git a/db/schema_migrations/20200512160004 b/db/schema_migrations/20200512160004 deleted file mode 100644 index 16d459a6251..00000000000 --- a/db/schema_migrations/20200512160004 +++ /dev/null @@ -1 +0,0 @@ -959399fcc81b0fd1d0df938ae8fc2eb24f5fbde88fbeb920292ada6452352e42
\ No newline at end of file diff --git a/db/schema_migrations/20200512164334 b/db/schema_migrations/20200512164334 deleted file mode 100644 index 42ed77e7b36..00000000000 --- a/db/schema_migrations/20200512164334 +++ /dev/null @@ -1 +0,0 @@ -c279d7992fc823dc59b62cc14c248db4aab93b603eefc157188f28a13c40508f
\ No newline at end of file diff --git a/db/schema_migrations/20200512195442 b/db/schema_migrations/20200512195442 deleted file mode 100644 index b5ecc583875..00000000000 --- a/db/schema_migrations/20200512195442 +++ /dev/null @@ -1 +0,0 @@ -214b8a8898c418a1350e23cae443f9649f5a7e0d91ca2494ae8d8dac7f81b37b
\ No newline at end of file diff --git a/db/schema_migrations/20200513160930 b/db/schema_migrations/20200513160930 deleted file mode 100644 index 63cb8caf666..00000000000 --- a/db/schema_migrations/20200513160930 +++ /dev/null @@ -1 +0,0 @@ -07e36e155a94cf8e71b92e77353509c9d3af781a6f973e0db2848780851ff24e
\ No newline at end of file diff --git a/db/schema_migrations/20200513171959 b/db/schema_migrations/20200513171959 deleted file mode 100644 index f10207a05f6..00000000000 --- a/db/schema_migrations/20200513171959 +++ /dev/null @@ -1 +0,0 @@ -3fe17fba97304f7143dfdb0c315f87e549e7769723f19fa36288381d1fa9e2d8
\ No newline at end of file diff --git a/db/schema_migrations/20200513224143 b/db/schema_migrations/20200513224143 deleted file mode 100644 index 06d601a4796..00000000000 --- a/db/schema_migrations/20200513224143 +++ /dev/null @@ -1 +0,0 @@ -125ef36cc08c11062c00dc586b877bc0b9bda33c1be34ba15fad7ee87dbd0b55
\ No newline at end of file diff --git a/db/schema_migrations/20200513234502 b/db/schema_migrations/20200513234502 deleted file mode 100644 index 0a40f501312..00000000000 --- a/db/schema_migrations/20200513234502 +++ /dev/null @@ -1 +0,0 @@ -3cf8ea6787682d82c930779d2fb2068710cd429ae1f57b201c73784b216cb3e5
\ No newline at end of file diff --git a/db/schema_migrations/20200513235347 b/db/schema_migrations/20200513235347 deleted file mode 100644 index b7b40661167..00000000000 --- a/db/schema_migrations/20200513235347 +++ /dev/null @@ -1 +0,0 @@ -5fedf359a4f5bf15dbbadb13736bc96c46691f2c952a8cb6459f11c1ecb96400
\ No newline at end of file diff --git a/db/schema_migrations/20200513235532 b/db/schema_migrations/20200513235532 deleted file mode 100644 index 2bab5e16dfb..00000000000 --- a/db/schema_migrations/20200513235532 +++ /dev/null @@ -1 +0,0 @@ -877eda087e028dfb9bc838497bf6874d1b23b61353c335cb73bbd94f38889610
\ No newline at end of file diff --git a/db/schema_migrations/20200514000009 b/db/schema_migrations/20200514000009 deleted file mode 100644 index 1a588cf3812..00000000000 --- a/db/schema_migrations/20200514000009 +++ /dev/null @@ -1 +0,0 @@ -b9c29ad4b36dbea2e6b2406f56fec2c408845a24b9382bcc32d823fea7a3fbd1
\ No newline at end of file diff --git a/db/schema_migrations/20200514000132 b/db/schema_migrations/20200514000132 deleted file mode 100644 index a87eb8c4b7a..00000000000 --- a/db/schema_migrations/20200514000132 +++ /dev/null @@ -1 +0,0 @@ -e441ff2691a70304cda5489ac3e308116e4eaa59ba1dafd6f14f0323f595e982
\ No newline at end of file diff --git a/db/schema_migrations/20200514000340 b/db/schema_migrations/20200514000340 deleted file mode 100644 index 465e1b97446..00000000000 --- a/db/schema_migrations/20200514000340 +++ /dev/null @@ -1 +0,0 @@ -b67655bffd1e52005c4f4b997eee17c39b948b9c642a3e3a202d237d7419aaa0
\ No newline at end of file diff --git a/db/schema_migrations/20200515152649 b/db/schema_migrations/20200515152649 deleted file mode 100644 index 3986afff437..00000000000 --- a/db/schema_migrations/20200515152649 +++ /dev/null @@ -1 +0,0 @@ -34f0dc965b7f5c9b76a8b0bd7ca3721777c1f3e881c2f2b02806c7a74442343d
\ No newline at end of file diff --git a/db/schema_migrations/20200515153633 b/db/schema_migrations/20200515153633 deleted file mode 100644 index c65ea828aed..00000000000 --- a/db/schema_migrations/20200515153633 +++ /dev/null @@ -1 +0,0 @@ -dd7fa34ca73822643533b3eb1ee8cf61503cd94ca180602b2263989f2326d7a2
\ No newline at end of file diff --git a/db/schema_migrations/20200515155620 b/db/schema_migrations/20200515155620 deleted file mode 100644 index 480848a7f29..00000000000 --- a/db/schema_migrations/20200515155620 +++ /dev/null @@ -1 +0,0 @@ -8fafc0f070f0a40c3ed9d2a25f3874fb5c525f3bcd77382be1947697157c4c2d
\ No newline at end of file diff --git a/db/schema_migrations/20200518091745 b/db/schema_migrations/20200518091745 deleted file mode 100644 index dd2d8c0a465..00000000000 --- a/db/schema_migrations/20200518091745 +++ /dev/null @@ -1 +0,0 @@ -222bf026288f2704df4ce9c6a72615d13dae11fbf8eb50ec6ce9732dcfc6491b
\ No newline at end of file diff --git a/db/schema_migrations/20200518114540 b/db/schema_migrations/20200518114540 deleted file mode 100644 index 34329daf048..00000000000 --- a/db/schema_migrations/20200518114540 +++ /dev/null @@ -1 +0,0 @@ -6b7996a6eda2e1b6be4c74825d0401ab88f25677caf016c7ee906c17a5f8f99a
\ No newline at end of file diff --git a/db/schema_migrations/20200518133123 b/db/schema_migrations/20200518133123 deleted file mode 100644 index 736654e9a9f..00000000000 --- a/db/schema_migrations/20200518133123 +++ /dev/null @@ -1 +0,0 @@ -d713fc941751c192cfd6e5f9dcba7f562ccaf6ac850dac24ea2c51332a916c51
\ No newline at end of file diff --git a/db/schema_migrations/20200519074709 b/db/schema_migrations/20200519074709 deleted file mode 100644 index 7e5385aec19..00000000000 --- a/db/schema_migrations/20200519074709 +++ /dev/null @@ -1 +0,0 @@ -bc620d9056a0f615bcb3218d7a5abedbbdf380c9ee964fd50cea867fcbb138db
\ No newline at end of file diff --git a/db/schema_migrations/20200519101002 b/db/schema_migrations/20200519101002 deleted file mode 100644 index 205f5bc3747..00000000000 --- a/db/schema_migrations/20200519101002 +++ /dev/null @@ -1 +0,0 @@ -746ec3b5e8beb0c87189c04e96974df3ce752e707981ef8564ed4a282d01f8e6
\ No newline at end of file diff --git a/db/schema_migrations/20200519115908 b/db/schema_migrations/20200519115908 deleted file mode 100644 index cc084e06980..00000000000 --- a/db/schema_migrations/20200519115908 +++ /dev/null @@ -1 +0,0 @@ -d2a660493f10af362663e5f6c843e4428c704ac842caeab80eacdf42f1d6a7e7
\ No newline at end of file diff --git a/db/schema_migrations/20200519141534 b/db/schema_migrations/20200519141534 deleted file mode 100644 index c0a53a0e786..00000000000 --- a/db/schema_migrations/20200519141534 +++ /dev/null @@ -1 +0,0 @@ -85d7059d7fb2703bb9474734d4b41508de8b0e3c630725b74163d268427b4760
\ No newline at end of file diff --git a/db/schema_migrations/20200519171058 b/db/schema_migrations/20200519171058 deleted file mode 100644 index 1ac4d231079..00000000000 --- a/db/schema_migrations/20200519171058 +++ /dev/null @@ -1 +0,0 @@ -ad14128704da92a4de51936af6444608331a4d4e960cdf894f3f0301b038fd4f
\ No newline at end of file diff --git a/db/schema_migrations/20200519194042 b/db/schema_migrations/20200519194042 deleted file mode 100644 index 737ec0d46cb..00000000000 --- a/db/schema_migrations/20200519194042 +++ /dev/null @@ -1 +0,0 @@ -b232109c29d831b8cda9f4bacc2ab4cf4ff290cb6a27d8034c47aacd05b0e522
\ No newline at end of file diff --git a/db/schema_migrations/20200519201128 b/db/schema_migrations/20200519201128 deleted file mode 100644 index b83727bfef9..00000000000 --- a/db/schema_migrations/20200519201128 +++ /dev/null @@ -1 +0,0 @@ -94624ba1a2553ed94101de6c40b59ed74c559ae49703b96df72026f9c86ec85c
\ No newline at end of file diff --git a/db/schema_migrations/20200520103514 b/db/schema_migrations/20200520103514 deleted file mode 100644 index 77c8ae6c1d9..00000000000 --- a/db/schema_migrations/20200520103514 +++ /dev/null @@ -1 +0,0 @@ -1b651eb548366c8c68424061b87e48e5b80e6794d9f911828c09057597dc800e
\ No newline at end of file diff --git a/db/schema_migrations/20200521022725 b/db/schema_migrations/20200521022725 deleted file mode 100644 index 52072620703..00000000000 --- a/db/schema_migrations/20200521022725 +++ /dev/null @@ -1 +0,0 @@ -703dd07e6aca38d21c9a3bb84d21efd47758c7c4dc7aae6377b490ce5ba4da33
\ No newline at end of file diff --git a/db/schema_migrations/20200521225327 b/db/schema_migrations/20200521225327 deleted file mode 100644 index 4d6876aee75..00000000000 --- a/db/schema_migrations/20200521225327 +++ /dev/null @@ -1 +0,0 @@ -b0ddb00ddba5940228c4eabc0ed84ae298cd28e2076ef0317786278dcd4dbf76
\ No newline at end of file diff --git a/db/schema_migrations/20200521225337 b/db/schema_migrations/20200521225337 deleted file mode 100644 index e022ae88110..00000000000 --- a/db/schema_migrations/20200521225337 +++ /dev/null @@ -1 +0,0 @@ -e0a36200d9022157bf7cc29fa6142f6e25633ae5c8be0a664818ae5fc1c157f5
\ No newline at end of file diff --git a/db/schema_migrations/20200521225346 b/db/schema_migrations/20200521225346 deleted file mode 100644 index 05dac61d4a7..00000000000 --- a/db/schema_migrations/20200521225346 +++ /dev/null @@ -1 +0,0 @@ -6d17c3f483309605718f93ee0935200812b2bb148499458d0fc6842647febbc4
\ No newline at end of file diff --git a/db/schema_migrations/20200522205606 b/db/schema_migrations/20200522205606 deleted file mode 100644 index dbf798737fa..00000000000 --- a/db/schema_migrations/20200522205606 +++ /dev/null @@ -1 +0,0 @@ -4bb6c890509ef458734947f872bd0245fb39b479da890a7ee488ab9a8094331e
\ No newline at end of file diff --git a/db/schema_migrations/20200522235146 b/db/schema_migrations/20200522235146 deleted file mode 100644 index 3c3ca57887f..00000000000 --- a/db/schema_migrations/20200522235146 +++ /dev/null @@ -1 +0,0 @@ -e7c2215d624d7d4a8efa58f2653f5806316de0c5b74e4a621c590044bdff1484
\ No newline at end of file diff --git a/db/schema_migrations/20200524104346 b/db/schema_migrations/20200524104346 deleted file mode 100644 index b1d6cbad020..00000000000 --- a/db/schema_migrations/20200524104346 +++ /dev/null @@ -1 +0,0 @@ -c1b2c436c64ef8e9c4ce0d0087a5a5047c2318a09fa82c33c6d3080eb5b55bc2
\ No newline at end of file diff --git a/db/schema_migrations/20200525114553 b/db/schema_migrations/20200525114553 deleted file mode 100644 index 35f22221f56..00000000000 --- a/db/schema_migrations/20200525114553 +++ /dev/null @@ -1 +0,0 @@ -788576927e66b178a41adda08faa729ab64a9624900dde8bfe219fb40f1bb3e7
\ No newline at end of file diff --git a/db/schema_migrations/20200525121014 b/db/schema_migrations/20200525121014 deleted file mode 100644 index f11c80717c0..00000000000 --- a/db/schema_migrations/20200525121014 +++ /dev/null @@ -1 +0,0 @@ -0ac42fbe9e91c3bcb4ac040aff6249f3911542fdb8e6274289066b23dfcdb957
\ No newline at end of file diff --git a/db/schema_migrations/20200525144525 b/db/schema_migrations/20200525144525 deleted file mode 100644 index 902d62d58cc..00000000000 --- a/db/schema_migrations/20200525144525 +++ /dev/null @@ -1 +0,0 @@ -49e2c7f0adb160687823b627607b56a813cb58ed0c529778e2100c5543e5f854
\ No newline at end of file diff --git a/db/schema_migrations/20200526000407 b/db/schema_migrations/20200526000407 deleted file mode 100644 index 91573e5ba58..00000000000 --- a/db/schema_migrations/20200526000407 +++ /dev/null @@ -1 +0,0 @@ -ed629ce7654a585ff6ad7d6f65a7beb4207a95b21084b37d5238b728b418f2e6
\ No newline at end of file diff --git a/db/schema_migrations/20200526013844 b/db/schema_migrations/20200526013844 deleted file mode 100644 index b181bb520bf..00000000000 --- a/db/schema_migrations/20200526013844 +++ /dev/null @@ -1 +0,0 @@ -962008c38cec92aaad64739883a549ba487aa8d00c5d3be5f755b3d8139341d8
\ No newline at end of file diff --git a/db/schema_migrations/20200526115436 b/db/schema_migrations/20200526115436 deleted file mode 100644 index 5f071ffc5d1..00000000000 --- a/db/schema_migrations/20200526115436 +++ /dev/null @@ -1 +0,0 @@ -ff746ede0d78ccc44e5d1bfecae298a5fb0018f37dfaf779687eda5c98987f5f
\ No newline at end of file diff --git a/db/schema_migrations/20200526120714 b/db/schema_migrations/20200526120714 deleted file mode 100644 index 683893f2834..00000000000 --- a/db/schema_migrations/20200526120714 +++ /dev/null @@ -1 +0,0 @@ -b566f3dfd1fdb6b081e2a030027ad19910b2688bf68cefee246f3df41bda65d4
\ No newline at end of file diff --git a/db/schema_migrations/20200526142550 b/db/schema_migrations/20200526142550 deleted file mode 100644 index 8986bc2c8bd..00000000000 --- a/db/schema_migrations/20200526142550 +++ /dev/null @@ -1 +0,0 @@ -6df8ec2ce7c80b41cfccc324d2044ce67c5d60f2dfaf8c1aeede02ce0dc0ac4c
\ No newline at end of file diff --git a/db/schema_migrations/20200526153844 b/db/schema_migrations/20200526153844 deleted file mode 100644 index 543a5a1bfdf..00000000000 --- a/db/schema_migrations/20200526153844 +++ /dev/null @@ -1 +0,0 @@ -17e38e020ccbcef20287930c0c60d4f265f273a99c8ad08f35a28cab295cc530
\ No newline at end of file diff --git a/db/schema_migrations/20200526164946 b/db/schema_migrations/20200526164946 deleted file mode 100644 index 352e78d30ac..00000000000 --- a/db/schema_migrations/20200526164946 +++ /dev/null @@ -1 +0,0 @@ -8e022fbe30ad181816a79a57a2432e6cf763e539a970860195a417d782c880f9
\ No newline at end of file diff --git a/db/schema_migrations/20200526164947 b/db/schema_migrations/20200526164947 deleted file mode 100644 index a65ffd79b07..00000000000 --- a/db/schema_migrations/20200526164947 +++ /dev/null @@ -1 +0,0 @@ -e5a4897450454f070950e55907232d3b986dcaac0142dcb23a66db40dac817ba
\ No newline at end of file diff --git a/db/schema_migrations/20200526193555 b/db/schema_migrations/20200526193555 deleted file mode 100644 index 18df757dd50..00000000000 --- a/db/schema_migrations/20200526193555 +++ /dev/null @@ -1 +0,0 @@ -e50f2bfb991b4ceddf8a580608208402692ad25fcc33b71e5fa82960189882c0
\ No newline at end of file diff --git a/db/schema_migrations/20200526231421 b/db/schema_migrations/20200526231421 deleted file mode 100644 index b70feb4a080..00000000000 --- a/db/schema_migrations/20200526231421 +++ /dev/null @@ -1 +0,0 @@ -1b0d5c7b955f25f1f9e86e0315118cd3b9224c329e1b7eae5682292d03878793
\ No newline at end of file diff --git a/db/schema_migrations/20200527092027 b/db/schema_migrations/20200527092027 deleted file mode 100644 index c4db74d55d4..00000000000 --- a/db/schema_migrations/20200527092027 +++ /dev/null @@ -1 +0,0 @@ -773f9f6f2b0bd6704485298a80f68b1d68ed28f5178b93bfebc97d2d0c09eb91
\ No newline at end of file diff --git a/db/schema_migrations/20200527094322 b/db/schema_migrations/20200527094322 deleted file mode 100644 index 86e0b13775a..00000000000 --- a/db/schema_migrations/20200527094322 +++ /dev/null @@ -1 +0,0 @@ -9efce01d2a677ad03e3aa80d3670a4d8bbab413f61ee89da860d2f92734d0298
\ No newline at end of file diff --git a/db/schema_migrations/20200527095401 b/db/schema_migrations/20200527095401 deleted file mode 100644 index c9956f361d8..00000000000 --- a/db/schema_migrations/20200527095401 +++ /dev/null @@ -1 +0,0 @@ -a4ee1c8233f9445b1635ba89d71820cbdd515a4b1512ab40ab58c43cba44217b
\ No newline at end of file diff --git a/db/schema_migrations/20200527135313 b/db/schema_migrations/20200527135313 deleted file mode 100644 index ff955b0b183..00000000000 --- a/db/schema_migrations/20200527135313 +++ /dev/null @@ -1 +0,0 @@ -1829a85be1a8bfca9526bbc2eaec4b2f5482c41c9d665bb70846a2d97ab8a351
\ No newline at end of file diff --git a/db/schema_migrations/20200527151413 b/db/schema_migrations/20200527151413 deleted file mode 100644 index 3cd1fd7fefe..00000000000 --- a/db/schema_migrations/20200527151413 +++ /dev/null @@ -1 +0,0 @@ -7690399e7eb02b4aa906848d6bd5e6992d31df73ab78e8a3654102b11fc05409
\ No newline at end of file diff --git a/db/schema_migrations/20200527152116 b/db/schema_migrations/20200527152116 deleted file mode 100644 index d701d29cf19..00000000000 --- a/db/schema_migrations/20200527152116 +++ /dev/null @@ -1 +0,0 @@ -99c0d72b64f7155f845bd6d40dd572ee21106977257a437fda0c7647faa99a10
\ No newline at end of file diff --git a/db/schema_migrations/20200527152657 b/db/schema_migrations/20200527152657 deleted file mode 100644 index b5c79e49e79..00000000000 --- a/db/schema_migrations/20200527152657 +++ /dev/null @@ -1 +0,0 @@ -c87f004bc74eafe293c540c9a192808b53ca8a8fe8bd4e48a2a0603f980c7cf4
\ No newline at end of file diff --git a/db/schema_migrations/20200527170649 b/db/schema_migrations/20200527170649 deleted file mode 100644 index fcbf71c8608..00000000000 --- a/db/schema_migrations/20200527170649 +++ /dev/null @@ -1 +0,0 @@ -7e494700bbbd596b9c865911c8bc1b1f8b62189b7afb2f8166210c09ba051a74
\ No newline at end of file diff --git a/db/schema_migrations/20200527211000 b/db/schema_migrations/20200527211000 deleted file mode 100644 index 7a3c79c9c40..00000000000 --- a/db/schema_migrations/20200527211000 +++ /dev/null @@ -1 +0,0 @@ -d8967bc2dfd52ee1d21ea15e46e88fb6f62325e420d5914cee584e8653ebb538
\ No newline at end of file diff --git a/db/schema_migrations/20200527211605 b/db/schema_migrations/20200527211605 deleted file mode 100644 index 3ffde83b144..00000000000 --- a/db/schema_migrations/20200527211605 +++ /dev/null @@ -1 +0,0 @@ -c99ef19e63223bac3271f2bfe4913ba6a97aaaff043c5eab19b990ddf2f10e9a
\ No newline at end of file diff --git a/db/schema_migrations/20200528054112 b/db/schema_migrations/20200528054112 deleted file mode 100644 index 25177d4d981..00000000000 --- a/db/schema_migrations/20200528054112 +++ /dev/null @@ -1 +0,0 @@ -e3e48bce6e9066d57290fb006bba3491b5844fb15193c319848f5d7d23c85a87
\ No newline at end of file diff --git a/db/schema_migrations/20200528123703 b/db/schema_migrations/20200528123703 deleted file mode 100644 index 29545b35b3d..00000000000 --- a/db/schema_migrations/20200528123703 +++ /dev/null @@ -1 +0,0 @@ -1cdeb5966809dbc01963d7359375d9c11dc4516095c46b35c945f619f8ab1ba5
\ No newline at end of file diff --git a/db/schema_migrations/20200528125905 b/db/schema_migrations/20200528125905 deleted file mode 100644 index ff589220a04..00000000000 --- a/db/schema_migrations/20200528125905 +++ /dev/null @@ -1 +0,0 @@ -1d1990dabc9e6ac59c82e215edcd97dac99db39258b23dfdfa8875f26978538a
\ No newline at end of file diff --git a/db/schema_migrations/20200528171933 b/db/schema_migrations/20200528171933 deleted file mode 100644 index db10e3cd961..00000000000 --- a/db/schema_migrations/20200528171933 +++ /dev/null @@ -1 +0,0 @@ -409ecb990f4e7ad2df3b33e12abe757e55c07de74e5226fc334527a67c76f6fa
\ No newline at end of file diff --git a/db/schema_migrations/20200601120434 b/db/schema_migrations/20200601120434 deleted file mode 100644 index efe42e90fa6..00000000000 --- a/db/schema_migrations/20200601120434 +++ /dev/null @@ -1 +0,0 @@ -dd942c07b653630c6df0c6430061bacc2991829c73ebdd0b8c7ce1ae5102301e
\ No newline at end of file diff --git a/db/schema_migrations/20200601210148 b/db/schema_migrations/20200601210148 deleted file mode 100644 index b7371a1932c..00000000000 --- a/db/schema_migrations/20200601210148 +++ /dev/null @@ -1 +0,0 @@ -53d6c268f74766f7fd18e480918206ba7fdaa5bbcfcfa552d839d82ccf4c5a77
\ No newline at end of file diff --git a/db/schema_migrations/20200602013900 b/db/schema_migrations/20200602013900 deleted file mode 100644 index c174fd8210d..00000000000 --- a/db/schema_migrations/20200602013900 +++ /dev/null @@ -1 +0,0 @@ -3a23025aa0d3cda32aaeaa9fb9ce1fc06fb02ce26333e8c7d7a9ee539ad3903f
\ No newline at end of file diff --git a/db/schema_migrations/20200602013901 b/db/schema_migrations/20200602013901 deleted file mode 100644 index 76b825a1914..00000000000 --- a/db/schema_migrations/20200602013901 +++ /dev/null @@ -1 +0,0 @@ -e6ebaebe88062d9ead773d7e54de6776be032a740f005470391f1449aa78e169
\ No newline at end of file diff --git a/db/schema_migrations/20200602143020 b/db/schema_migrations/20200602143020 deleted file mode 100644 index a14ed488d58..00000000000 --- a/db/schema_migrations/20200602143020 +++ /dev/null @@ -1 +0,0 @@ -4d8fa1902ed7bb0b98ec57a09ec401f9a60a9a67d3341f288c5eef4674590931
\ No newline at end of file diff --git a/db/schema_migrations/20200603073101 b/db/schema_migrations/20200603073101 deleted file mode 100644 index 7f121b151d1..00000000000 --- a/db/schema_migrations/20200603073101 +++ /dev/null @@ -1 +0,0 @@ -aa071d4496df240cd7cadb3bcc3c7a5e3debb1c889918793a505941f0307bdf3
\ No newline at end of file diff --git a/db/schema_migrations/20200603180338 b/db/schema_migrations/20200603180338 deleted file mode 100644 index 71fc063c510..00000000000 --- a/db/schema_migrations/20200603180338 +++ /dev/null @@ -1 +0,0 @@ -f9aebf8a5b5ca29fc087131adc6b5ccfab31b6a6322b1199011bc8211dc12974
\ No newline at end of file diff --git a/db/schema_migrations/20200604001128 b/db/schema_migrations/20200604001128 deleted file mode 100644 index cdd8b00129c..00000000000 --- a/db/schema_migrations/20200604001128 +++ /dev/null @@ -1 +0,0 @@ -151422dcec633fd512162a3b969689195a91199d0858c2128232b6fbc12c75f8
\ No newline at end of file diff --git a/db/schema_migrations/20200604143628 b/db/schema_migrations/20200604143628 deleted file mode 100644 index c68e6a41c1c..00000000000 --- a/db/schema_migrations/20200604143628 +++ /dev/null @@ -1 +0,0 @@ -5abe7187c73ad8127051c41de7c56aee5a55422350712532bba5dc802ddd1775
\ No newline at end of file diff --git a/db/schema_migrations/20200604145731 b/db/schema_migrations/20200604145731 deleted file mode 100644 index 77f4aaf15fc..00000000000 --- a/db/schema_migrations/20200604145731 +++ /dev/null @@ -1 +0,0 @@ -10f132808cd13198e8832c2c45b34fa374b029b138583f9609a2600bf204a37f
\ No newline at end of file diff --git a/db/schema_migrations/20200604174544 b/db/schema_migrations/20200604174544 deleted file mode 100644 index 8ade298b76b..00000000000 --- a/db/schema_migrations/20200604174544 +++ /dev/null @@ -1 +0,0 @@ -38d5bdea037b1e5031577851c1fae3354676c77a869b90b9213b36245401dfab
\ No newline at end of file diff --git a/db/schema_migrations/20200604174558 b/db/schema_migrations/20200604174558 deleted file mode 100644 index 969442ca1eb..00000000000 --- a/db/schema_migrations/20200604174558 +++ /dev/null @@ -1 +0,0 @@ -6879996c3cb53326466d3b967925018facf4c63ad4198a93363f67f8eb614aff
\ No newline at end of file diff --git a/db/schema_migrations/20200605003204 b/db/schema_migrations/20200605003204 deleted file mode 100644 index c2bb57cf458..00000000000 --- a/db/schema_migrations/20200605003204 +++ /dev/null @@ -1 +0,0 @@ -cd7ea73ae9fc168de4f088395d86e2187e6c7184ed531cce767a8414e764a5d8
\ No newline at end of file diff --git a/db/schema_migrations/20200605093113 b/db/schema_migrations/20200605093113 deleted file mode 100644 index c63fed7a87c..00000000000 --- a/db/schema_migrations/20200605093113 +++ /dev/null @@ -1 +0,0 @@ -1dbfc16e8ac9b5ef1d9dda60a7895d084db729bc34b855a2726e62b118e20360
\ No newline at end of file diff --git a/db/schema_migrations/20200605160806 b/db/schema_migrations/20200605160806 deleted file mode 100644 index bf23d38f2fd..00000000000 --- a/db/schema_migrations/20200605160806 +++ /dev/null @@ -1 +0,0 @@ -a35514bb4cde5aab9cbd38f19c9d371a091eae486d4d8e994767244c09952cbb
\ No newline at end of file diff --git a/db/schema_migrations/20200605160836 b/db/schema_migrations/20200605160836 deleted file mode 100644 index e77da6e5319..00000000000 --- a/db/schema_migrations/20200605160836 +++ /dev/null @@ -1 +0,0 @@ -010ff35889dc018c44db523f6f64fd36dd5550292774273d5d57a9c23a96347d
\ No newline at end of file diff --git a/db/schema_migrations/20200605160851 b/db/schema_migrations/20200605160851 deleted file mode 100644 index fc8f26a2a36..00000000000 --- a/db/schema_migrations/20200605160851 +++ /dev/null @@ -1 +0,0 @@ -ade5567a3dbc449ebfa8c615ad312df874e2baf7fac12d1cdec97a7bfb4f8c49
\ No newline at end of file diff --git a/db/schema_migrations/20200607223047 b/db/schema_migrations/20200607223047 deleted file mode 100644 index 807592352e5..00000000000 --- a/db/schema_migrations/20200607223047 +++ /dev/null @@ -1 +0,0 @@ -64e38a5f5a76b549f7e527c34a3e9cf1861ada7e0658408241d1b27fa8d24bb4
\ No newline at end of file diff --git a/db/schema_migrations/20200607235435 b/db/schema_migrations/20200607235435 deleted file mode 100644 index 462e8438173..00000000000 --- a/db/schema_migrations/20200607235435 +++ /dev/null @@ -1 +0,0 @@ -67f29055e5ea13ebddcd420e30c806eaebbfb8c224d02a2c5fbaa51eb004c9dd
\ No newline at end of file diff --git a/db/schema_migrations/20200608072931 b/db/schema_migrations/20200608072931 deleted file mode 100644 index 7ab318d89da..00000000000 --- a/db/schema_migrations/20200608072931 +++ /dev/null @@ -1 +0,0 @@ -9ba0ccfb2ba9a510c04297adab70f1edb47ecb7a65569c944531b5ff82c6e3c1
\ No newline at end of file diff --git a/db/schema_migrations/20200608075553 b/db/schema_migrations/20200608075553 deleted file mode 100644 index 49bf37f6281..00000000000 --- a/db/schema_migrations/20200608075553 +++ /dev/null @@ -1 +0,0 @@ -d71e8e8523a101da234f0ae44ef89baa45f397d021a06cfb6c305031ea5ff83b
\ No newline at end of file diff --git a/db/schema_migrations/20200608195222 b/db/schema_migrations/20200608195222 deleted file mode 100644 index 3604d1972ce..00000000000 --- a/db/schema_migrations/20200608195222 +++ /dev/null @@ -1 +0,0 @@ -a81e2add150add1828be5aa4fb40c1115fe272d59119ae8ac70577614e712034
\ No newline at end of file diff --git a/db/schema_migrations/20200608203426 b/db/schema_migrations/20200608203426 deleted file mode 100644 index bfc9c73f8f2..00000000000 --- a/db/schema_migrations/20200608203426 +++ /dev/null @@ -1 +0,0 @@ -4808c4c52eb27adcffadd3e09a9e4a5e1cfeb594c6b8f5db384f68d439e2f8e1
\ No newline at end of file diff --git a/db/schema_migrations/20200608205813 b/db/schema_migrations/20200608205813 deleted file mode 100644 index af78af53895..00000000000 --- a/db/schema_migrations/20200608205813 +++ /dev/null @@ -1 +0,0 @@ -f92827e2daae85a4b830f290fb095f2ce0cfe7b0e18d64e9ca2f4ee7a65d41c0
\ No newline at end of file diff --git a/db/schema_migrations/20200608212030 b/db/schema_migrations/20200608212030 deleted file mode 100644 index 347b40d53c5..00000000000 --- a/db/schema_migrations/20200608212030 +++ /dev/null @@ -1 +0,0 @@ -be5f4947b22af9cd45e750cb072210ea3b1ac33bfdea41da99d3ddbbff83b34d
\ No newline at end of file diff --git a/db/schema_migrations/20200608212435 b/db/schema_migrations/20200608212435 deleted file mode 100644 index f08c8ba687e..00000000000 --- a/db/schema_migrations/20200608212435 +++ /dev/null @@ -1 +0,0 @@ -3d0b911fe2fa2dc6b3227cc8a27e111c0b1fcecfca9911af8dbc1a62f0bd7926
\ No newline at end of file diff --git a/db/schema_migrations/20200608212549 b/db/schema_migrations/20200608212549 deleted file mode 100644 index d556a6f0a4a..00000000000 --- a/db/schema_migrations/20200608212549 +++ /dev/null @@ -1 +0,0 @@ -9b7a595ef64a605598b0591be106f2535199bdd72ab78c9f21454831aef4a2f7
\ No newline at end of file diff --git a/db/schema_migrations/20200608212652 b/db/schema_migrations/20200608212652 deleted file mode 100644 index 3056ec757c8..00000000000 --- a/db/schema_migrations/20200608212652 +++ /dev/null @@ -1 +0,0 @@ -724564628e5bc7485372059d04a394d6db472dcef7ce58b100d2adea8e679235
\ No newline at end of file diff --git a/db/schema_migrations/20200608212807 b/db/schema_migrations/20200608212807 deleted file mode 100644 index 9efdf7bac02..00000000000 --- a/db/schema_migrations/20200608212807 +++ /dev/null @@ -1 +0,0 @@ -afeb13580e40f67ef464f77d02a88ea7fbab0b6fcc156f2b24e9fd8f9e33f8ca
\ No newline at end of file diff --git a/db/schema_migrations/20200608212824 b/db/schema_migrations/20200608212824 deleted file mode 100644 index 200f7696846..00000000000 --- a/db/schema_migrations/20200608212824 +++ /dev/null @@ -1 +0,0 @@ -dc896e00a165354f327c1bae20862b9e7ca610a4ab0253d78e119071185c8422
\ No newline at end of file diff --git a/db/schema_migrations/20200608214008 b/db/schema_migrations/20200608214008 deleted file mode 100644 index 300c6de28b5..00000000000 --- a/db/schema_migrations/20200608214008 +++ /dev/null @@ -1 +0,0 @@ -b386197aa520110ece57073eaab7efc543e9765529acaff85d7cc5186455edda
\ No newline at end of file diff --git a/db/schema_migrations/20200609002841 b/db/schema_migrations/20200609002841 deleted file mode 100644 index a93b461cebf..00000000000 --- a/db/schema_migrations/20200609002841 +++ /dev/null @@ -1 +0,0 @@ -bea84fc1c29d73efe26914ca034f9355c75f9cbd87a3a3ccd71c6acd7ecbffe1
\ No newline at end of file diff --git a/db/schema_migrations/20200609012539 b/db/schema_migrations/20200609012539 deleted file mode 100644 index 5e989f7411f..00000000000 --- a/db/schema_migrations/20200609012539 +++ /dev/null @@ -1 +0,0 @@ -758e2c6cae32d919f656b3303f10b3c9bd61de6190c2b85baf2bcb1bcfb7ca2d
\ No newline at end of file diff --git a/db/schema_migrations/20200609142506 b/db/schema_migrations/20200609142506 deleted file mode 100644 index 9d28b9dcc7f..00000000000 --- a/db/schema_migrations/20200609142506 +++ /dev/null @@ -1 +0,0 @@ -8a84bfcacd88bfd03ec3626a3a9f64bdd5a3997bcedd296a8327751b0708d14c
\ No newline at end of file diff --git a/db/schema_migrations/20200609142507 b/db/schema_migrations/20200609142507 deleted file mode 100644 index 41cd9f1fd49..00000000000 --- a/db/schema_migrations/20200609142507 +++ /dev/null @@ -1 +0,0 @@ -fd8b872c67bbee78a8c5b11d60286c4a95888c33dc3daaf54d5f8bfe10269af9
\ No newline at end of file diff --git a/db/schema_migrations/20200609142508 b/db/schema_migrations/20200609142508 deleted file mode 100644 index b39b9b91eb5..00000000000 --- a/db/schema_migrations/20200609142508 +++ /dev/null @@ -1 +0,0 @@ -7a44279bbfe52fa2f27bcc6d59a69f0545e6cf0bfd18de0047b3009d01396755
\ No newline at end of file diff --git a/db/schema_migrations/20200609212701 b/db/schema_migrations/20200609212701 deleted file mode 100644 index 6d70df6b8a4..00000000000 --- a/db/schema_migrations/20200609212701 +++ /dev/null @@ -1 +0,0 @@ -97194e46e893e9424c8309615341b00cfee29e3f20eeee1f8319f53e48a16580
\ No newline at end of file diff --git a/db/schema_migrations/20200610033228 b/db/schema_migrations/20200610033228 deleted file mode 100644 index 8e02b4c92ec..00000000000 --- a/db/schema_migrations/20200610033228 +++ /dev/null @@ -1 +0,0 @@ -354524319f4c426328c7485619e248d00df323842873eaf7a2b3fbd2ad93048f
\ No newline at end of file diff --git a/db/schema_migrations/20200610040615 b/db/schema_migrations/20200610040615 deleted file mode 100644 index 6faeed1adaf..00000000000 --- a/db/schema_migrations/20200610040615 +++ /dev/null @@ -1 +0,0 @@ -1f698671f226289fa1eabbb988b94ecd6486038f4922076bb981e44ee2356b25
\ No newline at end of file diff --git a/db/schema_migrations/20200610130002 b/db/schema_migrations/20200610130002 deleted file mode 100644 index d17de837ae6..00000000000 --- a/db/schema_migrations/20200610130002 +++ /dev/null @@ -1 +0,0 @@ -c362fa8b228a00b4733a55da3f2513548eca9044813fdbb8d373987d0b85f929
\ No newline at end of file diff --git a/db/schema_migrations/20200611013227 b/db/schema_migrations/20200611013227 deleted file mode 100644 index e7f829d1875..00000000000 --- a/db/schema_migrations/20200611013227 +++ /dev/null @@ -1 +0,0 @@ -d0ede6c4a28988494b0e18c073e56c1d985de73c443cc6b6d99e0b34a7f37642
\ No newline at end of file diff --git a/db/schema_migrations/20200613104045 b/db/schema_migrations/20200613104045 deleted file mode 100644 index bf633f984fa..00000000000 --- a/db/schema_migrations/20200613104045 +++ /dev/null @@ -1 +0,0 @@ -fdd78ca60caa3ac4272bdf611cf0885efe648d5d09b2dac470620d49dcd60651
\ No newline at end of file diff --git a/db/schema_migrations/20200615083635 b/db/schema_migrations/20200615083635 deleted file mode 100644 index 0e8430924d7..00000000000 --- a/db/schema_migrations/20200615083635 +++ /dev/null @@ -1 +0,0 @@ -67d81dc2b9e6383b636f06d47f89e1f68866d8eee643b5ee73f82e70bd6e303b
\ No newline at end of file diff --git a/db/schema_migrations/20200615111857 b/db/schema_migrations/20200615111857 deleted file mode 100644 index eb6074c7681..00000000000 --- a/db/schema_migrations/20200615111857 +++ /dev/null @@ -1 +0,0 @@ -dc74a83d153d504b66ebdbd1b0055dc3b623c0eab9d073716fd2f04f2e1daeaa
\ No newline at end of file diff --git a/db/schema_migrations/20200615121217 b/db/schema_migrations/20200615121217 deleted file mode 100644 index 25ff8889fb0..00000000000 --- a/db/schema_migrations/20200615121217 +++ /dev/null @@ -1 +0,0 @@ -815ea6fa4f05ed202405c934810f768b76c767b549ed6db5373728bc0b1e851e
\ No newline at end of file diff --git a/db/schema_migrations/20200615123055 b/db/schema_migrations/20200615123055 deleted file mode 100644 index 23906a4268b..00000000000 --- a/db/schema_migrations/20200615123055 +++ /dev/null @@ -1 +0,0 @@ -be3b267fea5cc29b102923fd11893e2a9a7205a69ccf4fc96bb2d072ef2f599b
\ No newline at end of file diff --git a/db/schema_migrations/20200615141554 b/db/schema_migrations/20200615141554 deleted file mode 100644 index 88f8c745dd1..00000000000 --- a/db/schema_migrations/20200615141554 +++ /dev/null @@ -1 +0,0 @@ -10b1e75870e6d663327fca71a5e4c73eb625196a67e9ce429fa5d0f7f06afc7b
\ No newline at end of file diff --git a/db/schema_migrations/20200615193524 b/db/schema_migrations/20200615193524 deleted file mode 100644 index 4e150108ea6..00000000000 --- a/db/schema_migrations/20200615193524 +++ /dev/null @@ -1 +0,0 @@ -8d9b1d96db7e20284dc106395df63e26d230f7b7b7bec6d71cbed50ccb94cbd2
\ No newline at end of file diff --git a/db/schema_migrations/20200615232735 b/db/schema_migrations/20200615232735 deleted file mode 100644 index 39ea96cc513..00000000000 --- a/db/schema_migrations/20200615232735 +++ /dev/null @@ -1 +0,0 @@ -0ada7b9e9ed5e5fa034174d5aaaeb0062ed6ea8ab6b551a61a5ac0feaa93efab
\ No newline at end of file diff --git a/db/schema_migrations/20200615234047 b/db/schema_migrations/20200615234047 deleted file mode 100644 index aab90468293..00000000000 --- a/db/schema_migrations/20200615234047 +++ /dev/null @@ -1 +0,0 @@ -6299538c6a2042f29f2831b655f52058f08ab67cc09a276e5ebedf1d52f5a3f3
\ No newline at end of file diff --git a/db/schema_migrations/20200616124338 b/db/schema_migrations/20200616124338 deleted file mode 100644 index 479730cbf24..00000000000 --- a/db/schema_migrations/20200616124338 +++ /dev/null @@ -1 +0,0 @@ -aff547c9adf4ff78b4684f65ab1ea206d4a30b7bcdf2bb6e90c56536f359078d
\ No newline at end of file diff --git a/db/schema_migrations/20200616145031 b/db/schema_migrations/20200616145031 deleted file mode 100644 index fbd1ebbb3f5..00000000000 --- a/db/schema_migrations/20200616145031 +++ /dev/null @@ -1 +0,0 @@ -ddf5cdeff3be85a0843c71c5f6c710ffd0df87327dd775a2d5043bd154d7511a
\ No newline at end of file diff --git a/db/schema_migrations/20200617000757 b/db/schema_migrations/20200617000757 deleted file mode 100644 index 1583932958a..00000000000 --- a/db/schema_migrations/20200617000757 +++ /dev/null @@ -1 +0,0 @@ -bf05eea2152525112a806452ddacf2ca9fdbfdfe6d8e552ea27e43a020fb9f2a
\ No newline at end of file diff --git a/db/schema_migrations/20200617001001 b/db/schema_migrations/20200617001001 deleted file mode 100644 index 8dbdf29de58..00000000000 --- a/db/schema_migrations/20200617001001 +++ /dev/null @@ -1 +0,0 @@ -e6165c4152e5cbb6c9d8ea5e60cc66817f027baca245f6cb31f1eb37ac7052b2
\ No newline at end of file diff --git a/db/schema_migrations/20200617001118 b/db/schema_migrations/20200617001118 deleted file mode 100644 index bb53367d6c9..00000000000 --- a/db/schema_migrations/20200617001118 +++ /dev/null @@ -1 +0,0 @@ -5568809dbe031907f407ebb1edeb7244c838db221474ceaba0379cdb2eb7726c
\ No newline at end of file diff --git a/db/schema_migrations/20200617001637 b/db/schema_migrations/20200617001637 deleted file mode 100644 index 1df84f55110..00000000000 --- a/db/schema_migrations/20200617001637 +++ /dev/null @@ -1 +0,0 @@ -5276c47fa4f8168028d7bd92ac8a2d84a8f933ff510d2cf323575b594ffb96a2
\ No newline at end of file diff --git a/db/schema_migrations/20200617001848 b/db/schema_migrations/20200617001848 deleted file mode 100644 index 1271271a3fc..00000000000 --- a/db/schema_migrations/20200617001848 +++ /dev/null @@ -1 +0,0 @@ -f16dac222b98e1d4cfc56a5e4bd2f044dddb079781e566a81e1b54ba9b9ef068
\ No newline at end of file diff --git a/db/schema_migrations/20200617002030 b/db/schema_migrations/20200617002030 deleted file mode 100644 index c7f1c71f005..00000000000 --- a/db/schema_migrations/20200617002030 +++ /dev/null @@ -1 +0,0 @@ -171b9cb0420eb4d96c3a9828e33bd19776a8657d53ca34c0848d3ce6d4101e98
\ No newline at end of file diff --git a/db/schema_migrations/20200617150041 b/db/schema_migrations/20200617150041 deleted file mode 100644 index 65dc7fb1a26..00000000000 --- a/db/schema_migrations/20200617150041 +++ /dev/null @@ -1 +0,0 @@ -26e26c801f66f10e2885defdeef5ce6ef4f85daf8f64d4563ed2792ffb2025f0
\ No newline at end of file diff --git a/db/schema_migrations/20200617205000 b/db/schema_migrations/20200617205000 deleted file mode 100644 index 9bc1404f8b0..00000000000 --- a/db/schema_migrations/20200617205000 +++ /dev/null @@ -1 +0,0 @@ -98339ca184cc20894f1141ea8a0e7393f2a3f47d715c8b87f7cab4bca812ffe2
\ No newline at end of file diff --git a/db/schema_migrations/20200618105638 b/db/schema_migrations/20200618105638 deleted file mode 100644 index 6d13264e6a4..00000000000 --- a/db/schema_migrations/20200618105638 +++ /dev/null @@ -1 +0,0 @@ -712c660d2a3198979e120473900fbf5bbf355853a2708a91e144942b3742a876
\ No newline at end of file diff --git a/db/schema_migrations/20200618134223 b/db/schema_migrations/20200618134223 deleted file mode 100644 index a318e1bb96e..00000000000 --- a/db/schema_migrations/20200618134223 +++ /dev/null @@ -1 +0,0 @@ -e61844f2775ddcfd7baaa954746a1235b38b176e4f460bda9c1a00deac1c284f
\ No newline at end of file diff --git a/db/schema_migrations/20200618134723 b/db/schema_migrations/20200618134723 deleted file mode 100644 index b013d9b48b3..00000000000 --- a/db/schema_migrations/20200618134723 +++ /dev/null @@ -1 +0,0 @@ -e7e997f8b35b36f48f551e7fe146bd601b30a84e6183a14c8635dc4e68c10213
\ No newline at end of file diff --git a/db/schema_migrations/20200618152212 b/db/schema_migrations/20200618152212 deleted file mode 100644 index 6d06649e9b6..00000000000 --- a/db/schema_migrations/20200618152212 +++ /dev/null @@ -1 +0,0 @@ -e08929342b46d5f730cb421e3d65f492b033d4cd16ca06555965f504f64d77ea
\ No newline at end of file diff --git a/db/schema_migrations/20200619000316 b/db/schema_migrations/20200619000316 deleted file mode 100644 index 7e1e535a6bd..00000000000 --- a/db/schema_migrations/20200619000316 +++ /dev/null @@ -1 +0,0 @@ -91865984629a279ffa024d9317864066d94ddcdc95d3bfeb1633a2ca886afcc2
\ No newline at end of file diff --git a/db/schema_migrations/20200619154527 b/db/schema_migrations/20200619154527 deleted file mode 100644 index 261140c54c9..00000000000 --- a/db/schema_migrations/20200619154527 +++ /dev/null @@ -1 +0,0 @@ -196e4e626b3b13b992386441398b6beaba8751cbe4f30f6b7b3424d57f01e19d
\ No newline at end of file diff --git a/db/schema_migrations/20200619154528 b/db/schema_migrations/20200619154528 deleted file mode 100644 index 2997c62a7a5..00000000000 --- a/db/schema_migrations/20200619154528 +++ /dev/null @@ -1 +0,0 @@ -12d441b626cdaf67cfea8fd35c56c7c6a119bc02f29a0c62e9a12526e3eba702
\ No newline at end of file diff --git a/db/schema_migrations/20200622040750 b/db/schema_migrations/20200622040750 deleted file mode 100644 index 6fbf0b93335..00000000000 --- a/db/schema_migrations/20200622040750 +++ /dev/null @@ -1 +0,0 @@ -07e8f1ff41e1de0b3e3341f4ed08e228cc66742434d70284feaa05b743f7617e
\ No newline at end of file diff --git a/db/schema_migrations/20200622070606 b/db/schema_migrations/20200622070606 deleted file mode 100644 index 5c8a68f7218..00000000000 --- a/db/schema_migrations/20200622070606 +++ /dev/null @@ -1 +0,0 @@ -c39ad3dcf37b8c02e3b121950290c95994ddb9b4bbe487d7d46bb8e468d3c632
\ No newline at end of file diff --git a/db/schema_migrations/20200622070620 b/db/schema_migrations/20200622070620 deleted file mode 100644 index dcb26f0605e..00000000000 --- a/db/schema_migrations/20200622070620 +++ /dev/null @@ -1 +0,0 @@ -deee3fd416e17711a39084de30a9bac9a311e7046879982e61b76208f50a8f5a
\ No newline at end of file diff --git a/db/schema_migrations/20200622095419 b/db/schema_migrations/20200622095419 deleted file mode 100644 index 3c6a4678786..00000000000 --- a/db/schema_migrations/20200622095419 +++ /dev/null @@ -1 +0,0 @@ -a596be36eac444f24040071da6f8e397d549bc605382aa0a1c7ccc9d34260848
\ No newline at end of file diff --git a/db/schema_migrations/20200622103836 b/db/schema_migrations/20200622103836 deleted file mode 100644 index 80799a19431..00000000000 --- a/db/schema_migrations/20200622103836 +++ /dev/null @@ -1 +0,0 @@ -bddfca23e8575351d1dede5b3c17b33bac85952fbf97792444bbb5c96982ba66
\ No newline at end of file diff --git a/db/schema_migrations/20200622104923 b/db/schema_migrations/20200622104923 deleted file mode 100644 index 630ad21d4ea..00000000000 --- a/db/schema_migrations/20200622104923 +++ /dev/null @@ -1 +0,0 @@ -8054791d77a95553cc48a8e2178ee59146d0e4d72bddf05b4a24fbf6a225b99c
\ No newline at end of file diff --git a/db/schema_migrations/20200622235737 b/db/schema_migrations/20200622235737 deleted file mode 100644 index 0d28de77bfd..00000000000 --- a/db/schema_migrations/20200622235737 +++ /dev/null @@ -1 +0,0 @@ -6161fca1f9a3f91a4ea88ee918cbdb1834a6e9bb05057e27feab09bd0b6e7cac
\ No newline at end of file diff --git a/db/schema_migrations/20200623000148 b/db/schema_migrations/20200623000148 deleted file mode 100644 index 930f679c952..00000000000 --- a/db/schema_migrations/20200623000148 +++ /dev/null @@ -1 +0,0 @@ -5db78475ee52fa5fca6cf3befee5f10c86fefe04c27b0b79d4d676c85febaaf5
\ No newline at end of file diff --git a/db/schema_migrations/20200623000320 b/db/schema_migrations/20200623000320 deleted file mode 100644 index a028c8b1832..00000000000 --- a/db/schema_migrations/20200623000320 +++ /dev/null @@ -1 +0,0 @@ -6d312d49af3a42088d7781d82a583e99496df3731924fb30060440b169ba6182
\ No newline at end of file diff --git a/db/schema_migrations/20200623073431 b/db/schema_migrations/20200623073431 deleted file mode 100644 index b21597042b1..00000000000 --- a/db/schema_migrations/20200623073431 +++ /dev/null @@ -1 +0,0 @@ -56620e9f7767017db25052f55a246284fb294db5c170498b7d4f5ed160a669bc
\ No newline at end of file diff --git a/db/schema_migrations/20200623090030 b/db/schema_migrations/20200623090030 deleted file mode 100644 index fae84c07a75..00000000000 --- a/db/schema_migrations/20200623090030 +++ /dev/null @@ -1 +0,0 @@ -5199ce1212dc8c9e4da724bf32e2b6ea5970fa0c6ff87e6352665553ebe70fab
\ No newline at end of file diff --git a/db/schema_migrations/20200623121135 b/db/schema_migrations/20200623121135 deleted file mode 100644 index 4b4e9f260ba..00000000000 --- a/db/schema_migrations/20200623121135 +++ /dev/null @@ -1 +0,0 @@ -9a8a61b6553c5dd25fb1f2a07a4097a4d5cd5d5b0efa8912d76c4e8c4c56351a
\ No newline at end of file diff --git a/db/schema_migrations/20200623141217 b/db/schema_migrations/20200623141217 deleted file mode 100644 index adb80114aad..00000000000 --- a/db/schema_migrations/20200623141217 +++ /dev/null @@ -1 +0,0 @@ -664fc6b595641eec16eb2dd4993fdf5b73753fbc2a749167c9b7d06ed5959efd
\ No newline at end of file diff --git a/db/schema_migrations/20200623141544 b/db/schema_migrations/20200623141544 deleted file mode 100644 index 187f1aaf8a5..00000000000 --- a/db/schema_migrations/20200623141544 +++ /dev/null @@ -1 +0,0 @@ -738441d73aa06ef93187a4f5c414f485685328b201ccbbb63d35c9fee2056349
\ No newline at end of file diff --git a/db/schema_migrations/20200623142159 b/db/schema_migrations/20200623142159 deleted file mode 100644 index fde7c8e8d47..00000000000 --- a/db/schema_migrations/20200623142159 +++ /dev/null @@ -1 +0,0 @@ -82942944f0315f510ac897c58163031893f8a13904f8e08572696c75832890e0
\ No newline at end of file diff --git a/db/schema_migrations/20200623170000 b/db/schema_migrations/20200623170000 deleted file mode 100644 index 9bcd1c35c20..00000000000 --- a/db/schema_migrations/20200623170000 +++ /dev/null @@ -1 +0,0 @@ -7825feecc64a5135f9e4b1cf6af5975f8ae8c2726c8b410615563a004ede28fc
\ No newline at end of file diff --git a/db/schema_migrations/20200623185440 b/db/schema_migrations/20200623185440 deleted file mode 100644 index 0de2ff80e26..00000000000 --- a/db/schema_migrations/20200623185440 +++ /dev/null @@ -1 +0,0 @@ -d6895533719bc92264fecfdded371927ee117ee48d93a2b1362776f0ce7dac87
\ No newline at end of file diff --git a/db/schema_migrations/20200624075411 b/db/schema_migrations/20200624075411 deleted file mode 100644 index 77ff9daa076..00000000000 --- a/db/schema_migrations/20200624075411 +++ /dev/null @@ -1 +0,0 @@ -4e6b9c589339742451ca598ca0a78c678c1513c6fd574b81075f48a0c51c1d5c
\ No newline at end of file diff --git a/db/schema_migrations/20200624142107 b/db/schema_migrations/20200624142107 deleted file mode 100644 index 53f820d9a9e..00000000000 --- a/db/schema_migrations/20200624142107 +++ /dev/null @@ -1 +0,0 @@ -bb9ff9550f24c8441b955f11fdeed6058f1ce4dc61c4cf4e173a07d1210fac54
\ No newline at end of file diff --git a/db/schema_migrations/20200624142207 b/db/schema_migrations/20200624142207 deleted file mode 100644 index 2617714d289..00000000000 --- a/db/schema_migrations/20200624142207 +++ /dev/null @@ -1 +0,0 @@ -4f9d03e365ee98f1c09ff4c2e6950230455b9e48bff4b235e8d1c2fdd022b0a3
\ No newline at end of file diff --git a/db/schema_migrations/20200624222443 b/db/schema_migrations/20200624222443 deleted file mode 100644 index c0cbec35d8e..00000000000 --- a/db/schema_migrations/20200624222443 +++ /dev/null @@ -1 +0,0 @@ -8f96ad1dc7b0da8d5615d2cd331d7183a6f4878df32cc3569544438e53719acf
\ No newline at end of file diff --git a/db/schema_migrations/20200625045442 b/db/schema_migrations/20200625045442 deleted file mode 100644 index 6554a438732..00000000000 --- a/db/schema_migrations/20200625045442 +++ /dev/null @@ -1 +0,0 @@ -6c5484120e2fc4c1a12afc74eb5df99a39532e90cf7054352480abbe52567b1d
\ No newline at end of file diff --git a/db/schema_migrations/20200625082258 b/db/schema_migrations/20200625082258 deleted file mode 100644 index 41b092deba5..00000000000 --- a/db/schema_migrations/20200625082258 +++ /dev/null @@ -1 +0,0 @@ -b8c133ad205d222c42e029770c5ada3dddc09967e4fdaf7694be54cae2721378
\ No newline at end of file diff --git a/db/schema_migrations/20200625113337 b/db/schema_migrations/20200625113337 deleted file mode 100644 index 37797a16c61..00000000000 --- a/db/schema_migrations/20200625113337 +++ /dev/null @@ -1 +0,0 @@ -c698154da27dcf1e0ee106d091340130bb58227f51aed6aa8b4550f51b0b7f76
\ No newline at end of file diff --git a/db/schema_migrations/20200625174052 b/db/schema_migrations/20200625174052 deleted file mode 100644 index 1e0b9edcc8d..00000000000 --- a/db/schema_migrations/20200625174052 +++ /dev/null @@ -1 +0,0 @@ -882f9e7a02c9c44ffca11ffc9e3b6785588ff3cb1d8fb3bbf560980691624eb3
\ No newline at end of file diff --git a/db/schema_migrations/20200625190458 b/db/schema_migrations/20200625190458 deleted file mode 100644 index 039c25a2016..00000000000 --- a/db/schema_migrations/20200625190458 +++ /dev/null @@ -1 +0,0 @@ -5846a2c22dd2f502c853268adebf7d751e7a5207e5fba6f45e98cb29acb9a7ea
\ No newline at end of file diff --git a/db/schema_migrations/20200625193358 b/db/schema_migrations/20200625193358 deleted file mode 100644 index 06e5c06085f..00000000000 --- a/db/schema_migrations/20200625193358 +++ /dev/null @@ -1 +0,0 @@ -e691c94223b44a5866f34aab96cc9a8c5857a6302115f977542bacb36e7c010e
\ No newline at end of file diff --git a/db/schema_migrations/20200626060151 b/db/schema_migrations/20200626060151 deleted file mode 100644 index 2d550e28463..00000000000 --- a/db/schema_migrations/20200626060151 +++ /dev/null @@ -1 +0,0 @@ -baf236b3a0ee8e3dd2b970b1ad64937581a7bb5e1d1795571815638fd2de527f
\ No newline at end of file diff --git a/db/schema_migrations/20200626130220 b/db/schema_migrations/20200626130220 deleted file mode 100644 index 46abe4e610b..00000000000 --- a/db/schema_migrations/20200626130220 +++ /dev/null @@ -1 +0,0 @@ -fa91292f2616dec3cfcc442601dca425fc395a3b93824f4c01e0c099d55447cf
\ No newline at end of file diff --git a/db/schema_migrations/20200628210938 b/db/schema_migrations/20200628210938 deleted file mode 100644 index 87a4d887b28..00000000000 --- a/db/schema_migrations/20200628210938 +++ /dev/null @@ -1 +0,0 @@ -b579dec93b04d61e568e0373e591f73fbee4024e6356bea885498091e98d1afb
\ No newline at end of file diff --git a/db/schema_migrations/20200629134747 b/db/schema_migrations/20200629134747 deleted file mode 100644 index 04c2c1632b1..00000000000 --- a/db/schema_migrations/20200629134747 +++ /dev/null @@ -1 +0,0 @@ -9cd0e15dd2c5e70e53fc154a47a76ec066c741b5f6d148972b96d23888f0fcd4
\ No newline at end of file diff --git a/db/schema_migrations/20200629192638 b/db/schema_migrations/20200629192638 deleted file mode 100644 index 69d743ec1f8..00000000000 --- a/db/schema_migrations/20200629192638 +++ /dev/null @@ -1 +0,0 @@ -eb71347da1619598330e8baf5083d99562961d96315242078ac36ff8beb7cc05
\ No newline at end of file diff --git a/db/schema_migrations/20200630091656 b/db/schema_migrations/20200630091656 deleted file mode 100644 index c12858c4662..00000000000 --- a/db/schema_migrations/20200630091656 +++ /dev/null @@ -1 +0,0 @@ -3bc17a3539e308a65c4bfbdfd56aeb1ab3562932fe9fc30653bdf26e194c8da9
\ No newline at end of file diff --git a/db/schema_migrations/20200630110826 b/db/schema_migrations/20200630110826 deleted file mode 100644 index dc8ba062c4b..00000000000 --- a/db/schema_migrations/20200630110826 +++ /dev/null @@ -1 +0,0 @@ -be35f5a98fc6d7a64dc2249ddf1f0c6a39c9607c119378eb7a6bba97d951e3d3
\ No newline at end of file diff --git a/db/schema_migrations/20200701064756 b/db/schema_migrations/20200701064756 deleted file mode 100644 index 2a7d94f27fd..00000000000 --- a/db/schema_migrations/20200701064756 +++ /dev/null @@ -1 +0,0 @@ -1775ba52ee8ac710dbc15fc009ffe68a4abe2513c323ab8af9955a4b8f19aeb1
\ No newline at end of file diff --git a/db/schema_migrations/20200701070435 b/db/schema_migrations/20200701070435 deleted file mode 100644 index 8307c43131d..00000000000 --- a/db/schema_migrations/20200701070435 +++ /dev/null @@ -1 +0,0 @@ -9ebe3fc5f75a75e883196fb587930b466c071550e8343f3cc0f98ade01aaba9a
\ No newline at end of file diff --git a/db/schema_migrations/20200701091253 b/db/schema_migrations/20200701091253 deleted file mode 100644 index f34f702d386..00000000000 --- a/db/schema_migrations/20200701091253 +++ /dev/null @@ -1 +0,0 @@ -73e22a1ecd3c8f9ea637af55bd2bda2ec507b7c0c0499d3a16f11e3a1c14e1a9
\ No newline at end of file diff --git a/db/schema_migrations/20200701093859 b/db/schema_migrations/20200701093859 deleted file mode 100644 index 947819b9887..00000000000 --- a/db/schema_migrations/20200701093859 +++ /dev/null @@ -1 +0,0 @@ -b526262371625857dca652fdc6ab69850ccdc71cfad5fee57c4036bdd4705201
\ No newline at end of file diff --git a/db/schema_migrations/20200701190523 b/db/schema_migrations/20200701190523 deleted file mode 100644 index 7fe184eea63..00000000000 --- a/db/schema_migrations/20200701190523 +++ /dev/null @@ -1 +0,0 @@ -3be0b46b01cb9ff03706f80e3ec9230eaa52e46890307c85126f49d0e959d930
\ No newline at end of file diff --git a/db/schema_migrations/20200701205710 b/db/schema_migrations/20200701205710 deleted file mode 100644 index 7630c7d873d..00000000000 --- a/db/schema_migrations/20200701205710 +++ /dev/null @@ -1 +0,0 @@ -f5e6487c25e67c2d7d1bc51c753e95df20c5fa8528caafa0b1691bf2e60a909a
\ No newline at end of file diff --git a/db/schema_migrations/20200701221303 b/db/schema_migrations/20200701221303 deleted file mode 100644 index f2833ccf7a3..00000000000 --- a/db/schema_migrations/20200701221303 +++ /dev/null @@ -1 +0,0 @@ -28ccab4f919ccf74d777c152e2c93a2ebf33c1ec1f6626a0708b1e2d5aa73648
\ No newline at end of file diff --git a/db/schema_migrations/20200702123805 b/db/schema_migrations/20200702123805 deleted file mode 100644 index 741db09263f..00000000000 --- a/db/schema_migrations/20200702123805 +++ /dev/null @@ -1 +0,0 @@ -6d6dc7b008b295e4b39e60b99ff65b7e647c9db6eec80840e2bc6bb4efe5eda6
\ No newline at end of file diff --git a/db/schema_migrations/20200702201039 b/db/schema_migrations/20200702201039 deleted file mode 100644 index 4bff44d22e0..00000000000 --- a/db/schema_migrations/20200702201039 +++ /dev/null @@ -1 +0,0 @@ -d3237c919b13ed370cf88fa44e2d074abad26f9ce2650ba40744d22d896a6ad0
\ No newline at end of file diff --git a/db/schema_migrations/20200703035021 b/db/schema_migrations/20200703035021 deleted file mode 100644 index 53d81d39d66..00000000000 --- a/db/schema_migrations/20200703035021 +++ /dev/null @@ -1 +0,0 @@ -acd7bef1e9ba764037fb2c2341a40eec9931b029187b4fc1e0f82d2eba24f413
\ No newline at end of file diff --git a/db/schema_migrations/20200703064117 b/db/schema_migrations/20200703064117 deleted file mode 100644 index 10610e85b29..00000000000 --- a/db/schema_migrations/20200703064117 +++ /dev/null @@ -1 +0,0 @@ -1d87f96c7b22f21877a57c0cd62b507af52b96b7c5784900bf4d96b73e5bfe40
\ No newline at end of file diff --git a/db/schema_migrations/20200703121557 b/db/schema_migrations/20200703121557 deleted file mode 100644 index d570e637d51..00000000000 --- a/db/schema_migrations/20200703121557 +++ /dev/null @@ -1 +0,0 @@ -276573ccb4e8e68aba9889080854b5e131d28e3c95de4b0fc24ce10f6717fe53
\ No newline at end of file diff --git a/db/schema_migrations/20200703124823 b/db/schema_migrations/20200703124823 deleted file mode 100644 index f4b934ea6ff..00000000000 --- a/db/schema_migrations/20200703124823 +++ /dev/null @@ -1 +0,0 @@ -bbe4f98abcd45317b66a137d1428b0a57bf9a075268b9d54cbc55fb0fa7bfbb1
\ No newline at end of file diff --git a/db/schema_migrations/20200703125016 b/db/schema_migrations/20200703125016 deleted file mode 100644 index d5ee4d9f603..00000000000 --- a/db/schema_migrations/20200703125016 +++ /dev/null @@ -1 +0,0 @@ -49bffc45e5a45f8c435a522c31b7d79dc6de31322ea5a2d6e23982cb92e0722b
\ No newline at end of file diff --git a/db/schema_migrations/20200703154822 b/db/schema_migrations/20200703154822 deleted file mode 100644 index 7fa87b4b371..00000000000 --- a/db/schema_migrations/20200703154822 +++ /dev/null @@ -1 +0,0 @@ -8a9e0c601eabe2b22a911dd43fe3aa721d6d273f0bab44efaf50fc265e218f98
\ No newline at end of file diff --git a/db/schema_migrations/20200703165434 b/db/schema_migrations/20200703165434 deleted file mode 100644 index 4d0452174f8..00000000000 --- a/db/schema_migrations/20200703165434 +++ /dev/null @@ -1 +0,0 @@ -75e49095b0a8af426ed6d14b13230c5a19b6f225961e4c67ea21db55099e8006
\ No newline at end of file diff --git a/db/schema_migrations/20200704143633 b/db/schema_migrations/20200704143633 deleted file mode 100644 index d435155df29..00000000000 --- a/db/schema_migrations/20200704143633 +++ /dev/null @@ -1 +0,0 @@ -ec1273a88e79d23536d4a66324061a6d90ae9bee39dd4da323e951e9e873ff8a
\ No newline at end of file diff --git a/db/schema_migrations/20200704161600 b/db/schema_migrations/20200704161600 deleted file mode 100644 index aba199bb464..00000000000 --- a/db/schema_migrations/20200704161600 +++ /dev/null @@ -1 +0,0 @@ -6bb78beff6acccd6b08a564d469c0c0cd40e229d084a116ec972a668e20253fa
\ No newline at end of file diff --git a/db/schema_migrations/20200706005325 b/db/schema_migrations/20200706005325 deleted file mode 100644 index e6b6673d660..00000000000 --- a/db/schema_migrations/20200706005325 +++ /dev/null @@ -1 +0,0 @@ -6feb1c6c8b655617e06ba0fc586f7383aa104d9c8fa0a9d47c66fddc80ce6d46
\ No newline at end of file diff --git a/db/schema_migrations/20200706035141 b/db/schema_migrations/20200706035141 deleted file mode 100644 index a853faddf1e..00000000000 --- a/db/schema_migrations/20200706035141 +++ /dev/null @@ -1 +0,0 @@ -eb55d6708d8427f64794b0903b6a251e34db50b435a29310ea254eb2093f760f
\ No newline at end of file diff --git a/db/schema_migrations/20200706154619 b/db/schema_migrations/20200706154619 deleted file mode 100644 index 04faafe58df..00000000000 --- a/db/schema_migrations/20200706154619 +++ /dev/null @@ -1 +0,0 @@ -30e10375de037c29b48be3f4b0376c28e751c53c08e42b0d936fb7151efeec4b
\ No newline at end of file diff --git a/db/schema_migrations/20200706170536 b/db/schema_migrations/20200706170536 deleted file mode 100644 index a6d59a438b7..00000000000 --- a/db/schema_migrations/20200706170536 +++ /dev/null @@ -1 +0,0 @@ -a9a93c20cf05cc88d9fd9ed7de6fd8855188c8806d2c5fe8e6ed1f3ea26bf5d4
\ No newline at end of file diff --git a/db/schema_migrations/20200707071941 b/db/schema_migrations/20200707071941 deleted file mode 100644 index 3e93ecf390e..00000000000 --- a/db/schema_migrations/20200707071941 +++ /dev/null @@ -1 +0,0 @@ -0a840d40b6e870afe710a0e33fac3390197d02dab8ec371dcb25dd2100dbf1c4
\ No newline at end of file diff --git a/db/schema_migrations/20200707094341 b/db/schema_migrations/20200707094341 deleted file mode 100644 index 2cae5913f78..00000000000 --- a/db/schema_migrations/20200707094341 +++ /dev/null @@ -1 +0,0 @@ -2edd84a9c392f7873e30ff599c1fe8eed3f67055212550c6600d70de683fd1fd
\ No newline at end of file diff --git a/db/schema_migrations/20200707095849 b/db/schema_migrations/20200707095849 deleted file mode 100644 index 5903b647ff9..00000000000 --- a/db/schema_migrations/20200707095849 +++ /dev/null @@ -1 +0,0 @@ -b4709d8dcf2fd6a00f96256ece8feba935b479d10249e5a950b6ecc413eb73b0
\ No newline at end of file diff --git a/db/schema_migrations/20200708080631 b/db/schema_migrations/20200708080631 deleted file mode 100644 index 4fbdc9a14ae..00000000000 --- a/db/schema_migrations/20200708080631 +++ /dev/null @@ -1 +0,0 @@ -04a2bab7ff956fe7f1ee21dd0fc11effbc227c70f73f600162bbf067f6ce7488
\ No newline at end of file diff --git a/db/schema_migrations/20200709101408 b/db/schema_migrations/20200709101408 deleted file mode 100644 index 5a2d78b3b47..00000000000 --- a/db/schema_migrations/20200709101408 +++ /dev/null @@ -1 +0,0 @@ -90d3e4bca0810485f588af454ed0181214ad3d0d96f2ec62b7fa17f77c63278f
\ No newline at end of file diff --git a/db/schema_migrations/20200710102418 b/db/schema_migrations/20200710102418 deleted file mode 100644 index 7c8349d3c35..00000000000 --- a/db/schema_migrations/20200710102418 +++ /dev/null @@ -1 +0,0 @@ -85af50da623e9d6b6d05d1288d2be28d1d9e45163a047d46ac069650e88cc9bd
\ No newline at end of file diff --git a/db/schema_migrations/20200710102846 b/db/schema_migrations/20200710102846 deleted file mode 100644 index 7307e06f524..00000000000 --- a/db/schema_migrations/20200710102846 +++ /dev/null @@ -1 +0,0 @@ -3798b034456371e4d370796e8dbcde3af229f276fa9f4db7a15b9549208004c0
\ No newline at end of file diff --git a/db/schema_migrations/20200710105332 b/db/schema_migrations/20200710105332 deleted file mode 100644 index 4fc067f4620..00000000000 --- a/db/schema_migrations/20200710105332 +++ /dev/null @@ -1 +0,0 @@ -51e89bd483fae5e4dc56323ad0246e63d033f4d5b48fe6ab4fddd6dbc0ee40bd
\ No newline at end of file diff --git a/db/schema_migrations/20200710113437 b/db/schema_migrations/20200710113437 deleted file mode 100644 index 02e9161ed7f..00000000000 --- a/db/schema_migrations/20200710113437 +++ /dev/null @@ -1 +0,0 @@ -3d49c22b718c5b4af0a7372584fe12ab730e1ffca501c7f582f7d01200708eb1
\ No newline at end of file diff --git a/db/schema_migrations/20200710130234 b/db/schema_migrations/20200710130234 deleted file mode 100644 index aa7869cab52..00000000000 --- a/db/schema_migrations/20200710130234 +++ /dev/null @@ -1 +0,0 @@ -3bf35c629a3e1ed0ad3d38eeb5f8a960cdb4d935c7725f01206004707926257a
\ No newline at end of file diff --git a/db/schema_migrations/20200710152642 b/db/schema_migrations/20200710152642 deleted file mode 100644 index f3e057df9d2..00000000000 --- a/db/schema_migrations/20200710152642 +++ /dev/null @@ -1 +0,0 @@ -0e4151d0fa03777383015a9efa6ce7ff6b2ef548978853da313500bf29448530
\ No newline at end of file diff --git a/db/schema_migrations/20200710153009 b/db/schema_migrations/20200710153009 deleted file mode 100644 index 0a258ce5feb..00000000000 --- a/db/schema_migrations/20200710153009 +++ /dev/null @@ -1 +0,0 @@ -338199b853aa81cd1cc961eb6d8be313d794f885b182be8e7e3b227a3eca5be5
\ No newline at end of file diff --git a/db/schema_migrations/20200712084655 b/db/schema_migrations/20200712084655 deleted file mode 100644 index a78ced88ca9..00000000000 --- a/db/schema_migrations/20200712084655 +++ /dev/null @@ -1 +0,0 @@ -3b9c351fe89fc57b3abaf7ce3a271864121c5c0ec8b4231e8a93e8e20b76f949
\ No newline at end of file diff --git a/db/schema_migrations/20200712235622 b/db/schema_migrations/20200712235622 deleted file mode 100644 index d168bb326f9..00000000000 --- a/db/schema_migrations/20200712235622 +++ /dev/null @@ -1 +0,0 @@ -29f7a28183b90535a0b9f6dcf435b4ffa7989f3a407f3a62c798411ad495d748
\ No newline at end of file diff --git a/db/schema_migrations/20200713071042 b/db/schema_migrations/20200713071042 deleted file mode 100644 index 9f13921437e..00000000000 --- a/db/schema_migrations/20200713071042 +++ /dev/null @@ -1 +0,0 @@ -0f859ebb7e5af38b45f8ebd67e9ae791592aa3273a3ef22228157d7c91e22bc2
\ No newline at end of file diff --git a/db/schema_migrations/20200713141854 b/db/schema_migrations/20200713141854 deleted file mode 100644 index 4ed2ec290d3..00000000000 --- a/db/schema_migrations/20200713141854 +++ /dev/null @@ -1 +0,0 @@ -1f14d14a6103bc4c593b1031485934812782c221c5d3ec193058086b95bd15e2
\ No newline at end of file diff --git a/db/schema_migrations/20200713152443 b/db/schema_migrations/20200713152443 deleted file mode 100644 index fde7ac94467..00000000000 --- a/db/schema_migrations/20200713152443 +++ /dev/null @@ -1 +0,0 @@ -9616489e2128cf858ce75baaf97516cb9a721e95a7507b0983f29eb78bdd063f
\ No newline at end of file diff --git a/db/schema_migrations/20200714075739 b/db/schema_migrations/20200714075739 deleted file mode 100644 index 4c3b7680dfe..00000000000 --- a/db/schema_migrations/20200714075739 +++ /dev/null @@ -1 +0,0 @@ -49dc72bd54781a98cc80af7a0da22234339634c1af9987c150044f29e6a6db1c
\ No newline at end of file diff --git a/db/schema_migrations/20200715124210 b/db/schema_migrations/20200715124210 deleted file mode 100644 index 24775aa2a96..00000000000 --- a/db/schema_migrations/20200715124210 +++ /dev/null @@ -1 +0,0 @@ -f5e992709af3d28c5d06930fac52529d7c7e4cd7133d836d2b289a2d5f9fab57
\ No newline at end of file diff --git a/db/schema_migrations/20200715135130 b/db/schema_migrations/20200715135130 deleted file mode 100644 index b52ffa59dcb..00000000000 --- a/db/schema_migrations/20200715135130 +++ /dev/null @@ -1 +0,0 @@ -422e41e9eb94fb659d0c8ffd2f3da783b1041db6223af78874fd8545d49ac05a
\ No newline at end of file diff --git a/db/schema_migrations/20200715171155 b/db/schema_migrations/20200715171155 deleted file mode 100644 index 8ee7499cd42..00000000000 --- a/db/schema_migrations/20200715171155 +++ /dev/null @@ -1 +0,0 @@ -8db7f9239f6a817f8ad1a4dea388e1a797009cd21e1729817005b0de36c4300f
\ No newline at end of file diff --git a/db/schema_migrations/20200715202659 b/db/schema_migrations/20200715202659 deleted file mode 100644 index 7cc37659399..00000000000 --- a/db/schema_migrations/20200715202659 +++ /dev/null @@ -1 +0,0 @@ -312e5f4ec625f4588feddafee7c0dca98a6981f9d0a15abf6d9ce244ebd02bb3
\ No newline at end of file diff --git a/db/schema_migrations/20200716044023 b/db/schema_migrations/20200716044023 deleted file mode 100644 index 49f5f53e176..00000000000 --- a/db/schema_migrations/20200716044023 +++ /dev/null @@ -1 +0,0 @@ -b6d060f317ec8b342ed29249a469a6c3548677f339029d14a88775d372bebd8f
\ No newline at end of file diff --git a/db/schema_migrations/20200716120000 b/db/schema_migrations/20200716120000 deleted file mode 100644 index 5bf1c862593..00000000000 --- a/db/schema_migrations/20200716120000 +++ /dev/null @@ -1 +0,0 @@ -a70e7a6c27a51cc8f37af7e9d8f03870ac60139b179e89416870de0a7e07d104
\ No newline at end of file diff --git a/db/schema_migrations/20200716120419 b/db/schema_migrations/20200716120419 deleted file mode 100644 index 4305bffa7ff..00000000000 --- a/db/schema_migrations/20200716120419 +++ /dev/null @@ -1 +0,0 @@ -ca0bed2b4b6cec712c6c8fb55cae995905d9cc64399f670f3ce25298f91241d1
\ No newline at end of file diff --git a/db/schema_migrations/20200716145156 b/db/schema_migrations/20200716145156 deleted file mode 100644 index 5d489a0f9d1..00000000000 --- a/db/schema_migrations/20200716145156 +++ /dev/null @@ -1 +0,0 @@ -f84e629adb1db8441287577e52b895fa471c75d6d0578b55a1173f0034d5f02e
\ No newline at end of file diff --git a/db/schema_migrations/20200716234259 b/db/schema_migrations/20200716234259 deleted file mode 100644 index 51916bdc8af..00000000000 --- a/db/schema_migrations/20200716234259 +++ /dev/null @@ -1 +0,0 @@ -9683f55a327b9579b9b0b9484dd11a07b7ea4244b126c46e0144662cb25da6bb
\ No newline at end of file diff --git a/db/schema_migrations/20200716234518 b/db/schema_migrations/20200716234518 deleted file mode 100644 index c5f438dcfbe..00000000000 --- a/db/schema_migrations/20200716234518 +++ /dev/null @@ -1 +0,0 @@ -71cd12e553b3acbb665770fe7478365f1f082e2d278c67b166f41461f689aa5e
\ No newline at end of file diff --git a/db/schema_migrations/20200717040735 b/db/schema_migrations/20200717040735 deleted file mode 100644 index 6bfa1dd7261..00000000000 --- a/db/schema_migrations/20200717040735 +++ /dev/null @@ -1 +0,0 @@ -6b8fa09c9700c494eeb5151f43064f1656eaaea804742629b7bd66483e2b04cb
\ No newline at end of file diff --git a/db/schema_migrations/20200717080257 b/db/schema_migrations/20200717080257 deleted file mode 100644 index 73a5b583f8a..00000000000 --- a/db/schema_migrations/20200717080257 +++ /dev/null @@ -1 +0,0 @@ -dbb84d05cfe6d2ef143b9321b2b089c66d705f01ced64756032622f64f8e3eed
\ No newline at end of file diff --git a/db/schema_migrations/20200717163656 b/db/schema_migrations/20200717163656 deleted file mode 100644 index e53618b003f..00000000000 --- a/db/schema_migrations/20200717163656 +++ /dev/null @@ -1 +0,0 @@ -40b9ece83b05dc3ec2c69db2298a051b085d645d2b60719eef4a55d7838ba1fb
\ No newline at end of file diff --git a/db/schema_migrations/20200718040100 b/db/schema_migrations/20200718040100 deleted file mode 100644 index f8844a3e914..00000000000 --- a/db/schema_migrations/20200718040100 +++ /dev/null @@ -1 +0,0 @@ -9b0bf24c0943422dda627d4b8864cfb639e77c1522f39215b4ec2858be6b2bb0
\ No newline at end of file diff --git a/db/schema_migrations/20200718040200 b/db/schema_migrations/20200718040200 deleted file mode 100644 index 9f58e2c685a..00000000000 --- a/db/schema_migrations/20200718040200 +++ /dev/null @@ -1 +0,0 @@ -6b300cb30377b600e0b107fcb5707bb5ffad86aeffcc306404d320e1438a833d
\ No newline at end of file diff --git a/db/schema_migrations/20200718040300 b/db/schema_migrations/20200718040300 deleted file mode 100644 index 21d24ee09e2..00000000000 --- a/db/schema_migrations/20200718040300 +++ /dev/null @@ -1 +0,0 @@ -512af8b92b1ac74a2c044c08362c18c48772d4b722b18f620593ffa2be551762
\ No newline at end of file diff --git a/db/schema_migrations/20200720053909 b/db/schema_migrations/20200720053909 deleted file mode 100644 index da9379a4e13..00000000000 --- a/db/schema_migrations/20200720053909 +++ /dev/null @@ -1 +0,0 @@ -dfe979676a74b09ed6d0ffe258162f7d5af2bdea7c21b307aafbbb9ceb7c0334
\ No newline at end of file diff --git a/db/schema_migrations/20200720154007 b/db/schema_migrations/20200720154007 deleted file mode 100644 index 6006f5d5301..00000000000 --- a/db/schema_migrations/20200720154007 +++ /dev/null @@ -1 +0,0 @@ -8da79a65932d06a4a4cf7b601ecac742ae7b785a1c6799019b1ee758f844cacf
\ No newline at end of file diff --git a/db/schema_migrations/20200720154123 b/db/schema_migrations/20200720154123 deleted file mode 100644 index 46bf0eea32a..00000000000 --- a/db/schema_migrations/20200720154123 +++ /dev/null @@ -1 +0,0 @@ -9ab36f32e5e833acf4b795c0002ad4d3461c950ac7d10eeb12f42a13838b06bf
\ No newline at end of file diff --git a/db/schema_migrations/20200720191134 b/db/schema_migrations/20200720191134 deleted file mode 100644 index 05b27271d48..00000000000 --- a/db/schema_migrations/20200720191134 +++ /dev/null @@ -1 +0,0 @@ -08566b4094de37395f3ebc3f70eedc9ed6052a78090cf296e66ce4ef167e6bce
\ No newline at end of file diff --git a/db/schema_migrations/20200721034536 b/db/schema_migrations/20200721034536 deleted file mode 100644 index e40424a5069..00000000000 --- a/db/schema_migrations/20200721034536 +++ /dev/null @@ -1 +0,0 @@ -9d30ae6ea32db6cbc5871e214a9c2bf8f1a37fbb586f5e39f6bc2ab58768607b
\ No newline at end of file diff --git a/db/schema_migrations/20200721043502 b/db/schema_migrations/20200721043502 deleted file mode 100644 index 9d33d6a5e92..00000000000 --- a/db/schema_migrations/20200721043502 +++ /dev/null @@ -1 +0,0 @@ -13731676720dd93887dc55374c9052f1087a2e817eb347fd63a19d9398899d75
\ No newline at end of file diff --git a/db/schema_migrations/20200721052853 b/db/schema_migrations/20200721052853 deleted file mode 100644 index 3e0ec8b0d5a..00000000000 --- a/db/schema_migrations/20200721052853 +++ /dev/null @@ -1 +0,0 @@ -53c373e95eb78ddc79eaa07d7638d9e1dbe055838da435fdae1c3d45c6babe0e
\ No newline at end of file diff --git a/db/schema_migrations/20200721140507 b/db/schema_migrations/20200721140507 deleted file mode 100644 index 3fbd67734c7..00000000000 --- a/db/schema_migrations/20200721140507 +++ /dev/null @@ -1 +0,0 @@ -9a395ab591542ec49fc17c22747d9bbf085fd5f61ae71f49493dfe34f0389059
\ No newline at end of file diff --git a/db/schema_migrations/20200721230558 b/db/schema_migrations/20200721230558 deleted file mode 100644 index eb3e43ac095..00000000000 --- a/db/schema_migrations/20200721230558 +++ /dev/null @@ -1 +0,0 @@ -7409688836e7375423b45d69e6c7b82c6a946c0306435ec341bf216e3f97190f
\ No newline at end of file diff --git a/db/schema_migrations/20200722075411 b/db/schema_migrations/20200722075411 deleted file mode 100644 index 2251597abb1..00000000000 --- a/db/schema_migrations/20200722075411 +++ /dev/null @@ -1 +0,0 @@ -5b8756999308abb47823c075128c07d62b899d6a39dff23242db6b12f18f239a
\ No newline at end of file diff --git a/db/schema_migrations/20200722084623 b/db/schema_migrations/20200722084623 deleted file mode 100644 index 04e3017558f..00000000000 --- a/db/schema_migrations/20200722084623 +++ /dev/null @@ -1 +0,0 @@ -15024fbf4fc6be1ece1f25cf46ef1cc27f9d91fcd7cc0285dad68db167f197c9
\ No newline at end of file diff --git a/db/schema_migrations/20200722091435 b/db/schema_migrations/20200722091435 deleted file mode 100644 index 13b3c855293..00000000000 --- a/db/schema_migrations/20200722091435 +++ /dev/null @@ -1 +0,0 @@ -d4e389b1469b968b703432de9ece6c362e45ec4ba3ad20d1f6c6418253969379
\ No newline at end of file diff --git a/db/schema_migrations/20200722131241 b/db/schema_migrations/20200722131241 deleted file mode 100644 index 327486a7367..00000000000 --- a/db/schema_migrations/20200722131241 +++ /dev/null @@ -1 +0,0 @@ -5fc97e904844b43a331246c68b1d0a879f683d5b36fab6cd024f417922259864
\ No newline at end of file diff --git a/db/schema_migrations/20200722132040 b/db/schema_migrations/20200722132040 deleted file mode 100644 index 7993eaafe02..00000000000 --- a/db/schema_migrations/20200722132040 +++ /dev/null @@ -1 +0,0 @@ -7b33a7f96ea02e3d5510cb6a6d75a9c753c1bd24c93d9995f91596d6b1a44592
\ No newline at end of file diff --git a/db/schema_migrations/20200722132540 b/db/schema_migrations/20200722132540 deleted file mode 100644 index 683c61dd661..00000000000 --- a/db/schema_migrations/20200722132540 +++ /dev/null @@ -1 +0,0 @@ -543ebc8ab7fad96aeb5a8618bc954babb0eed1d252fe490aa6fab9b8e80ffbf1
\ No newline at end of file diff --git a/db/schema_migrations/20200722133040 b/db/schema_migrations/20200722133040 deleted file mode 100644 index 602ba562760..00000000000 --- a/db/schema_migrations/20200722133040 +++ /dev/null @@ -1 +0,0 @@ -4a6a322cf3f6e1622d3244f6faa99a1befcb8c626a8fea36b09d1910b770b88c
\ No newline at end of file diff --git a/db/schema_migrations/20200722133540 b/db/schema_migrations/20200722133540 deleted file mode 100644 index 1a0385bcaea..00000000000 --- a/db/schema_migrations/20200722133540 +++ /dev/null @@ -1 +0,0 @@ -0307eb0f5082a5da84f5e94084b677d13e03f9cd5011efe3dc7e25645a00082d
\ No newline at end of file diff --git a/db/schema_migrations/20200722202318 b/db/schema_migrations/20200722202318 deleted file mode 100644 index 74b6d2abf26..00000000000 --- a/db/schema_migrations/20200722202318 +++ /dev/null @@ -1 +0,0 @@ -7a1344af4736eb369996398332653b29ec93fbda92b258fbe95093476c01d29e
\ No newline at end of file diff --git a/db/schema_migrations/20200723040950 b/db/schema_migrations/20200723040950 deleted file mode 100644 index fc2233ef119..00000000000 --- a/db/schema_migrations/20200723040950 +++ /dev/null @@ -1 +0,0 @@ -085b3ad0f7da78a1e13f5cd3d2e7df297284a682c3bcd3883e487b18497430ff
\ No newline at end of file diff --git a/db/schema_migrations/20200723125205 b/db/schema_migrations/20200723125205 deleted file mode 100644 index ca259978658..00000000000 --- a/db/schema_migrations/20200723125205 +++ /dev/null @@ -1 +0,0 @@ -630029f7d90da29022404146ce8c488108a2232d2bfd0864a6f5d659f3999af8
\ No newline at end of file diff --git a/db/schema_migrations/20200723128332 b/db/schema_migrations/20200723128332 deleted file mode 100644 index 2e180ef80f1..00000000000 --- a/db/schema_migrations/20200723128332 +++ /dev/null @@ -1 +0,0 @@ -7d6f3601187c98f091cb0c5449ff7c6ca53392f006435223dcc067e4a73dab11
\ No newline at end of file diff --git a/db/schema_migrations/20200723132258 b/db/schema_migrations/20200723132258 deleted file mode 100644 index 3a3c0341f42..00000000000 --- a/db/schema_migrations/20200723132258 +++ /dev/null @@ -1 +0,0 @@ -b3fcb58bbeae8af800a32158a8d272ec524594391e96357fdad955f70864bc95
\ No newline at end of file diff --git a/db/schema_migrations/20200724100123 b/db/schema_migrations/20200724100123 deleted file mode 100644 index 8d3fbecedb6..00000000000 --- a/db/schema_migrations/20200724100123 +++ /dev/null @@ -1 +0,0 @@ -f55dccae8909110396882bd2c28be993eb32f33e880ed4a520d14071f70c9019
\ No newline at end of file diff --git a/db/schema_migrations/20200724100421 b/db/schema_migrations/20200724100421 deleted file mode 100644 index 93f92046c17..00000000000 --- a/db/schema_migrations/20200724100421 +++ /dev/null @@ -1 +0,0 @@ -77601e653f7b4f2740db87a7b19b64bb73fffbe4ce59c0f68b0bb65599da0eb3
\ No newline at end of file diff --git a/db/schema_migrations/20200724130639 b/db/schema_migrations/20200724130639 deleted file mode 100644 index 8a1ba4f6063..00000000000 --- a/db/schema_migrations/20200724130639 +++ /dev/null @@ -1 +0,0 @@ -9d711a0c4f785660c0a2317e598e427d5e2f91b177e4c0b96cef2958f787aa6e
\ No newline at end of file diff --git a/db/schema_migrations/20200727082309 b/db/schema_migrations/20200727082309 deleted file mode 100644 index 9d89a51f761..00000000000 --- a/db/schema_migrations/20200727082309 +++ /dev/null @@ -1 +0,0 @@ -72c7ca9e1284483e653d6d8dc16103f104502d7cd569cb3f7ab75e932807a661
\ No newline at end of file diff --git a/db/schema_migrations/20200727100631 b/db/schema_migrations/20200727100631 deleted file mode 100644 index aa724c13995..00000000000 --- a/db/schema_migrations/20200727100631 +++ /dev/null @@ -1 +0,0 @@ -83c1dca01d4e56c22f6c1cda249c9b162eb7c31e2b164629bf51ea9aa9dd8fb5
\ No newline at end of file diff --git a/db/schema_migrations/20200727114147 b/db/schema_migrations/20200727114147 deleted file mode 100644 index 21a5b79b8ea..00000000000 --- a/db/schema_migrations/20200727114147 +++ /dev/null @@ -1 +0,0 @@ -fd85556cfed27a08aa01a8ee5b4eecfb1de7011b2fcb5c613cf21b9f42e728b9
\ No newline at end of file diff --git a/db/schema_migrations/20200727142337 b/db/schema_migrations/20200727142337 deleted file mode 100644 index a14fefa51fa..00000000000 --- a/db/schema_migrations/20200727142337 +++ /dev/null @@ -1 +0,0 @@ -cc88f907caed6045ff2d8b0663a4b64e9d2633f213ffa85274b84c80eb32b94e
\ No newline at end of file diff --git a/db/schema_migrations/20200728080250 b/db/schema_migrations/20200728080250 deleted file mode 100644 index 137290c0e86..00000000000 --- a/db/schema_migrations/20200728080250 +++ /dev/null @@ -1 +0,0 @@ -546555a009e8923ea8b976ce38d882d387407fb03e7bbcb9c760df53bafd1f91
\ No newline at end of file diff --git a/db/schema_migrations/20200728163009 b/db/schema_migrations/20200728163009 deleted file mode 100644 index e2236ff61de..00000000000 --- a/db/schema_migrations/20200728163009 +++ /dev/null @@ -1 +0,0 @@ -6613f518079ead2259b4189c91d3507724af18d1cf9e2014fab9b7543ec3d423
\ No newline at end of file diff --git a/db/schema_migrations/20200728174137 b/db/schema_migrations/20200728174137 deleted file mode 100644 index 7863b7eb40b..00000000000 --- a/db/schema_migrations/20200728174137 +++ /dev/null @@ -1 +0,0 @@ -a16e7fdcc62f39af3038317cb39ffb4c35f41ae45f5de429f18837309739110b
\ No newline at end of file diff --git a/db/schema_migrations/20200728175710 b/db/schema_migrations/20200728175710 deleted file mode 100644 index 0ba117d0ead..00000000000 --- a/db/schema_migrations/20200728175710 +++ /dev/null @@ -1 +0,0 @@ -a3a6d4e488c9979efd61890a15fdfe4ccea044a0b030b392ad39885cc807f22d
\ No newline at end of file diff --git a/db/schema_migrations/20200728182311 b/db/schema_migrations/20200728182311 deleted file mode 100644 index 6bb5a869513..00000000000 --- a/db/schema_migrations/20200728182311 +++ /dev/null @@ -1 +0,0 @@ -2aab4599404312ddcc5bc9af11b0a21dfd6aa8aa10d4b4b5086a93ce1ffe77b6
\ No newline at end of file diff --git a/db/schema_migrations/20200729151021 b/db/schema_migrations/20200729151021 deleted file mode 100644 index 2ce06409ac4..00000000000 --- a/db/schema_migrations/20200729151021 +++ /dev/null @@ -1 +0,0 @@ -0a080250afe61007852cb65e8fd6cdccbdad1666abf12b59d46fb55ec0d455cc
\ No newline at end of file diff --git a/db/schema_migrations/20200729175935 b/db/schema_migrations/20200729175935 deleted file mode 100644 index 65aec146116..00000000000 --- a/db/schema_migrations/20200729175935 +++ /dev/null @@ -1 +0,0 @@ -5f841d2032b55f01e944c50070a6bb102883c2e4da7ba155fdcf2e90f3b68707
\ No newline at end of file diff --git a/db/schema_migrations/20200729180539 b/db/schema_migrations/20200729180539 deleted file mode 100644 index faffd8af926..00000000000 --- a/db/schema_migrations/20200729180539 +++ /dev/null @@ -1 +0,0 @@ -8b6b0179c7027f34390376e06472fa80daa7c13ee7fa6ea52f04fae430309fc7
\ No newline at end of file diff --git a/db/schema_migrations/20200729181641 b/db/schema_migrations/20200729181641 deleted file mode 100644 index 0d1d959c5a5..00000000000 --- a/db/schema_migrations/20200729181641 +++ /dev/null @@ -1 +0,0 @@ -5dc4cbfc6d7e79e5909e5250f382bc3c9fa4246b8f2aed81404899aee4eef81b
\ No newline at end of file diff --git a/db/schema_migrations/20200729191227 b/db/schema_migrations/20200729191227 deleted file mode 100644 index e7abca98976..00000000000 --- a/db/schema_migrations/20200729191227 +++ /dev/null @@ -1 +0,0 @@ -34d53fcb98b82f3da7eeacd7bfabfd4118b51c448418f20227f7d5b05a0077dc
\ No newline at end of file diff --git a/db/schema_migrations/20200729200808 b/db/schema_migrations/20200729200808 deleted file mode 100644 index 99431c08664..00000000000 --- a/db/schema_migrations/20200729200808 +++ /dev/null @@ -1 +0,0 @@ -a1a896fc3fe060b34da9cde46ac0ddb8b973d077bcae3bb36677f9d02d2a3509
\ No newline at end of file diff --git a/db/schema_migrations/20200729202222 b/db/schema_migrations/20200729202222 deleted file mode 100644 index 2ab73a764f3..00000000000 --- a/db/schema_migrations/20200729202222 +++ /dev/null @@ -1 +0,0 @@ -2976f459ac9cd0780e90077ebe4ce5ca8dc41e62b4dab1f96e39738624ad9d04
\ No newline at end of file diff --git a/db/schema_migrations/20200730044810 b/db/schema_migrations/20200730044810 deleted file mode 100644 index 0532199d8ec..00000000000 --- a/db/schema_migrations/20200730044810 +++ /dev/null @@ -1 +0,0 @@ -406594bc48558c3ad50680c7e1fa795f38abb92696acbb94ae2dfb13d8dcaf1a
\ No newline at end of file diff --git a/db/schema_migrations/20200730083043 b/db/schema_migrations/20200730083043 deleted file mode 100644 index d927b5204c9..00000000000 --- a/db/schema_migrations/20200730083043 +++ /dev/null @@ -1 +0,0 @@ -5bda9ae726077c1ea0df2158138f85ca43bfbf5b1a8cf3516bcdf012eac5c0b8
\ No newline at end of file diff --git a/db/schema_migrations/20200730131946 b/db/schema_migrations/20200730131946 deleted file mode 100644 index dc4e6f96917..00000000000 --- a/db/schema_migrations/20200730131946 +++ /dev/null @@ -1 +0,0 @@ -4ef0dfb9cdeccd57a3c11d1db0b57448746237d4a1fe001340575c996a6c3c68
\ No newline at end of file diff --git a/db/schema_migrations/20200730133730 b/db/schema_migrations/20200730133730 deleted file mode 100644 index db276e9606f..00000000000 --- a/db/schema_migrations/20200730133730 +++ /dev/null @@ -1 +0,0 @@ -bd1c0fd04b1a77492a125417a530ea0482c66330da3d2563c963c097e63b6b39
\ No newline at end of file diff --git a/db/schema_migrations/20200730210506 b/db/schema_migrations/20200730210506 deleted file mode 100644 index b140941092d..00000000000 --- a/db/schema_migrations/20200730210506 +++ /dev/null @@ -1 +0,0 @@ -85eb0a510cdb4b315aef1665f05ad3b93d5d39f4ddfe11ed5ddde63aa732f874
\ No newline at end of file diff --git a/db/schema_migrations/20200731085019 b/db/schema_migrations/20200731085019 deleted file mode 100644 index 55e35ff8f4a..00000000000 --- a/db/schema_migrations/20200731085019 +++ /dev/null @@ -1 +0,0 @@ -aeeef4762f7ab7c7eefc28995ba198825455a43db38c1ff2aefad8c3c76b5fba
\ No newline at end of file diff --git a/db/schema_migrations/20200731090553 b/db/schema_migrations/20200731090553 deleted file mode 100644 index d991f11eb02..00000000000 --- a/db/schema_migrations/20200731090553 +++ /dev/null @@ -1 +0,0 @@ -c5775e8150285927b74c2fbf6098d03920e7bea52c3b94ad372fec288835110c
\ No newline at end of file diff --git a/db/schema_migrations/20200731201408 b/db/schema_migrations/20200731201408 deleted file mode 100644 index 1f457761c90..00000000000 --- a/db/schema_migrations/20200731201408 +++ /dev/null @@ -1 +0,0 @@ -02f3561a5b8fa79c58dccc23ebaecf2c1b8371c86bb360156456bd11e84d13a2
\ No newline at end of file diff --git a/db/schema_migrations/20200731201834 b/db/schema_migrations/20200731201834 deleted file mode 100644 index 4c4630e54ad..00000000000 --- a/db/schema_migrations/20200731201834 +++ /dev/null @@ -1 +0,0 @@ -26aa28efa15ebd223feb879d5cb684a53a92bc71e483e8348d0cd9f1ad10e7ae
\ No newline at end of file diff --git a/db/schema_migrations/20200803111512 b/db/schema_migrations/20200803111512 deleted file mode 100644 index aa99ce35559..00000000000 --- a/db/schema_migrations/20200803111512 +++ /dev/null @@ -1 +0,0 @@ -d0ea5e75c74d8405014fe5be6906e21b009d9eddb8eaefea939a67e01ee146e7
\ No newline at end of file diff --git a/db/schema_migrations/20200803112806 b/db/schema_migrations/20200803112806 deleted file mode 100644 index 4f7962bfe49..00000000000 --- a/db/schema_migrations/20200803112806 +++ /dev/null @@ -1 +0,0 @@ -8e6ffd7b1d44ac846b79cf37798abc57eee169fbde0de096ea49df590af864b5
\ No newline at end of file diff --git a/db/schema_migrations/20200803125340 b/db/schema_migrations/20200803125340 deleted file mode 100644 index d1aed6435ce..00000000000 --- a/db/schema_migrations/20200803125340 +++ /dev/null @@ -1 +0,0 @@ -78a33c142b6182749291ad963397dcda8efe5fe421381612801e5ccd34267326
\ No newline at end of file diff --git a/db/schema_migrations/20200804035230 b/db/schema_migrations/20200804035230 deleted file mode 100644 index 02aa4ffb366..00000000000 --- a/db/schema_migrations/20200804035230 +++ /dev/null @@ -1 +0,0 @@ -f1e2f11710ca7175b7a77b0f52bd204403dfcfd0b6b33cd00e3fa0d020be1287
\ No newline at end of file diff --git a/db/schema_migrations/20200804041018 b/db/schema_migrations/20200804041018 deleted file mode 100644 index 63c13e6b5d8..00000000000 --- a/db/schema_migrations/20200804041018 +++ /dev/null @@ -1 +0,0 @@ -ac65340525eba0cd025be706dde4deaf4574f8a7ffb9531d56ffae707e7e8b6d
\ No newline at end of file diff --git a/db/schema_migrations/20200804041930 b/db/schema_migrations/20200804041930 deleted file mode 100644 index f67f8079847..00000000000 --- a/db/schema_migrations/20200804041930 +++ /dev/null @@ -1 +0,0 @@ -3177e2f9549add35789e64b14c5958c4fb42fdce4b4705505bc9bbe326d9a875
\ No newline at end of file diff --git a/db/schema_migrations/20200804222543 b/db/schema_migrations/20200804222543 deleted file mode 100644 index d8c99e51bff..00000000000 --- a/db/schema_migrations/20200804222543 +++ /dev/null @@ -1 +0,0 @@ -21c35b7712ed1933537115a74571904c74b3d61b424b9f954c3ad36e0d1bf139
\ No newline at end of file diff --git a/db/schema_migrations/20200805071842 b/db/schema_migrations/20200805071842 deleted file mode 100644 index 75810bed0d1..00000000000 --- a/db/schema_migrations/20200805071842 +++ /dev/null @@ -1 +0,0 @@ -432ef9d45c8242ab8db954ceeb6a68a75ef46181dd868a30d68fef0ed6058caf
\ No newline at end of file diff --git a/db/schema_migrations/20200805150316 b/db/schema_migrations/20200805150316 deleted file mode 100644 index d7560ecc376..00000000000 --- a/db/schema_migrations/20200805150316 +++ /dev/null @@ -1 +0,0 @@ -983fa89c574e41a7d38eb558779f46d6d42aee5fba92f4185307e1508c401298
\ No newline at end of file diff --git a/db/schema_migrations/20200805151001 b/db/schema_migrations/20200805151001 deleted file mode 100644 index 54c569efbdc..00000000000 --- a/db/schema_migrations/20200805151001 +++ /dev/null @@ -1 +0,0 @@ -8fdb1e994ca7a28f7e061fb80cf210c482bafbe2bd0dc19c631c8fe9e0e2bbaf
\ No newline at end of file diff --git a/db/schema_migrations/20200805151726 b/db/schema_migrations/20200805151726 deleted file mode 100644 index 677f44c6380..00000000000 --- a/db/schema_migrations/20200805151726 +++ /dev/null @@ -1 +0,0 @@ -e992135d6a4d10224b7e3deb304790735b6a35b5fb320670f9a7029e2924efb5
\ No newline at end of file diff --git a/db/schema_migrations/20200805152108 b/db/schema_migrations/20200805152108 deleted file mode 100644 index 34522de208c..00000000000 --- a/db/schema_migrations/20200805152108 +++ /dev/null @@ -1 +0,0 @@ -3976a084df88d7b6008a1d115d9c23d9c9084567c2cc5f1ddf68eaf1dc58ef3f
\ No newline at end of file diff --git a/db/schema_migrations/20200806004232 b/db/schema_migrations/20200806004232 deleted file mode 100644 index 840238684f9..00000000000 --- a/db/schema_migrations/20200806004232 +++ /dev/null @@ -1 +0,0 @@ -4b1f048dfaea1887b20fdc421a08ab6206ab9944201e6517e808b27214be926c
\ No newline at end of file diff --git a/db/schema_migrations/20200806004742 b/db/schema_migrations/20200806004742 deleted file mode 100644 index fb6d9d49acf..00000000000 --- a/db/schema_migrations/20200806004742 +++ /dev/null @@ -1 +0,0 @@ -acc9d1ab79e277e55910b17c5653088721371fa12b2cf1a5677035fe3b422fc8
\ No newline at end of file diff --git a/db/schema_migrations/20200806172909 b/db/schema_migrations/20200806172909 deleted file mode 100644 index 44cc78808d5..00000000000 --- a/db/schema_migrations/20200806172909 +++ /dev/null @@ -1 +0,0 @@ -b05401408faabafa4c2ef5fd241fea88f78fd423a3c462be89ccdbd8d988cfc8
\ No newline at end of file diff --git a/db/schema_migrations/20200806173633 b/db/schema_migrations/20200806173633 deleted file mode 100644 index a0be6d39ece..00000000000 --- a/db/schema_migrations/20200806173633 +++ /dev/null @@ -1 +0,0 @@ -5467b9c38186a30d333d9ccff0aeb4a06f97f17fec12488aca5e0a619b11831b
\ No newline at end of file diff --git a/db/schema_migrations/20200807070820 b/db/schema_migrations/20200807070820 deleted file mode 100644 index 61a886c4ce5..00000000000 --- a/db/schema_migrations/20200807070820 +++ /dev/null @@ -1 +0,0 @@ -a1fb6b5d486eee27aaed5083aa6340073bf05abab8f201fd9097374dbd345b90
\ No newline at end of file diff --git a/db/schema_migrations/20200807110237 b/db/schema_migrations/20200807110237 deleted file mode 100644 index fd02f50cdff..00000000000 --- a/db/schema_migrations/20200807110237 +++ /dev/null @@ -1 +0,0 @@ -5aeb0e74859df14e460b39b9f070624a02278c13b1da9393e1671b4c79635f52
\ No newline at end of file diff --git a/db/schema_migrations/20200807132726 b/db/schema_migrations/20200807132726 deleted file mode 100644 index a74b1ab23b6..00000000000 --- a/db/schema_migrations/20200807132726 +++ /dev/null @@ -1 +0,0 @@ -867cea94f966c1ad3d9e02f7fa5b641ceac5a71667426330c2c96d6181164f66
\ No newline at end of file diff --git a/db/schema_migrations/20200807150937 b/db/schema_migrations/20200807150937 deleted file mode 100644 index 8123db278a8..00000000000 --- a/db/schema_migrations/20200807150937 +++ /dev/null @@ -1 +0,0 @@ -fdb18abe24003a75c76019fccf5ca0aa65a900bc2a86eb578012bc5a032730cf
\ No newline at end of file diff --git a/db/schema_migrations/20200807152315 b/db/schema_migrations/20200807152315 deleted file mode 100644 index 2256313368c..00000000000 --- a/db/schema_migrations/20200807152315 +++ /dev/null @@ -1 +0,0 @@ -5152e094538b498fbe28f3fd11f6c1b9a9c77dc89ac0079cb39a6090a567db68
\ No newline at end of file diff --git a/db/schema_migrations/20200808221641 b/db/schema_migrations/20200808221641 deleted file mode 100644 index 05e3769247e..00000000000 --- a/db/schema_migrations/20200808221641 +++ /dev/null @@ -1 +0,0 @@ -a24aa5052d37bff1bffc5df076d8422ea90f3781ae01ecf626bc59f3e299c90b
\ No newline at end of file diff --git a/db/schema_migrations/20200809221641 b/db/schema_migrations/20200809221641 deleted file mode 100644 index 4e43680663a..00000000000 --- a/db/schema_migrations/20200809221641 +++ /dev/null @@ -1 +0,0 @@ -4e360aa1b375e391ec1202f1fe2eb26d64895faf326ec9c7a9b8d8351b6f4dc3
\ No newline at end of file diff --git a/db/schema_migrations/20200810100921 b/db/schema_migrations/20200810100921 deleted file mode 100644 index 14dc5a41721..00000000000 --- a/db/schema_migrations/20200810100921 +++ /dev/null @@ -1 +0,0 @@ -fe96df46a5f360cafe8f9816c6dfc2d00afdcf458fb38ace37ce59999dba2413
\ No newline at end of file diff --git a/db/schema_migrations/20200810101029 b/db/schema_migrations/20200810101029 deleted file mode 100644 index 59e0a236f3c..00000000000 --- a/db/schema_migrations/20200810101029 +++ /dev/null @@ -1 +0,0 @@ -8bb03ea2ded957a41aa1efd60a9908a3c597aaaade9190f8f1515bfd2ab9a282
\ No newline at end of file diff --git a/db/schema_migrations/20200810152043 b/db/schema_migrations/20200810152043 deleted file mode 100644 index 2b20ae9fdf1..00000000000 --- a/db/schema_migrations/20200810152043 +++ /dev/null @@ -1 +0,0 @@ -d459b160ae86f035509e382c12b76fdd441f58e0838a983471326a750a48e9fd
\ No newline at end of file diff --git a/db/schema_migrations/20200810160355 b/db/schema_migrations/20200810160355 deleted file mode 100644 index 7e2ea4d495d..00000000000 --- a/db/schema_migrations/20200810160355 +++ /dev/null @@ -1 +0,0 @@ -b5400a5e292f793986b102c7ddd0df8c7c5a7704b5121086a87792f7cdd0a2aa
\ No newline at end of file diff --git a/db/schema_migrations/20200810191256 b/db/schema_migrations/20200810191256 deleted file mode 100644 index c768252a228..00000000000 --- a/db/schema_migrations/20200810191256 +++ /dev/null @@ -1 +0,0 @@ -66653e275889da8e695843f648af36c8a4e275b4d3215119eab4942db1b4b823
\ No newline at end of file diff --git a/db/schema_migrations/20200811055018 b/db/schema_migrations/20200811055018 deleted file mode 100644 index abf090f8281..00000000000 --- a/db/schema_migrations/20200811055018 +++ /dev/null @@ -1 +0,0 @@ -b7477fbcba166d848e3b1bd7f4a184f50f3b2fafe80bfcf44fd6f4f9979ffcb7
\ No newline at end of file diff --git a/db/schema_migrations/20200811130000 b/db/schema_migrations/20200811130000 deleted file mode 100644 index a7df459c416..00000000000 --- a/db/schema_migrations/20200811130000 +++ /dev/null @@ -1 +0,0 @@ -36d3db5618a56a0ea03272563fe254590d6af1f7d2610a1f01a5054b1cda1a7d
\ No newline at end of file diff --git a/db/schema_migrations/20200811130433 b/db/schema_migrations/20200811130433 deleted file mode 100644 index 303468e8949..00000000000 --- a/db/schema_migrations/20200811130433 +++ /dev/null @@ -1 +0,0 @@ -e8fc0809b5bd3248dc625602deeaaef16e2db6b33d8eaf51fdcc1c67dee49e17
\ No newline at end of file diff --git a/db/schema_migrations/20200811154630 b/db/schema_migrations/20200811154630 deleted file mode 100644 index 0498382ef2e..00000000000 --- a/db/schema_migrations/20200811154630 +++ /dev/null @@ -1 +0,0 @@ -c04fe7e1a56bdcd41b5e1af346f9bfcae170d601954c4a0bcfcc9aea19d55528
\ No newline at end of file diff --git a/db/schema_migrations/20200811154631 b/db/schema_migrations/20200811154631 deleted file mode 100644 index 1817460cd30..00000000000 --- a/db/schema_migrations/20200811154631 +++ /dev/null @@ -1 +0,0 @@ -0ce17a8ad6c5ca5bba49ff522fede400fe6666490157af123ad98a7643f3ce01
\ No newline at end of file diff --git a/db/schema_migrations/20200811154632 b/db/schema_migrations/20200811154632 deleted file mode 100644 index bb1167e3182..00000000000 --- a/db/schema_migrations/20200811154632 +++ /dev/null @@ -1 +0,0 @@ -523f200c635e37ee1ac52257ffd45443a3e17bfe993d22775a5377865e044a46
\ No newline at end of file diff --git a/db/schema_migrations/20200811194848 b/db/schema_migrations/20200811194848 deleted file mode 100644 index e1e9ad01ee8..00000000000 --- a/db/schema_migrations/20200811194848 +++ /dev/null @@ -1 +0,0 @@ -c45bbd5aa9143e039d41448f1cb4a2e8e0a7b2c165b50e89b1b829bbbe81f137
\ No newline at end of file diff --git a/db/schema_migrations/20200811211536 b/db/schema_migrations/20200811211536 deleted file mode 100644 index 1bd013900a3..00000000000 --- a/db/schema_migrations/20200811211536 +++ /dev/null @@ -1 +0,0 @@ -d4ea24092289f6dba294c502b8ce89748165973fb2d7989fa7615433599a0c0c
\ No newline at end of file diff --git a/db/schema_migrations/20200812112204 b/db/schema_migrations/20200812112204 deleted file mode 100644 index 34ed55dc045..00000000000 --- a/db/schema_migrations/20200812112204 +++ /dev/null @@ -1 +0,0 @@ -4fb7fda59db193250ca393cae5561fa52d61e025bb93b10829f114ac7fef4cfa
\ No newline at end of file diff --git a/db/schema_migrations/20200812150810 b/db/schema_migrations/20200812150810 deleted file mode 100644 index b5e6ce89ee4..00000000000 --- a/db/schema_migrations/20200812150810 +++ /dev/null @@ -1 +0,0 @@ -a48d2b0ae00630775a3385aab6b6ae7ac5ebc999228605293c2e824c3651b7da
\ No newline at end of file diff --git a/db/schema_migrations/20200812150811 b/db/schema_migrations/20200812150811 deleted file mode 100644 index 08f760c8325..00000000000 --- a/db/schema_migrations/20200812150811 +++ /dev/null @@ -1 +0,0 @@ -a7e650ffb9db2068168b486f8cb27c6bcdaad3682309e7c7df7e3c24c34c0498
\ No newline at end of file diff --git a/db/schema_migrations/20200812150812 b/db/schema_migrations/20200812150812 deleted file mode 100644 index df4035363f6..00000000000 --- a/db/schema_migrations/20200812150812 +++ /dev/null @@ -1 +0,0 @@ -d51302497aafd672954e1ea7613e33036fd3a083f4b0f349b3710058f1db0810
\ No newline at end of file diff --git a/db/schema_migrations/20200813135558 b/db/schema_migrations/20200813135558 deleted file mode 100644 index 319f0a0b604..00000000000 --- a/db/schema_migrations/20200813135558 +++ /dev/null @@ -1 +0,0 @@ -5f7a5fa697d769f5ccc9f0a6f19a91c8935f2559e019d50895574819494baf7e
\ No newline at end of file diff --git a/db/schema_migrations/20200813143304 b/db/schema_migrations/20200813143304 deleted file mode 100644 index 7c6f8560e65..00000000000 --- a/db/schema_migrations/20200813143304 +++ /dev/null @@ -1 +0,0 @@ -12bb243862adf930fc68f2f7641ee7cc6170bfbcc3aae2b98bfa262dacfeba49
\ No newline at end of file diff --git a/db/schema_migrations/20200813143356 b/db/schema_migrations/20200813143356 deleted file mode 100644 index bffd3f45ba7..00000000000 --- a/db/schema_migrations/20200813143356 +++ /dev/null @@ -1 +0,0 @@ -7c4fec044a278fa51fdd23320a372528c420e8a650a26770fccf0cabe91163c5
\ No newline at end of file diff --git a/db/schema_migrations/20200813153434 b/db/schema_migrations/20200813153434 deleted file mode 100644 index ca7c154abb7..00000000000 --- a/db/schema_migrations/20200813153434 +++ /dev/null @@ -1 +0,0 @@ -23de9421726337f5279bf434542bffda24cbadc7324b498ff642ec4c0883b5d5
\ No newline at end of file diff --git a/db/schema_migrations/20200816133024 b/db/schema_migrations/20200816133024 deleted file mode 100644 index 1637f166857..00000000000 --- a/db/schema_migrations/20200816133024 +++ /dev/null @@ -1 +0,0 @@ -37196d54d03791f7509e411d5c545f22aa70f7c07d1f13d76f70008a06e72b57
\ No newline at end of file diff --git a/db/schema_migrations/20200817070126 b/db/schema_migrations/20200817070126 deleted file mode 100644 index 8473e46982d..00000000000 --- a/db/schema_migrations/20200817070126 +++ /dev/null @@ -1 +0,0 @@ -6776d7a401c1c56bd64a5585d123ba5aaba612348d66d4f8704530c5e8cc4f2d
\ No newline at end of file diff --git a/db/schema_migrations/20200817100710 b/db/schema_migrations/20200817100710 deleted file mode 100644 index 8062c3d46e4..00000000000 --- a/db/schema_migrations/20200817100710 +++ /dev/null @@ -1 +0,0 @@ -87d3529596f5b5adff7280be7c60e4ff290dd05c500bbeb00cda0ac5da6239e0
\ No newline at end of file diff --git a/db/schema_migrations/20200817142800 b/db/schema_migrations/20200817142800 deleted file mode 100644 index d6db856dac4..00000000000 --- a/db/schema_migrations/20200817142800 +++ /dev/null @@ -1 +0,0 @@ -b488cd2049300b293f584f193edc5435855f7bc85989648a3310dabc609d0af4
\ No newline at end of file diff --git a/db/schema_migrations/20200817195628 b/db/schema_migrations/20200817195628 deleted file mode 100644 index 7d919242d89..00000000000 --- a/db/schema_migrations/20200817195628 +++ /dev/null @@ -1 +0,0 @@ -4da25ee40eabd81765b562929c819da1fc2b0f8afe1f4eefe6b769fcd8f0d4cd
\ No newline at end of file diff --git a/db/schema_migrations/20200818052219 b/db/schema_migrations/20200818052219 deleted file mode 100644 index 1df09a53ca4..00000000000 --- a/db/schema_migrations/20200818052219 +++ /dev/null @@ -1 +0,0 @@ -94b494b5f8e351cf453699debf03aa28f8a9136c829cb7410c90590b5106cdd5
\ No newline at end of file diff --git a/db/schema_migrations/20200818092401 b/db/schema_migrations/20200818092401 deleted file mode 100644 index 916b5421e70..00000000000 --- a/db/schema_migrations/20200818092401 +++ /dev/null @@ -1 +0,0 @@ -39d412a1680d55466c14450943e17802eb183f2f33f2f77078cba571262cd149
\ No newline at end of file diff --git a/db/schema_migrations/20200818171229 b/db/schema_migrations/20200818171229 deleted file mode 100644 index 91470670c26..00000000000 --- a/db/schema_migrations/20200818171229 +++ /dev/null @@ -1 +0,0 @@ -987f316571f41ad679cad54089bc523f62d04691c10e5cf1957cf60edd71f889
\ No newline at end of file diff --git a/db/schema_migrations/20200819082334 b/db/schema_migrations/20200819082334 deleted file mode 100644 index 28d83ca820d..00000000000 --- a/db/schema_migrations/20200819082334 +++ /dev/null @@ -1 +0,0 @@ -c12f3f5b76e1065867682216348dd95c22d605c30ae54615f2596b1d84aad199
\ No newline at end of file diff --git a/db/schema_migrations/20200819113644 b/db/schema_migrations/20200819113644 deleted file mode 100644 index 2208ad26134..00000000000 --- a/db/schema_migrations/20200819113644 +++ /dev/null @@ -1 +0,0 @@ -19c90689d0af6adb017dbd7127c6cd147d9c92581118dbfd99c87bc6a6dda3be
\ No newline at end of file diff --git a/db/schema_migrations/20200819192143 b/db/schema_migrations/20200819192143 deleted file mode 100644 index e0934e15f1f..00000000000 --- a/db/schema_migrations/20200819192143 +++ /dev/null @@ -1 +0,0 @@ -5a5278fdd9539d33a6de226a84ed39b7c5a26929cec68ec5e8d193afb3cfafa2
\ No newline at end of file diff --git a/db/schema_migrations/20200819202048 b/db/schema_migrations/20200819202048 deleted file mode 100644 index a5428c7b40a..00000000000 --- a/db/schema_migrations/20200819202048 +++ /dev/null @@ -1 +0,0 @@ -476bce9b18177f37b31e15d42f5a1391c0bfbbd312a513c1d5b43085b90afb3e
\ No newline at end of file diff --git a/db/schema_migrations/20200819202222 b/db/schema_migrations/20200819202222 deleted file mode 100644 index f633502d0bb..00000000000 --- a/db/schema_migrations/20200819202222 +++ /dev/null @@ -1 +0,0 @@ -5e2dfdf725ad0a3d90b240ced74cf5a872f7126b716847f9f9e99b4ad2a22109
\ No newline at end of file diff --git a/db/schema_migrations/20200820105408 b/db/schema_migrations/20200820105408 deleted file mode 100644 index 647a86797dd..00000000000 --- a/db/schema_migrations/20200820105408 +++ /dev/null @@ -1 +0,0 @@ -e21ae06853e3a071669fa8e9ed2638f0e7854813bc5a1639b31ad6edb50f6427
\ No newline at end of file diff --git a/db/schema_migrations/20200820130839 b/db/schema_migrations/20200820130839 deleted file mode 100644 index e372e4df2be..00000000000 --- a/db/schema_migrations/20200820130839 +++ /dev/null @@ -1 +0,0 @@ -751a2c8e06b522b1564ea09f961d8883543a631874ae26bb14c98b7b442d59cc
\ No newline at end of file diff --git a/db/schema_migrations/20200820204041 b/db/schema_migrations/20200820204041 deleted file mode 100644 index 43e564a759d..00000000000 --- a/db/schema_migrations/20200820204041 +++ /dev/null @@ -1 +0,0 @@ -ce4d108c6587943ab3740dcc39298d6877d7317ec1023d8d263cecd9f1e0f478
\ No newline at end of file diff --git a/db/schema_migrations/20200821034419 b/db/schema_migrations/20200821034419 deleted file mode 100644 index 56ede8eff69..00000000000 --- a/db/schema_migrations/20200821034419 +++ /dev/null @@ -1 +0,0 @@ -ddf3452bb44437324d20c9db03e998f8903f5ff9732d29cf85dd5d579507952d
\ No newline at end of file diff --git a/db/schema_migrations/20200821194920 b/db/schema_migrations/20200821194920 deleted file mode 100644 index b681c3269c3..00000000000 --- a/db/schema_migrations/20200821194920 +++ /dev/null @@ -1 +0,0 @@ -d92cdef33a892fdd1761d9491bc8e4c782e9db348d4a6848a1470e99e644fbfd
\ No newline at end of file diff --git a/db/schema_migrations/20200821224343 b/db/schema_migrations/20200821224343 deleted file mode 100644 index 63a2144dc9d..00000000000 --- a/db/schema_migrations/20200821224343 +++ /dev/null @@ -1 +0,0 @@ -f5f7cfe4a8f42a7116ecf50230df2705135bea4e5fd4c75512bb9ca15867919b
\ No newline at end of file diff --git a/db/schema_migrations/20200824045812 b/db/schema_migrations/20200824045812 deleted file mode 100644 index c628ca3eb18..00000000000 --- a/db/schema_migrations/20200824045812 +++ /dev/null @@ -1 +0,0 @@ -4f3528d7df6e61c8b14911644f9223ac5f6e678184d1c8370d1e9a60389cd60c
\ No newline at end of file diff --git a/db/schema_migrations/20200824124623 b/db/schema_migrations/20200824124623 deleted file mode 100644 index 367de6bda2e..00000000000 --- a/db/schema_migrations/20200824124623 +++ /dev/null @@ -1 +0,0 @@ -b8fcbdab769758753efae992e64bed7f79149c74f08294035a48a03c59bb1c5d
\ No newline at end of file diff --git a/db/schema_migrations/20200824130028 b/db/schema_migrations/20200824130028 deleted file mode 100644 index 961a11848c9..00000000000 --- a/db/schema_migrations/20200824130028 +++ /dev/null @@ -1 +0,0 @@ -891f1660592c4443aeced7594cea391066cc79b54b40c67a8c973eb6959bf6f1
\ No newline at end of file diff --git a/db/schema_migrations/20200824130447 b/db/schema_migrations/20200824130447 deleted file mode 100644 index 901d79466b6..00000000000 --- a/db/schema_migrations/20200824130447 +++ /dev/null @@ -1 +0,0 @@ -e6dcd20fe77c443999aa2373e0acdd77eb68c3a6f0d6d65e86b7f85ac97ddb9a
\ No newline at end of file diff --git a/db/schema_migrations/20200825071735 b/db/schema_migrations/20200825071735 deleted file mode 100644 index fe108bfb9cf..00000000000 --- a/db/schema_migrations/20200825071735 +++ /dev/null @@ -1 +0,0 @@ -cd8574318fae1f2bb021b53d4e453c6b64c763f0e7cc8836cdb8b12963ff0e18
\ No newline at end of file diff --git a/db/schema_migrations/20200825081025 b/db/schema_migrations/20200825081025 deleted file mode 100644 index db869574f35..00000000000 --- a/db/schema_migrations/20200825081025 +++ /dev/null @@ -1 +0,0 @@ -1ee7ae93dde7099f78cd6218b5419a34b2cfebe196521bcbee1583e31f19ffda
\ No newline at end of file diff --git a/db/schema_migrations/20200825081035 b/db/schema_migrations/20200825081035 deleted file mode 100644 index 45bdfd00bf0..00000000000 --- a/db/schema_migrations/20200825081035 +++ /dev/null @@ -1 +0,0 @@ -26fe286e565f776f64ae8b6b0ad91ef1d3bf2195384f44f8b093a1b66ee0d05d
\ No newline at end of file diff --git a/db/schema_migrations/20200825081045 b/db/schema_migrations/20200825081045 deleted file mode 100644 index 67273493881..00000000000 --- a/db/schema_migrations/20200825081045 +++ /dev/null @@ -1 +0,0 @@ -deb88efebc989a014b6ecaca4a91624d1b21f34c85cbf6d3460363f1b498b427
\ No newline at end of file diff --git a/db/schema_migrations/20200825081055 b/db/schema_migrations/20200825081055 deleted file mode 100644 index 7694c97bf9d..00000000000 --- a/db/schema_migrations/20200825081055 +++ /dev/null @@ -1 +0,0 @@ -8fc437f09321cfe29262075009bce6f7b0047c2291df4a29bcc304c6dd54d27d
\ No newline at end of file diff --git a/db/schema_migrations/20200825084819 b/db/schema_migrations/20200825084819 deleted file mode 100644 index 0ce9dbf863c..00000000000 --- a/db/schema_migrations/20200825084819 +++ /dev/null @@ -1 +0,0 @@ -d5e81848257b3391d99b198b177531a4c190ca6f19b27c9aedaa931f6eb3165a
\ No newline at end of file diff --git a/db/schema_migrations/20200825154237 b/db/schema_migrations/20200825154237 deleted file mode 100644 index 5f56cf2d631..00000000000 --- a/db/schema_migrations/20200825154237 +++ /dev/null @@ -1 +0,0 @@ -ff41fa940a0a5c3627dfec22ed4e704d6edc534edf30883a36aa454210bb3d43
\ No newline at end of file diff --git a/db/schema_migrations/20200825180050 b/db/schema_migrations/20200825180050 deleted file mode 100644 index 0e2e9220740..00000000000 --- a/db/schema_migrations/20200825180050 +++ /dev/null @@ -1 +0,0 @@ -330340ef4d525e1e13ed28d71d23594627453955ce5f810e370d07bb3623bf35
\ No newline at end of file diff --git a/db/schema_migrations/20200826053152 b/db/schema_migrations/20200826053152 deleted file mode 100644 index 26cf99ee7f2..00000000000 --- a/db/schema_migrations/20200826053152 +++ /dev/null @@ -1 +0,0 @@ -d7dd6ef7c39576988d1efd7bb179f75e3104fc8058a671e47c7b68ba2ddc9ba8
\ No newline at end of file diff --git a/db/schema_migrations/20200826073745 b/db/schema_migrations/20200826073745 deleted file mode 100644 index 0200c7bc66a..00000000000 --- a/db/schema_migrations/20200826073745 +++ /dev/null @@ -1 +0,0 @@ -d3b15469120ed213363de33a4b268ed71a710c40f02d4a669edf2c5412907209
\ No newline at end of file diff --git a/db/schema_migrations/20200826092324 b/db/schema_migrations/20200826092324 deleted file mode 100644 index 8745b628965..00000000000 --- a/db/schema_migrations/20200826092324 +++ /dev/null @@ -1 +0,0 @@ -35c37b8dcdca08d48086dc8164c2f6a69f563366ec9bce1f60299978a94de9bc
\ No newline at end of file diff --git a/db/schema_migrations/20200826121552 b/db/schema_migrations/20200826121552 deleted file mode 100644 index e794680240a..00000000000 --- a/db/schema_migrations/20200826121552 +++ /dev/null @@ -1 +0,0 @@ -8667c30042b19428b97e0995821c183e69f73394503c83a55ba7bd870df7c3e8
\ No newline at end of file diff --git a/db/schema_migrations/20200826212800 b/db/schema_migrations/20200826212800 deleted file mode 100644 index 3eaae5c48c8..00000000000 --- a/db/schema_migrations/20200826212800 +++ /dev/null @@ -1 +0,0 @@ -360c42f4d34c3b03e7a0375a0ff2776f066888f0a40131180bf301b876ea58db
\ No newline at end of file diff --git a/db/schema_migrations/20200826220745 b/db/schema_migrations/20200826220745 deleted file mode 100644 index 39134fb6223..00000000000 --- a/db/schema_migrations/20200826220745 +++ /dev/null @@ -1 +0,0 @@ -ee38dd60087a8879c4686214da1d25a60ab74306eb07b938efb1a8dfc46cc73a
\ No newline at end of file diff --git a/db/schema_migrations/20200826220746 b/db/schema_migrations/20200826220746 deleted file mode 100644 index 1ff87e8df6d..00000000000 --- a/db/schema_migrations/20200826220746 +++ /dev/null @@ -1 +0,0 @@ -2564c387b727e557b2988996aa533ba5e4e6d7b01515407bd2692c09644ac2be
\ No newline at end of file diff --git a/db/schema_migrations/20200827005322 b/db/schema_migrations/20200827005322 deleted file mode 100644 index 23ae58e766c..00000000000 --- a/db/schema_migrations/20200827005322 +++ /dev/null @@ -1 +0,0 @@ -f4f1efcc93476a1d70add93e166f4c702ad7dfc97ad29c3455722fd98824498f
\ No newline at end of file diff --git a/db/schema_migrations/20200827060911 b/db/schema_migrations/20200827060911 deleted file mode 100644 index a93302067cd..00000000000 --- a/db/schema_migrations/20200827060911 +++ /dev/null @@ -1 +0,0 @@ -124f6ba79f71e2de510741b22d3dd5cf15378b5476c759484bd814377a644256
\ No newline at end of file diff --git a/db/schema_migrations/20200827060932 b/db/schema_migrations/20200827060932 deleted file mode 100644 index af7d00f21f2..00000000000 --- a/db/schema_migrations/20200827060932 +++ /dev/null @@ -1 +0,0 @@ -ba2e32b4836062631308937023470d31b3f808b468999ba15374c3b953377402
\ No newline at end of file diff --git a/db/schema_migrations/20200827085101 b/db/schema_migrations/20200827085101 deleted file mode 100644 index 930e0176a52..00000000000 --- a/db/schema_migrations/20200827085101 +++ /dev/null @@ -1 +0,0 @@ -bdcfd7dbccc73d6e2754d67bf099cc2dd2b919e4125cec47e853ff91911cc82e
\ No newline at end of file diff --git a/db/schema_migrations/20200827102234 b/db/schema_migrations/20200827102234 deleted file mode 100644 index 8f5656a92c6..00000000000 --- a/db/schema_migrations/20200827102234 +++ /dev/null @@ -1 +0,0 @@ -d38ef8ccd627e70adf0dd9ac8161235e21afccbc59f1e8d95f379f66eb84630e
\ No newline at end of file diff --git a/db/schema_migrations/20200827104432 b/db/schema_migrations/20200827104432 deleted file mode 100644 index 351974f884b..00000000000 --- a/db/schema_migrations/20200827104432 +++ /dev/null @@ -1 +0,0 @@ -99d95dea0dbb10bcaca5515c144c7fcd1e365e69be5eded223379bf61df69bc3
\ No newline at end of file diff --git a/db/schema_migrations/20200827114902 b/db/schema_migrations/20200827114902 deleted file mode 100644 index 769a0a56b4b..00000000000 --- a/db/schema_migrations/20200827114902 +++ /dev/null @@ -1 +0,0 @@ -f581bd5f5ec26dc33643c77fb8c7a64a9053b55c3f6a7281fea89ac4790a58d2
\ No newline at end of file diff --git a/db/schema_migrations/20200827142811 b/db/schema_migrations/20200827142811 deleted file mode 100644 index c1edecb9575..00000000000 --- a/db/schema_migrations/20200827142811 +++ /dev/null @@ -1 +0,0 @@ -0e2b3433577946177876f14ec414a1653c1edeaa796eea24f12740958f964442
\ No newline at end of file diff --git a/db/schema_migrations/20200827150057 b/db/schema_migrations/20200827150057 deleted file mode 100644 index 31a7d2e3f2e..00000000000 --- a/db/schema_migrations/20200827150057 +++ /dev/null @@ -1 +0,0 @@ -85b7ffba53c9cec30e9778dd806277ca8e9877c9a18dc1d6004402c0e66b8ef1
\ No newline at end of file diff --git a/db/schema_migrations/20200828155134 b/db/schema_migrations/20200828155134 deleted file mode 100644 index f622a308fcc..00000000000 --- a/db/schema_migrations/20200828155134 +++ /dev/null @@ -1 +0,0 @@ -b3ee994231a8da694dbcda227b37e19a2112be666648d918425b064ec19d239e
\ No newline at end of file diff --git a/db/schema_migrations/20200828155205 b/db/schema_migrations/20200828155205 deleted file mode 100644 index d864c122afa..00000000000 --- a/db/schema_migrations/20200828155205 +++ /dev/null @@ -1 +0,0 @@ -b575558752206149171a05231e4167e1ac3e1295f76d800edfe3d61c1b996b52
\ No newline at end of file diff --git a/db/schema_migrations/20200830201204 b/db/schema_migrations/20200830201204 deleted file mode 100644 index 370640eb119..00000000000 --- a/db/schema_migrations/20200830201204 +++ /dev/null @@ -1 +0,0 @@ -1e8dd4542b13009b748d352933a4a59fcabb31e916226fcbf87043396f94e09f
\ No newline at end of file diff --git a/db/schema_migrations/20200831065320 b/db/schema_migrations/20200831065320 deleted file mode 100644 index 127a6a18d9d..00000000000 --- a/db/schema_migrations/20200831065320 +++ /dev/null @@ -1 +0,0 @@ -3e704cf329786e89f43fdefbc6a91272bebc6af5653dd83b5a81567937f75752
\ No newline at end of file diff --git a/db/schema_migrations/20200831065322 b/db/schema_migrations/20200831065322 deleted file mode 100644 index ab56be867e8..00000000000 --- a/db/schema_migrations/20200831065322 +++ /dev/null @@ -1 +0,0 @@ -4cb28d6da005682bb077427f4f544996065e86f0e76d5de98fc1761555a0535b
\ No newline at end of file diff --git a/db/schema_migrations/20200831065705 b/db/schema_migrations/20200831065705 deleted file mode 100644 index 385a9511d91..00000000000 --- a/db/schema_migrations/20200831065705 +++ /dev/null @@ -1 +0,0 @@ -c1457272bd8f0055992df5d4a8ba1a62cb74d3af3fff25447b3abd2eb090841e
\ No newline at end of file diff --git a/db/schema_migrations/20200831074356 b/db/schema_migrations/20200831074356 deleted file mode 100644 index cea1905fd1b..00000000000 --- a/db/schema_migrations/20200831074356 +++ /dev/null @@ -1 +0,0 @@ -8605268a026d4c66653008bb051c567c251044232b925b89f4407f9ad70f639c
\ No newline at end of file diff --git a/db/schema_migrations/20200831204646 b/db/schema_migrations/20200831204646 deleted file mode 100644 index ff4f71e8fc7..00000000000 --- a/db/schema_migrations/20200831204646 +++ /dev/null @@ -1 +0,0 @@ -06e87d83d5520e6ffbfb839d15a6dd02ad2caf5737136441d496e29e03a07e64
\ No newline at end of file diff --git a/db/schema_migrations/20200831222347 b/db/schema_migrations/20200831222347 deleted file mode 100644 index 6a01ea5cdc3..00000000000 --- a/db/schema_migrations/20200831222347 +++ /dev/null @@ -1 +0,0 @@ -00af22b19af29b453f0022ded835bd9246c602c63a04a51ef93cbedd47047753
\ No newline at end of file diff --git a/db/schema_migrations/20200831224343 b/db/schema_migrations/20200831224343 deleted file mode 100644 index 5aabfb7d1cf..00000000000 --- a/db/schema_migrations/20200831224343 +++ /dev/null @@ -1 +0,0 @@ -ce72274a7cc38c3708a03b8a301c6dafa6543acb03c8638a972c197657182ccf
\ No newline at end of file diff --git a/db/schema_migrations/20200901170135 b/db/schema_migrations/20200901170135 deleted file mode 100644 index 4f0f5213a98..00000000000 --- a/db/schema_migrations/20200901170135 +++ /dev/null @@ -1 +0,0 @@ -fca99780272ca4ceb42fd38d16f67cd4a0a675ecdaf91e51c4c0728205212ed0
\ No newline at end of file diff --git a/db/schema_migrations/20200901203055 b/db/schema_migrations/20200901203055 deleted file mode 100644 index 166f9069f40..00000000000 --- a/db/schema_migrations/20200901203055 +++ /dev/null @@ -1 +0,0 @@ -eb13fb285ac9af83bbc66397a5352a824575ad4af93178b98fbfc1be2e11ce8b
\ No newline at end of file diff --git a/db/schema_migrations/20200901212304 b/db/schema_migrations/20200901212304 deleted file mode 100644 index 3dcc9cdd8f0..00000000000 --- a/db/schema_migrations/20200901212304 +++ /dev/null @@ -1 +0,0 @@ -6fb93002ffd5c1d1bfff5bea8a99cbbfc7cefefbc450a9d067ee0cfab8d11e9e
\ No newline at end of file diff --git a/db/schema_migrations/20200901214416 b/db/schema_migrations/20200901214416 deleted file mode 100644 index bb7481c254d..00000000000 --- a/db/schema_migrations/20200901214416 +++ /dev/null @@ -1 +0,0 @@ -b196c8ce85631432e712a977b09cdba70872f42b16bca53eda1bc8558f57ea24
\ No newline at end of file diff --git a/db/schema_migrations/20200902135542 b/db/schema_migrations/20200902135542 deleted file mode 100644 index 96ee06f291b..00000000000 --- a/db/schema_migrations/20200902135542 +++ /dev/null @@ -1 +0,0 @@ -58e1e87a9a0159d62db761d8caa91a5bf2cc1a2ccceb1b57ff35b53f7698d08f
\ No newline at end of file diff --git a/db/schema_migrations/20200903054946 b/db/schema_migrations/20200903054946 deleted file mode 100644 index 20a4874b1bc..00000000000 --- a/db/schema_migrations/20200903054946 +++ /dev/null @@ -1 +0,0 @@ -f9aa112661a55c9eeed1a6aa05dd4c28d6f88971dc14bb606e677d4b4a4e5947
\ No newline at end of file diff --git a/db/schema_migrations/20200903064431 b/db/schema_migrations/20200903064431 deleted file mode 100644 index a3351912182..00000000000 --- a/db/schema_migrations/20200903064431 +++ /dev/null @@ -1 +0,0 @@ -5c065dc7905fd1292e270d2248810d71fa71d6b6996e9d60c463a7eb36042881
\ No newline at end of file diff --git a/db/schema_migrations/20200903092241 b/db/schema_migrations/20200903092241 deleted file mode 100644 index bedd97c3918..00000000000 --- a/db/schema_migrations/20200903092241 +++ /dev/null @@ -1 +0,0 @@ -e6c3d5352feed1adc82b14218a6f47fa55df9e0add8a59228d128e4e7f39614b
\ No newline at end of file diff --git a/db/schema_migrations/20200904092131 b/db/schema_migrations/20200904092131 deleted file mode 100644 index ab6f0aaa8ad..00000000000 --- a/db/schema_migrations/20200904092131 +++ /dev/null @@ -1 +0,0 @@ -024d4448f6cd9b9fd8f6d1892882de596928d0265e91f79c6a52431c8fb3c08b
\ No newline at end of file diff --git a/db/schema_migrations/20200904131544 b/db/schema_migrations/20200904131544 deleted file mode 100644 index 62ff8ff56e7..00000000000 --- a/db/schema_migrations/20200904131544 +++ /dev/null @@ -1 +0,0 @@ -08c9c6e5cd19aac17de7fc639eaca5ddba3e8280452821b8a72f05dcde790feb
\ No newline at end of file diff --git a/db/schema_migrations/20200904174901 b/db/schema_migrations/20200904174901 deleted file mode 100644 index 6803b8ba0e2..00000000000 --- a/db/schema_migrations/20200904174901 +++ /dev/null @@ -1 +0,0 @@ -739a4d5374ae2be419c5a2f8c1427f85a0b76c90233918b7b43f1c166ab06cec
\ No newline at end of file diff --git a/db/schema_migrations/20200905013247 b/db/schema_migrations/20200905013247 deleted file mode 100644 index b0926ca1d99..00000000000 --- a/db/schema_migrations/20200905013247 +++ /dev/null @@ -1 +0,0 @@ -860c45fd6293f2f8f10d7351cb5a2fbab2cc9147e56b538cb62d75469b039ef0
\ No newline at end of file diff --git a/db/schema_migrations/20200907021256 b/db/schema_migrations/20200907021256 deleted file mode 100644 index a8e8b257104..00000000000 --- a/db/schema_migrations/20200907021256 +++ /dev/null @@ -1 +0,0 @@ -5fba5213226186a1506f672eb3eab2d07f58b019c4ba13760663cb119f62d4e2
\ No newline at end of file diff --git a/db/schema_migrations/20200907062101 b/db/schema_migrations/20200907062101 deleted file mode 100644 index b4bf6bbb781..00000000000 --- a/db/schema_migrations/20200907062101 +++ /dev/null @@ -1 +0,0 @@ -002c92f830762d97dcbdbcf8a0287ebbb576edc27f4f76f4bb18d043e956ba7a
\ No newline at end of file diff --git a/db/schema_migrations/20200907092610 b/db/schema_migrations/20200907092610 deleted file mode 100644 index 63eecc83a3c..00000000000 --- a/db/schema_migrations/20200907092610 +++ /dev/null @@ -1 +0,0 @@ -de1051e8f2d9f042ac923686b8c61e743c695736e8c7ebfdf6f87ab1ed09a11f
\ No newline at end of file diff --git a/db/schema_migrations/20200907092715 b/db/schema_migrations/20200907092715 deleted file mode 100644 index 700db177075..00000000000 --- a/db/schema_migrations/20200907092715 +++ /dev/null @@ -1 +0,0 @@ -2610104c89134b94d460a714f17c23e5e35d76147c1f25be6c02804a39725d6c
\ No newline at end of file diff --git a/db/schema_migrations/20200907124300 b/db/schema_migrations/20200907124300 deleted file mode 100644 index a156f95f428..00000000000 --- a/db/schema_migrations/20200907124300 +++ /dev/null @@ -1 +0,0 @@ -2311967a9f68e1a428662e0231752ad0d844063d66cca895211d38f9ae928d94
\ No newline at end of file diff --git a/db/schema_migrations/20200908033805 b/db/schema_migrations/20200908033805 deleted file mode 100644 index dc2103face3..00000000000 --- a/db/schema_migrations/20200908033805 +++ /dev/null @@ -1 +0,0 @@ -5f932b8a3503fc275ba6d09436115999b32f6438700e3b719f53730c5527a354
\ No newline at end of file diff --git a/db/schema_migrations/20200908064229 b/db/schema_migrations/20200908064229 deleted file mode 100644 index 37958f04de8..00000000000 --- a/db/schema_migrations/20200908064229 +++ /dev/null @@ -1 +0,0 @@ -e73076f6d7540372ee16fe26dcb44e8b84dde69e27c46483ee26883e81059501
\ No newline at end of file diff --git a/db/schema_migrations/20200908094810 b/db/schema_migrations/20200908094810 deleted file mode 100644 index a047e64107b..00000000000 --- a/db/schema_migrations/20200908094810 +++ /dev/null @@ -1 +0,0 @@ -327cd19cd6c0f273aea61ffebf10046fb7229516bc4ed28f3c0290bb3ad04755
\ No newline at end of file diff --git a/db/schema_migrations/20200908095446 b/db/schema_migrations/20200908095446 deleted file mode 100644 index dbb164d9695..00000000000 --- a/db/schema_migrations/20200908095446 +++ /dev/null @@ -1 +0,0 @@ -3cd8614d1d93340b4607d5270b54ec96b60b04a830c0a15a84b9843048515a12
\ No newline at end of file diff --git a/db/schema_migrations/20200908100053 b/db/schema_migrations/20200908100053 deleted file mode 100644 index f57b8f3a317..00000000000 --- a/db/schema_migrations/20200908100053 +++ /dev/null @@ -1 +0,0 @@ -5642f7d91bbbd20d1e3a964b6a06a4da14474db58f47e3ee0ce3273f7cd7a9e8
\ No newline at end of file diff --git a/db/schema_migrations/20200908183231 b/db/schema_migrations/20200908183231 deleted file mode 100644 index e194dc37b36..00000000000 --- a/db/schema_migrations/20200908183231 +++ /dev/null @@ -1 +0,0 @@ -9eadbb80f137ba0123c96e04ded21cc313560b7a293c241c6a72ebd35248a84b
\ No newline at end of file diff --git a/db/schema_migrations/20200908212414 b/db/schema_migrations/20200908212414 deleted file mode 100644 index 208f9affc91..00000000000 --- a/db/schema_migrations/20200908212414 +++ /dev/null @@ -1 +0,0 @@ -a9605126178d887bbf526a4a33b7060b072eff7a8d6712e3552099f7e615f88b
\ No newline at end of file diff --git a/db/schema_migrations/20200909040555 b/db/schema_migrations/20200909040555 deleted file mode 100644 index 27855514146..00000000000 --- a/db/schema_migrations/20200909040555 +++ /dev/null @@ -1 +0,0 @@ -f68d29be164299e5ccf73347841d27b17f028941e37e3510d3da9d513762a17f
\ No newline at end of file diff --git a/db/schema_migrations/20200909083339 b/db/schema_migrations/20200909083339 deleted file mode 100644 index 179a683412c..00000000000 --- a/db/schema_migrations/20200909083339 +++ /dev/null @@ -1 +0,0 @@ -8b2090e953e6205b65555408a88d3da7f6bce28b0baa52d1a43a3a3e8001b7e1
\ No newline at end of file diff --git a/db/schema_migrations/20200909161624 b/db/schema_migrations/20200909161624 deleted file mode 100644 index 941af468398..00000000000 --- a/db/schema_migrations/20200909161624 +++ /dev/null @@ -1 +0,0 @@ -2d7f514429e9a08ce13995feff43e221b3e2e74737ed48f81e104008d8ec24b9
\ No newline at end of file diff --git a/db/schema_migrations/20200909194014 b/db/schema_migrations/20200909194014 deleted file mode 100644 index ef647b603f3..00000000000 --- a/db/schema_migrations/20200909194014 +++ /dev/null @@ -1 +0,0 @@ -9579a789ed6256a513a7afb51eeaf11661d1ef2e5d8312e28a69579eb39d8960
\ No newline at end of file diff --git a/db/schema_migrations/20200909194524 b/db/schema_migrations/20200909194524 deleted file mode 100644 index e4158445318..00000000000 --- a/db/schema_migrations/20200909194524 +++ /dev/null @@ -1 +0,0 @@ -c0f798f6ffd8d67137e6076242f5fb0004736f03c9cde5556dec228eefa75cb1
\ No newline at end of file diff --git a/db/schema_migrations/20200910131217 b/db/schema_migrations/20200910131217 deleted file mode 100644 index 6aba73661f7..00000000000 --- a/db/schema_migrations/20200910131217 +++ /dev/null @@ -1 +0,0 @@ -205580c1ba38fd03ce025dfd1d9be67756ade4fd28ba957bb71cd9e5e89ef190
\ No newline at end of file diff --git a/db/schema_migrations/20200910131218 b/db/schema_migrations/20200910131218 deleted file mode 100644 index c0e5f36d8d7..00000000000 --- a/db/schema_migrations/20200910131218 +++ /dev/null @@ -1 +0,0 @@ -ba431f19818b93da91c4ed2c3f25dc8e2f62c6d9ac07b15f6d01f21f085c1730
\ No newline at end of file diff --git a/db/schema_migrations/20200910155617 b/db/schema_migrations/20200910155617 deleted file mode 100644 index 901b6c0545c..00000000000 --- a/db/schema_migrations/20200910155617 +++ /dev/null @@ -1 +0,0 @@ -6cba0aecae495458b3b161999417cb9d790e60b4edfb10bb26b9684d466e3fd2
\ No newline at end of file diff --git a/db/schema_migrations/20200910170908 b/db/schema_migrations/20200910170908 deleted file mode 100644 index 12ab216f093..00000000000 --- a/db/schema_migrations/20200910170908 +++ /dev/null @@ -1 +0,0 @@ -de13fed042f6e3d2a6612a77acebf168c8beddab5796b96f2d77886dea431ceb
\ No newline at end of file diff --git a/db/schema_migrations/20200910175553 b/db/schema_migrations/20200910175553 deleted file mode 100644 index fff67f5a2f6..00000000000 --- a/db/schema_migrations/20200910175553 +++ /dev/null @@ -1 +0,0 @@ -904e0a8623df766a1f385bbb3db8942d10c4a92354d8f5e3bc03a813337c5fa1
\ No newline at end of file diff --git a/db/schema_migrations/20200911120132 b/db/schema_migrations/20200911120132 deleted file mode 100644 index a9ce2c72ac2..00000000000 --- a/db/schema_migrations/20200911120132 +++ /dev/null @@ -1 +0,0 @@ -8c9a7ead17d7378337e7bcfd25a10064c70a3bbb4604bdbb24065951131045dd
\ No newline at end of file diff --git a/db/schema_migrations/20200911121027 b/db/schema_migrations/20200911121027 deleted file mode 100644 index 495b12264ee..00000000000 --- a/db/schema_migrations/20200911121027 +++ /dev/null @@ -1 +0,0 @@ -59cbcbe3f8491e150f37a3954c89cc58a52aa0a985c66f252c71d679429ffba1
\ No newline at end of file diff --git a/db/schema_migrations/20200911121048 b/db/schema_migrations/20200911121048 deleted file mode 100644 index f10c7e0442c..00000000000 --- a/db/schema_migrations/20200911121048 +++ /dev/null @@ -1 +0,0 @@ -51fe3e71baaf55730bf51f3ad5d429b7cfdc6c43319babb9af28bdc13aab2fc9
\ No newline at end of file diff --git a/db/schema_migrations/20200912152943 b/db/schema_migrations/20200912152943 deleted file mode 100644 index 4dd1ae708cd..00000000000 --- a/db/schema_migrations/20200912152943 +++ /dev/null @@ -1 +0,0 @@ -b8d7a2ec9ecf51fd7cb9346e1484b45d5b472a85d90ad270d08c1cca1b44f039
\ No newline at end of file diff --git a/db/schema_migrations/20200912153218 b/db/schema_migrations/20200912153218 deleted file mode 100644 index 9c013281ea2..00000000000 --- a/db/schema_migrations/20200912153218 +++ /dev/null @@ -1 +0,0 @@ -fd632247f1588c537e83574edd7936c530e154091e3101d0404da3b7ef8b4bef
\ No newline at end of file diff --git a/db/schema_migrations/20200912193210 b/db/schema_migrations/20200912193210 deleted file mode 100644 index a6ce007630a..00000000000 --- a/db/schema_migrations/20200912193210 +++ /dev/null @@ -1 +0,0 @@ -bcc84e89e4e9772d3209aa8df1368c188b1c6334114bcf339870cae74e724d01
\ No newline at end of file diff --git a/db/schema_migrations/20200913115700 b/db/schema_migrations/20200913115700 deleted file mode 100644 index cb0f401efee..00000000000 --- a/db/schema_migrations/20200913115700 +++ /dev/null @@ -1 +0,0 @@ -dd2ada53f01debcc91070525e4386db959b91881a8945e9082d0b3318ceb35cf
\ No newline at end of file diff --git a/db/schema_migrations/20200914070140 b/db/schema_migrations/20200914070140 deleted file mode 100644 index b9cac3a3726..00000000000 --- a/db/schema_migrations/20200914070140 +++ /dev/null @@ -1 +0,0 @@ -8cabe224e89ef77fe4a2bc1f8bf7381faaa10d1cab4907a26aeb2162a126af52
\ No newline at end of file diff --git a/db/schema_migrations/20200914091326 b/db/schema_migrations/20200914091326 deleted file mode 100644 index b3ebcce5749..00000000000 --- a/db/schema_migrations/20200914091326 +++ /dev/null @@ -1 +0,0 @@ -c46bafefa5fd79a6644cbe259260b66aaded36aad4ae28a84ddd8bb072c2167d
\ No newline at end of file diff --git a/db/schema_migrations/20200914104642 b/db/schema_migrations/20200914104642 deleted file mode 100644 index 849e99fbbb1..00000000000 --- a/db/schema_migrations/20200914104642 +++ /dev/null @@ -1 +0,0 @@ -49b492717acca6d43e16caafda0b75f6e1a3630592149b04d1148758406ae1a7
\ No newline at end of file diff --git a/db/schema_migrations/20200914105202 b/db/schema_migrations/20200914105202 deleted file mode 100644 index 3179f267ce2..00000000000 --- a/db/schema_migrations/20200914105202 +++ /dev/null @@ -1 +0,0 @@ -6cd644220e07f477a87ddc8bb8b2de3ed920c0c76383122bab95c939e21abbb2
\ No newline at end of file diff --git a/db/schema_migrations/20200914155135 b/db/schema_migrations/20200914155135 deleted file mode 100644 index 17cd6c67033..00000000000 --- a/db/schema_migrations/20200914155135 +++ /dev/null @@ -1 +0,0 @@ -0b01a251eb736eb9e9986214c69ea5f4a11d8293bc4083af1585ce265c8f69de
\ No newline at end of file diff --git a/db/schema_migrations/20200914183227 b/db/schema_migrations/20200914183227 deleted file mode 100644 index 3fb2d461452..00000000000 --- a/db/schema_migrations/20200914183227 +++ /dev/null @@ -1 +0,0 @@ -570a7de82da3dabfd12f3099cdc028128d4b61a4ecf6edd4b3102031d914316c
\ No newline at end of file diff --git a/db/schema_migrations/20200914184212 b/db/schema_migrations/20200914184212 deleted file mode 100644 index 1053454b960..00000000000 --- a/db/schema_migrations/20200914184212 +++ /dev/null @@ -1 +0,0 @@ -dcfd1f006aa6695e0fd8f392c7288f2d80bddfe53827d3a2f079bd039f4fe0de
\ No newline at end of file diff --git a/db/schema_migrations/20200915044225 b/db/schema_migrations/20200915044225 deleted file mode 100644 index 440fddf4080..00000000000 --- a/db/schema_migrations/20200915044225 +++ /dev/null @@ -1 +0,0 @@ -0c659c7cbbda4d2fbbbd344f0fca50860ccf54ec8b666772d53a4c6fa602d097
\ No newline at end of file diff --git a/db/schema_migrations/20200915134004 b/db/schema_migrations/20200915134004 deleted file mode 100644 index a8857de0ada..00000000000 --- a/db/schema_migrations/20200915134004 +++ /dev/null @@ -1 +0,0 @@ -dd630c76819641ad64a5f6ae40ad4f49e7fbe1c783398d97886dc7e9852a245e
\ No newline at end of file diff --git a/db/schema_migrations/20200915152641 b/db/schema_migrations/20200915152641 deleted file mode 100644 index def09e2b14a..00000000000 --- a/db/schema_migrations/20200915152641 +++ /dev/null @@ -1 +0,0 @@ -b2d8b7aef4e6756f54f2a173280d98e8fc5594075aaa0a46c81b549a96730668
\ No newline at end of file diff --git a/db/schema_migrations/20200915164448 b/db/schema_migrations/20200915164448 deleted file mode 100644 index 9506a9c7511..00000000000 --- a/db/schema_migrations/20200915164448 +++ /dev/null @@ -1 +0,0 @@ -46e86bee146e7f9cf9459309f8d386f9616ba59d40a7517e22756a6e51526056
\ No newline at end of file diff --git a/db/schema_migrations/20200915164844 b/db/schema_migrations/20200915164844 deleted file mode 100644 index e0d7d3f7c45..00000000000 --- a/db/schema_migrations/20200915164844 +++ /dev/null @@ -1 +0,0 @@ -8b6caa84be77679e8b47dd5f20093e7438d70641d6d5fc498b05b5c35ef3e5e8
\ No newline at end of file diff --git a/db/schema_migrations/20200915185707 b/db/schema_migrations/20200915185707 deleted file mode 100644 index 2161aa5acf8..00000000000 --- a/db/schema_migrations/20200915185707 +++ /dev/null @@ -1 +0,0 @@ -e1ae80d6f0a6372bb329d45257d9a0a8ca5b6a83718d2a10ee295b8c4c97f60e
\ No newline at end of file diff --git a/db/schema_migrations/20200915191156 b/db/schema_migrations/20200915191156 deleted file mode 100644 index 5005ee15989..00000000000 --- a/db/schema_migrations/20200915191156 +++ /dev/null @@ -1 +0,0 @@ -d8ddec6b234d59b3b85705dfa7b724d3be4974bfa57fae70aa5c2dbdd2e73cfa
\ No newline at end of file diff --git a/db/schema_migrations/20200916081749 b/db/schema_migrations/20200916081749 deleted file mode 100644 index ef4e7164d15..00000000000 --- a/db/schema_migrations/20200916081749 +++ /dev/null @@ -1 +0,0 @@ -dde7a29268d925044d59455db87bfc1aa617eec6e30df1cc9dc531b52c909fe1
\ No newline at end of file diff --git a/db/schema_migrations/20200916120837 b/db/schema_migrations/20200916120837 deleted file mode 100644 index 41ce56533b2..00000000000 --- a/db/schema_migrations/20200916120837 +++ /dev/null @@ -1 +0,0 @@ -ff246eb2761c4504b67b7d7b197990a671626038e50f1b82d6b3e4739a1ec3d4
\ No newline at end of file diff --git a/db/schema_migrations/20200916135044 b/db/schema_migrations/20200916135044 deleted file mode 100644 index 8bb10fbb1e3..00000000000 --- a/db/schema_migrations/20200916135044 +++ /dev/null @@ -1 +0,0 @@ -299e6fb38da303f06ab006a25701ff1c58ce2abfa8cf93c3c8b866ee0b2bd1cc
\ No newline at end of file diff --git a/db/schema_migrations/20200916151442 b/db/schema_migrations/20200916151442 deleted file mode 100644 index 36b2a4e9962..00000000000 --- a/db/schema_migrations/20200916151442 +++ /dev/null @@ -1 +0,0 @@ -aef52404e6ce83d5d4b3de65ad00b665334f5ff2e5b7b6c3c622f79313657f26
\ No newline at end of file diff --git a/db/schema_migrations/20200916165232 b/db/schema_migrations/20200916165232 deleted file mode 100644 index 8e97fcf3efa..00000000000 --- a/db/schema_migrations/20200916165232 +++ /dev/null @@ -1 +0,0 @@ -18a3981a3becefe6700dd5fea87e8ba9478c0e83ddc80de1b3ee2ed77c221ce6
\ No newline at end of file diff --git a/db/schema_migrations/20200917121650 b/db/schema_migrations/20200917121650 deleted file mode 100644 index d0f26d40466..00000000000 --- a/db/schema_migrations/20200917121650 +++ /dev/null @@ -1 +0,0 @@ -3343b646d0c0ca2d92982740abe4372fb80931cb4bb4386229959d5d61c86587
\ No newline at end of file diff --git a/db/schema_migrations/20200917135802 b/db/schema_migrations/20200917135802 deleted file mode 100644 index 7b948de646b..00000000000 --- a/db/schema_migrations/20200917135802 +++ /dev/null @@ -1 +0,0 @@ -8d9e75f7c6344b03cb740fa691fcbb5bea1751802741229158701bc1af975897
\ No newline at end of file diff --git a/db/schema_migrations/20200917165525 b/db/schema_migrations/20200917165525 deleted file mode 100644 index bf01a95ad14..00000000000 --- a/db/schema_migrations/20200917165525 +++ /dev/null @@ -1 +0,0 @@ -0080b9192ba5b4ea3853cfd930d58e10b9619f3d9a54016b574712e5ec2084f6
\ No newline at end of file diff --git a/db/schema_migrations/20200919200318 b/db/schema_migrations/20200919200318 deleted file mode 100644 index 29721a3ef2b..00000000000 --- a/db/schema_migrations/20200919200318 +++ /dev/null @@ -1 +0,0 @@ -f33c66297ca7848c576778dc275e42801f5f9d7cdcf8c4d2fb205d4eb9770937
\ No newline at end of file diff --git a/db/schema_migrations/20200919204155 b/db/schema_migrations/20200919204155 deleted file mode 100644 index 39b608deed4..00000000000 --- a/db/schema_migrations/20200919204155 +++ /dev/null @@ -1 +0,0 @@ -097cb7a36fdc831045f3a33a047f8bda6474b8165ef5fc95dbdeea45d0ac04a3
\ No newline at end of file diff --git a/db/schema_migrations/20200920130356 b/db/schema_migrations/20200920130356 deleted file mode 100644 index ab0575958ec..00000000000 --- a/db/schema_migrations/20200920130356 +++ /dev/null @@ -1 +0,0 @@ -80d2beb7a1c5f60a4bf3462054fa5bcd0488152b6754f8a7164046201fcb08ed
\ No newline at end of file diff --git a/db/schema_migrations/20200921093826 b/db/schema_migrations/20200921093826 deleted file mode 100644 index 4a405de5215..00000000000 --- a/db/schema_migrations/20200921093826 +++ /dev/null @@ -1 +0,0 @@ -8d14013bcb4d8302c91e331f619fb6f621ab79907aebc421d99c9484ecd7a5d8
\ No newline at end of file diff --git a/db/schema_migrations/20200921113722 b/db/schema_migrations/20200921113722 deleted file mode 100644 index 96dc1683f72..00000000000 --- a/db/schema_migrations/20200921113722 +++ /dev/null @@ -1 +0,0 @@ -723812a28afbabb6b7884fd76dcaf658c5e35a33a46e90a9a94aef12e735e604
\ No newline at end of file diff --git a/db/schema_migrations/20200921130028 b/db/schema_migrations/20200921130028 deleted file mode 100644 index b718f21c156..00000000000 --- a/db/schema_migrations/20200921130028 +++ /dev/null @@ -1 +0,0 @@ -60835078e0a0bd191e9b1f0316f894c5223d6849277992b5034ed4ff9a798fe4
\ No newline at end of file diff --git a/db/schema_migrations/20200921131313 b/db/schema_migrations/20200921131313 deleted file mode 100644 index 559701acf69..00000000000 --- a/db/schema_migrations/20200921131313 +++ /dev/null @@ -1 +0,0 @@ -e4f9e918c86705409555cde065f30ba0c0c405dfd1918f47a169a5dc5c244a8d
\ No newline at end of file diff --git a/db/schema_migrations/20200921203231 b/db/schema_migrations/20200921203231 deleted file mode 100644 index 544b7146ebf..00000000000 --- a/db/schema_migrations/20200921203231 +++ /dev/null @@ -1 +0,0 @@ -7f62ce5117a16213bad6537dfeae2af4016262c533f8fa6b7a19572077bcf8d7
\ No newline at end of file diff --git a/db/schema_migrations/20200922052316 b/db/schema_migrations/20200922052316 deleted file mode 100644 index 31bd12178ef..00000000000 --- a/db/schema_migrations/20200922052316 +++ /dev/null @@ -1 +0,0 @@ -384d022662437de21b4b3b97bf2f1dec2925be6afe4b62828c97dc9b3b3fc77c
\ No newline at end of file diff --git a/db/schema_migrations/20200922054642 b/db/schema_migrations/20200922054642 deleted file mode 100644 index 443c13c256e..00000000000 --- a/db/schema_migrations/20200922054642 +++ /dev/null @@ -1 +0,0 @@ -ad63096e49440f7f2a15ea2747689ca39f52fdcebc1949a1feed82a22f432e9e
\ No newline at end of file diff --git a/db/schema_migrations/20200922075244 b/db/schema_migrations/20200922075244 deleted file mode 100644 index 82a2fc5f304..00000000000 --- a/db/schema_migrations/20200922075244 +++ /dev/null @@ -1 +0,0 @@ -a8450c6c21b1182afd06c88af18c0d9be92b0e7fdc73505c07d4ab3fddd39abf
\ No newline at end of file diff --git a/db/schema_migrations/20200922093004 b/db/schema_migrations/20200922093004 deleted file mode 100644 index 04dd5dbfcf6..00000000000 --- a/db/schema_migrations/20200922093004 +++ /dev/null @@ -1 +0,0 @@ -705d010620b1aa95e86c8fb5fb9175fe77778376d228003e9fd2c8d0bb20a347
\ No newline at end of file diff --git a/db/schema_migrations/20200922095954 b/db/schema_migrations/20200922095954 deleted file mode 100644 index 2282da76380..00000000000 --- a/db/schema_migrations/20200922095954 +++ /dev/null @@ -1 +0,0 @@ -c55f27f817afc60462e5dc43755a4ddd76f1399f5e461bab4b36bf5e5b26ce0a
\ No newline at end of file diff --git a/db/schema_migrations/20200922133949 b/db/schema_migrations/20200922133949 deleted file mode 100644 index 8c1874198bb..00000000000 --- a/db/schema_migrations/20200922133949 +++ /dev/null @@ -1 +0,0 @@ -8196e28f6fe8cdb4cf710922b5cd218030ba587c629de7ee75dc061d05c7e1a9
\ No newline at end of file diff --git a/db/schema_migrations/20200922170907 b/db/schema_migrations/20200922170907 deleted file mode 100644 index 66ff701973d..00000000000 --- a/db/schema_migrations/20200922170907 +++ /dev/null @@ -1 +0,0 @@ -ab044b609a29e9a179813de79dab9770665917a8ed78db907755a64f2d4aa47c
\ No newline at end of file diff --git a/db/schema_migrations/20200922231755 b/db/schema_migrations/20200922231755 deleted file mode 100644 index 504df45b957..00000000000 --- a/db/schema_migrations/20200922231755 +++ /dev/null @@ -1 +0,0 @@ -0019105cd2112e138b9926dc000b0c54b41fca6dfb2c4f658900040e0ecb3b70
\ No newline at end of file diff --git a/db/schema_migrations/20200923071622 b/db/schema_migrations/20200923071622 deleted file mode 100644 index 629b241ce0a..00000000000 --- a/db/schema_migrations/20200923071622 +++ /dev/null @@ -1 +0,0 @@ -1751fa6522a88582cb6a580acc95665f4e3f3a879f2365d5fd0a824ad1b4806d
\ No newline at end of file diff --git a/db/schema_migrations/20200923071644 b/db/schema_migrations/20200923071644 deleted file mode 100644 index 431ed5af1f0..00000000000 --- a/db/schema_migrations/20200923071644 +++ /dev/null @@ -1 +0,0 @@ -0df2b1e65ef0dc563c55e575968e4fd768cec2e713e3b1c999cf584ef62b629d
\ No newline at end of file diff --git a/db/schema_migrations/20200923102312 b/db/schema_migrations/20200923102312 deleted file mode 100644 index 52ed07034fc..00000000000 --- a/db/schema_migrations/20200923102312 +++ /dev/null @@ -1 +0,0 @@ -f19e61e3863905885c8b5b2129be2586d912d616a5b3b54e99a72c5760082059
\ No newline at end of file diff --git a/db/schema_migrations/20200923130057 b/db/schema_migrations/20200923130057 deleted file mode 100644 index e95c2da0a1d..00000000000 --- a/db/schema_migrations/20200923130057 +++ /dev/null @@ -1 +0,0 @@ -84b272d61f6ab6e9f9f8eb059ba139a3fa0d2f1bbeb337f2e4e7cd4034822b44
\ No newline at end of file diff --git a/db/schema_migrations/20200923140404 b/db/schema_migrations/20200923140404 deleted file mode 100644 index 9c1bfd59b4c..00000000000 --- a/db/schema_migrations/20200923140404 +++ /dev/null @@ -1 +0,0 @@ -8a1898f62a47575c7ea428198163e04ff427e7ab6cd04eb9897930a6b7753681
\ No newline at end of file diff --git a/db/schema_migrations/20200924035825 b/db/schema_migrations/20200924035825 deleted file mode 100644 index 0c27ed47732..00000000000 --- a/db/schema_migrations/20200924035825 +++ /dev/null @@ -1 +0,0 @@ -d413e19c8ddaba4556cf36a38e03b1c7c46ee7edf7e56692028e066f97605784
\ No newline at end of file diff --git a/db/schema_migrations/20200925112104 b/db/schema_migrations/20200925112104 deleted file mode 100644 index bb0f8032a84..00000000000 --- a/db/schema_migrations/20200925112104 +++ /dev/null @@ -1 +0,0 @@ -a14df9e9a115d39636b29bfe73fb175bb1e8d4510bee26e3e0c6c979949b13c4
\ No newline at end of file diff --git a/db/schema_migrations/20200925114522 b/db/schema_migrations/20200925114522 deleted file mode 100644 index 4b8d893833d..00000000000 --- a/db/schema_migrations/20200925114522 +++ /dev/null @@ -1 +0,0 @@ -7d43d2fa91e27eaf9399cf0ce9e4375e849deb71b12d4891455bc51392bce14a
\ No newline at end of file diff --git a/db/schema_migrations/20200925125321 b/db/schema_migrations/20200925125321 deleted file mode 100644 index 103cd02c5e1..00000000000 --- a/db/schema_migrations/20200925125321 +++ /dev/null @@ -1 +0,0 @@ -d1d2f7d5f70e912b1d0a77417a96b9e16ffc620eb8c941ed4aa9a8c166ba26e0
\ No newline at end of file diff --git a/db/schema_migrations/20200925153423 b/db/schema_migrations/20200925153423 deleted file mode 100644 index ffbdc2c81c2..00000000000 --- a/db/schema_migrations/20200925153423 +++ /dev/null @@ -1 +0,0 @@ -f445704e51dad2369719d8c0931c3314793fa90ba6b5a383df503ea4f6dafd20
\ No newline at end of file diff --git a/db/schema_migrations/20200925193815 b/db/schema_migrations/20200925193815 deleted file mode 100644 index fdfa07c5a99..00000000000 --- a/db/schema_migrations/20200925193815 +++ /dev/null @@ -1 +0,0 @@ -a814b745b4911fc6c80971e6c0c19e6d64ca30cb94fa87a94bc1adf8c07b1c87
\ No newline at end of file diff --git a/db/schema_migrations/20200925193906 b/db/schema_migrations/20200925193906 deleted file mode 100644 index dd9c1e4cd3b..00000000000 --- a/db/schema_migrations/20200925193906 +++ /dev/null @@ -1 +0,0 @@ -a915ccf5df0ec803286205916ffcd34b1410d1cc4da84f8299b63b3665d69e09
\ No newline at end of file diff --git a/db/schema_migrations/20200925194006 b/db/schema_migrations/20200925194006 deleted file mode 100644 index fc89ebb9f7b..00000000000 --- a/db/schema_migrations/20200925194006 +++ /dev/null @@ -1 +0,0 @@ -28a71a380be0ef08389defac604c351f0a7f31b6c03a7c40aabe47bf09e6a485
\ No newline at end of file diff --git a/db/schema_migrations/20200927224750 b/db/schema_migrations/20200927224750 deleted file mode 100644 index 9454bec58c5..00000000000 --- a/db/schema_migrations/20200927224750 +++ /dev/null @@ -1 +0,0 @@ -8e0c5be3d6fe2d0d718c7b7a99d84b14dfc6006f780ec0622eb5aae937e6b367
\ No newline at end of file diff --git a/db/schema_migrations/20200928095732 b/db/schema_migrations/20200928095732 deleted file mode 100644 index 15f0d5e3eae..00000000000 --- a/db/schema_migrations/20200928095732 +++ /dev/null @@ -1 +0,0 @@ -5ff9bf6c542f686729abf18f282351d9bb5b895070c6f06c5fc8d125be4a38f7
\ No newline at end of file diff --git a/db/schema_migrations/20200928100408 b/db/schema_migrations/20200928100408 deleted file mode 100644 index e49c397924d..00000000000 --- a/db/schema_migrations/20200928100408 +++ /dev/null @@ -1 +0,0 @@ -56984f720cfde6ad28b8612e092809252f948797fecb64dfc3b82d5b3b74f7ec
\ No newline at end of file diff --git a/db/schema_migrations/20200928123510 b/db/schema_migrations/20200928123510 deleted file mode 100644 index db9d2889739..00000000000 --- a/db/schema_migrations/20200928123510 +++ /dev/null @@ -1 +0,0 @@ -1e274e744ed9e225e2ee09afc15871a1af63857f95c5d787e8efd9943fce1bed
\ No newline at end of file diff --git a/db/schema_migrations/20200928125258 b/db/schema_migrations/20200928125258 deleted file mode 100644 index d9756bd6ee6..00000000000 --- a/db/schema_migrations/20200928125258 +++ /dev/null @@ -1 +0,0 @@ -46579fd0313068f3c9c1631f1da4a0b20513759a54dad4841bcea7d6c727646a
\ No newline at end of file diff --git a/db/schema_migrations/20200928131934 b/db/schema_migrations/20200928131934 deleted file mode 100644 index 952e2121d35..00000000000 --- a/db/schema_migrations/20200928131934 +++ /dev/null @@ -1 +0,0 @@ -106757b0f30d3c89fcafa13be92271090fa107831fd538ee087d7ce212842492
\ No newline at end of file diff --git a/db/schema_migrations/20200928164807 b/db/schema_migrations/20200928164807 deleted file mode 100644 index 3efd3c56402..00000000000 --- a/db/schema_migrations/20200928164807 +++ /dev/null @@ -1 +0,0 @@ -346d0e913212d6e84528d47228ba7e6d0cf4a396e7fc921f7c684acfaaeeedb8
\ No newline at end of file diff --git a/db/schema_migrations/20200928203531 b/db/schema_migrations/20200928203531 deleted file mode 100644 index 229e2dc9b1f..00000000000 --- a/db/schema_migrations/20200928203531 +++ /dev/null @@ -1 +0,0 @@ -fc9719e0822d17eacb375b4adb2eac35afba04cafc2bd429c82c502d2fe5f12e
\ No newline at end of file diff --git a/db/schema_migrations/20200928210524 b/db/schema_migrations/20200928210524 deleted file mode 100644 index 41905703d01..00000000000 --- a/db/schema_migrations/20200928210524 +++ /dev/null @@ -1 +0,0 @@ -788fd828a7aa8fb8741f13596f54fc4d9f4f5caeaf34d08aed47bbefe363ae75
\ No newline at end of file diff --git a/db/schema_migrations/20200928233632 b/db/schema_migrations/20200928233632 deleted file mode 100644 index d66fc8310f2..00000000000 --- a/db/schema_migrations/20200928233632 +++ /dev/null @@ -1 +0,0 @@ -c390843c8a93ca429d1442d7b54f5f9dc01e0343c71ed1a046f11968cc10810d
\ No newline at end of file diff --git a/db/schema_migrations/20200929032729 b/db/schema_migrations/20200929032729 deleted file mode 100644 index cd38d67c78a..00000000000 --- a/db/schema_migrations/20200929032729 +++ /dev/null @@ -1 +0,0 @@ -77fa26f97216c1fa3d0b046dfabac92a5afa2a0eaf33439117b29ac81e740e4a
\ No newline at end of file diff --git a/db/schema_migrations/20200929052138 b/db/schema_migrations/20200929052138 deleted file mode 100644 index 05c56a31270..00000000000 --- a/db/schema_migrations/20200929052138 +++ /dev/null @@ -1 +0,0 @@ -30b84d137fcb17eaca86f1bec52d6e20c972f7083d4c983e2bb397c9126b5f0c
\ No newline at end of file diff --git a/db/schema_migrations/20200929063159 b/db/schema_migrations/20200929063159 deleted file mode 100644 index b7815e9bb39..00000000000 --- a/db/schema_migrations/20200929063159 +++ /dev/null @@ -1 +0,0 @@ -9ef08404b964ccae3e12332340f16c6b8bb2bbdb2c04ba105fe1c0c7e6bf84f2
\ No newline at end of file diff --git a/db/schema_migrations/20200929113254 b/db/schema_migrations/20200929113254 deleted file mode 100644 index 172a6eabd66..00000000000 --- a/db/schema_migrations/20200929113254 +++ /dev/null @@ -1 +0,0 @@ -260f392c3ff257960dc7b198473056e7bf9b9a668403d2f05391d2b7989cf83c
\ No newline at end of file diff --git a/db/schema_migrations/20200929114107 b/db/schema_migrations/20200929114107 deleted file mode 100644 index f3b7a7a3bad..00000000000 --- a/db/schema_migrations/20200929114107 +++ /dev/null @@ -1 +0,0 @@ -f5d4b534c230f9ac7f285bccd096a7d51bf5c9e7a73f293fafaff89bb1ee12e1
\ No newline at end of file diff --git a/db/schema_migrations/20200930094812 b/db/schema_migrations/20200930094812 deleted file mode 100644 index ad03614e47d..00000000000 --- a/db/schema_migrations/20200930094812 +++ /dev/null @@ -1 +0,0 @@ -b92b48a17bfd350a70017bfee99bcfb3dbc5ae9e33c8f23ab593666e5c3900aa
\ No newline at end of file diff --git a/db/schema_migrations/20200930131343 b/db/schema_migrations/20200930131343 deleted file mode 100644 index a872607f241..00000000000 --- a/db/schema_migrations/20200930131343 +++ /dev/null @@ -1 +0,0 @@ -45530bb3090d9e8df3a79f42a06b042e0c40f6e185078c6d79d7ec334175c7d5
\ No newline at end of file diff --git a/db/schema_migrations/20200930132319 b/db/schema_migrations/20200930132319 deleted file mode 100644 index 7bffd187de2..00000000000 --- a/db/schema_migrations/20200930132319 +++ /dev/null @@ -1 +0,0 @@ -1ded640c70d5e569f0f26729c96d2dc27c528bcb045e28f073ed8fce9f918d95
\ No newline at end of file diff --git a/db/schema_migrations/20200930144340 b/db/schema_migrations/20200930144340 deleted file mode 100644 index 4ac1bae7537..00000000000 --- a/db/schema_migrations/20200930144340 +++ /dev/null @@ -1 +0,0 @@ -febc66dbb48fbd281223ab9466cc5d94e945e8164fa9db0ee149c29e653b3eb2
\ No newline at end of file diff --git a/db/schema_migrations/20201001022100 b/db/schema_migrations/20201001022100 deleted file mode 100644 index 9c11e9e6094..00000000000 --- a/db/schema_migrations/20201001022100 +++ /dev/null @@ -1 +0,0 @@ -a581071767c5484e8286951854b0effe04d4b8951f208f10ceb4812940363959
\ No newline at end of file diff --git a/db/schema_migrations/20201001101136 b/db/schema_migrations/20201001101136 deleted file mode 100644 index ecfc37cdfc5..00000000000 --- a/db/schema_migrations/20201001101136 +++ /dev/null @@ -1 +0,0 @@ -f3f9dd503d2c2695d5cd32ea87ff11e45832b1650df3186c7f71c984fc59ad24
\ No newline at end of file diff --git a/db/schema_migrations/20201002012659 b/db/schema_migrations/20201002012659 deleted file mode 100644 index 6a6d33389f9..00000000000 --- a/db/schema_migrations/20201002012659 +++ /dev/null @@ -1 +0,0 @@ -8a12c3c4f674d2a36df56a89bfd32e0f3945e73605460bdf2a8b0aa1308f5b19
\ No newline at end of file diff --git a/db/schema_migrations/20201002094617 b/db/schema_migrations/20201002094617 deleted file mode 100644 index 9c4d6155700..00000000000 --- a/db/schema_migrations/20201002094617 +++ /dev/null @@ -1 +0,0 @@ -823c72852eeb17eaf43c58e936ac25effdacb335f76562c68a4f90d5b1a32021
\ No newline at end of file diff --git a/db/schema_migrations/20201002175953 b/db/schema_migrations/20201002175953 deleted file mode 100644 index df5f64c0deb..00000000000 --- a/db/schema_migrations/20201002175953 +++ /dev/null @@ -1 +0,0 @@ -619e788f8868a2ff602a06e0025154b0b10b17cd69edcce70378e11750d5e686
\ No newline at end of file diff --git a/db/schema_migrations/20201004163918 b/db/schema_migrations/20201004163918 deleted file mode 100644 index e77e000bac8..00000000000 --- a/db/schema_migrations/20201004163918 +++ /dev/null @@ -1 +0,0 @@ -e25da3da50ed2396afe3bcb1ff441b5f1f0a43c0e23d66140a160d42f1b66a1a
\ No newline at end of file diff --git a/db/schema_migrations/20201005092703 b/db/schema_migrations/20201005092703 deleted file mode 100644 index 54969553788..00000000000 --- a/db/schema_migrations/20201005092703 +++ /dev/null @@ -1 +0,0 @@ -550fb12fe5e180ab52bd6d012cf1869544130049e83ccbefd4b132831a074f71
\ No newline at end of file diff --git a/db/schema_migrations/20201005092709 b/db/schema_migrations/20201005092709 deleted file mode 100644 index e0a7ecad91f..00000000000 --- a/db/schema_migrations/20201005092709 +++ /dev/null @@ -1 +0,0 @@ -5d9dbae8074627c41170e70849a3e6b71e20da473f312227df462c894c194efb
\ No newline at end of file diff --git a/db/schema_migrations/20201005092753 b/db/schema_migrations/20201005092753 deleted file mode 100644 index a519b6b3f1e..00000000000 --- a/db/schema_migrations/20201005092753 +++ /dev/null @@ -1 +0,0 @@ -b59670c031a146e7a1a8277ba51080a6c120724a00c7612933ff1ed44bc8dd60
\ No newline at end of file diff --git a/db/schema_migrations/20201005094331 b/db/schema_migrations/20201005094331 deleted file mode 100644 index 63b48d9fdaf..00000000000 --- a/db/schema_migrations/20201005094331 +++ /dev/null @@ -1 +0,0 @@ -b024bc44406810a30a3aebb33dd1355468448b4ebf9c76fe7811148044241551
\ No newline at end of file diff --git a/db/schema_migrations/20201005153955 b/db/schema_migrations/20201005153955 deleted file mode 100644 index 19d8b921ceb..00000000000 --- a/db/schema_migrations/20201005153955 +++ /dev/null @@ -1 +0,0 @@ -563f76e0635b54c2a5cb78cf5e87ea217acf3b6c853518588fcdeadef9dcc951
\ No newline at end of file diff --git a/db/schema_migrations/20201006014605 b/db/schema_migrations/20201006014605 deleted file mode 100644 index 92209fcd127..00000000000 --- a/db/schema_migrations/20201006014605 +++ /dev/null @@ -1 +0,0 @@ -d1a636c0b0c7f11bf5d6e882970a5286a28c3f060f89df3ac51df2e7c86f042e
\ No newline at end of file diff --git a/db/schema_migrations/20201007033527 b/db/schema_migrations/20201007033527 deleted file mode 100644 index b2cedd57973..00000000000 --- a/db/schema_migrations/20201007033527 +++ /dev/null @@ -1 +0,0 @@ -1200747265d5095a86250020786d6f1e9e50bc75328a71de497046807afa89d7
\ No newline at end of file diff --git a/db/schema_migrations/20201007033723 b/db/schema_migrations/20201007033723 deleted file mode 100644 index c874ae0475b..00000000000 --- a/db/schema_migrations/20201007033723 +++ /dev/null @@ -1 +0,0 @@ -febefead6f966960f6493d29add5f35fc4a1080b5118c5526502fa5fe1d29023
\ No newline at end of file diff --git a/db/schema_migrations/20201007115209 b/db/schema_migrations/20201007115209 deleted file mode 100644 index acd0a056bbd..00000000000 --- a/db/schema_migrations/20201007115209 +++ /dev/null @@ -1 +0,0 @@ -761cad9a584d98e3086e716f7a5c1d9b4aba87b084efcfcee7272cfdf1179372
\ No newline at end of file diff --git a/db/schema_migrations/20201008011523 b/db/schema_migrations/20201008011523 deleted file mode 100644 index 845ee2f5b96..00000000000 --- a/db/schema_migrations/20201008011523 +++ /dev/null @@ -1 +0,0 @@ -b7b49ca4c021b7caa9f8612ad9b69d4ec6d79894db2e43266bfe26f2e0bffe08
\ No newline at end of file diff --git a/db/schema_migrations/20201008011937 b/db/schema_migrations/20201008011937 deleted file mode 100644 index 258daf9a836..00000000000 --- a/db/schema_migrations/20201008011937 +++ /dev/null @@ -1 +0,0 @@ -8af89bb3e63bfca24cee8fdf6f0dd587fae7d81bfeaf6d427f84c7b37c9664ba
\ No newline at end of file diff --git a/db/schema_migrations/20201008013434 b/db/schema_migrations/20201008013434 deleted file mode 100644 index 9ec9dd8277c..00000000000 --- a/db/schema_migrations/20201008013434 +++ /dev/null @@ -1 +0,0 @@ -966f6e95189b551cba0ef548cb410911c0beee30d0a265ae21d90321ecbb2a00
\ No newline at end of file diff --git a/db/schema_migrations/20201008075620 b/db/schema_migrations/20201008075620 deleted file mode 100644 index a0a5d6a7314..00000000000 --- a/db/schema_migrations/20201008075620 +++ /dev/null @@ -1 +0,0 @@ -f9bc943b61460b1a9a6db8189ab5b21eba46e14650c68658175299b14d48a030
\ No newline at end of file diff --git a/db/schema_migrations/20201008125643 b/db/schema_migrations/20201008125643 deleted file mode 100644 index 121dcbc0281..00000000000 --- a/db/schema_migrations/20201008125643 +++ /dev/null @@ -1 +0,0 @@ -b7b15717435e06ea386c941c5a021b73f986ad3f41f2bd6f890738a79b710207
\ No newline at end of file diff --git a/db/schema_migrations/20201008144854 b/db/schema_migrations/20201008144854 deleted file mode 100644 index f4b71f06acd..00000000000 --- a/db/schema_migrations/20201008144854 +++ /dev/null @@ -1 +0,0 @@ -250785e18682cc10afb4f04546e5ff6dff9ab6c6673df84692c8221d6fe820ac
\ No newline at end of file diff --git a/db/schema_migrations/20201008224441 b/db/schema_migrations/20201008224441 deleted file mode 100644 index 1f27662d754..00000000000 --- a/db/schema_migrations/20201008224441 +++ /dev/null @@ -1 +0,0 @@ -d0ca8f0dbe0cf0fbbdd715867f3ae20862683433d919ee5cd942086d21f3b44d
\ No newline at end of file diff --git a/db/schema_migrations/20201009090954 b/db/schema_migrations/20201009090954 deleted file mode 100644 index 5d5ca8ff29b..00000000000 --- a/db/schema_migrations/20201009090954 +++ /dev/null @@ -1 +0,0 @@ -d0944a864a1a89e9339eb1f8ffab683df1a5bb90f7b7a16cabd4871f34d1cd48
\ No newline at end of file diff --git a/db/schema_migrations/20201011005400 b/db/schema_migrations/20201011005400 deleted file mode 100644 index 1715d21e424..00000000000 --- a/db/schema_migrations/20201011005400 +++ /dev/null @@ -1 +0,0 @@ -07bfc8e9a684ae64b7d78c9d867f9bafebd46678f6f168aa87d2ad7f0e85d75e
\ No newline at end of file diff --git a/db/schema_migrations/20201012073022 b/db/schema_migrations/20201012073022 deleted file mode 100644 index b7ce136a7e3..00000000000 --- a/db/schema_migrations/20201012073022 +++ /dev/null @@ -1 +0,0 @@ -234711b96d3869fe826dfd71ae29e0f75e50302bc29a4e60f436ec76b4be3efb
\ No newline at end of file diff --git a/db/schema_migrations/20201012122428 b/db/schema_migrations/20201012122428 deleted file mode 100644 index 13e7e9c2cd6..00000000000 --- a/db/schema_migrations/20201012122428 +++ /dev/null @@ -1 +0,0 @@ -d43764a44f6578548d8b7838dc011b7693da0b7d65cbcc1fff96a212d655024e
\ No newline at end of file diff --git a/db/schema_migrations/20201012134230 b/db/schema_migrations/20201012134230 deleted file mode 100644 index 2bf2175ef60..00000000000 --- a/db/schema_migrations/20201012134230 +++ /dev/null @@ -1 +0,0 @@ -1673018885366e92eb47f5fc705ea8251c2db49b5c14b788e84b10d8db91af48
\ No newline at end of file diff --git a/db/schema_migrations/20201012135330 b/db/schema_migrations/20201012135330 deleted file mode 100644 index 8ecce197faa..00000000000 --- a/db/schema_migrations/20201012135330 +++ /dev/null @@ -1 +0,0 @@ -18ccd2059d9a19a51ea0162c46a1293e280759daffa54ba58ba5e431ee7aba93
\ No newline at end of file diff --git a/db/schema_migrations/20201012140110 b/db/schema_migrations/20201012140110 deleted file mode 100644 index 1bbfe820a5d..00000000000 --- a/db/schema_migrations/20201012140110 +++ /dev/null @@ -1 +0,0 @@ -e266655483655e1ecbb4f65594ef5b985c3f0449231755f589f3e293e28c9f6b
\ No newline at end of file diff --git a/db/schema_migrations/20201012140452 b/db/schema_migrations/20201012140452 deleted file mode 100644 index 11bc272341d..00000000000 --- a/db/schema_migrations/20201012140452 +++ /dev/null @@ -1 +0,0 @@ -d62928276708c26656070f803ea6271be74a1fe9802877258d4a8cf19df32d09
\ No newline at end of file diff --git a/db/schema_migrations/20201012194936 b/db/schema_migrations/20201012194936 deleted file mode 100644 index c626e091e5e..00000000000 --- a/db/schema_migrations/20201012194936 +++ /dev/null @@ -1 +0,0 @@ -823d23d8ce8959762a7cadb883ed6d36a46fedaf238ea955d93136277d55cad5
\ No newline at end of file diff --git a/db/schema_migrations/20201014142521 b/db/schema_migrations/20201014142521 deleted file mode 100644 index d87f01628c3..00000000000 --- a/db/schema_migrations/20201014142521 +++ /dev/null @@ -1 +0,0 @@ -aed103bb25b70eb8f6387d84225a8e51672a83c4586ccc65da3011ef010da4b1
\ No newline at end of file diff --git a/db/schema_migrations/20201014163633 b/db/schema_migrations/20201014163633 deleted file mode 100644 index 6025edca343..00000000000 --- a/db/schema_migrations/20201014163633 +++ /dev/null @@ -1 +0,0 @@ -591bb8d685c686cced324825e7bec01711aee328176c1c5396a9e61847cb6fab
\ No newline at end of file diff --git a/db/schema_migrations/20201014205300 b/db/schema_migrations/20201014205300 deleted file mode 100644 index 7d183f22624..00000000000 --- a/db/schema_migrations/20201014205300 +++ /dev/null @@ -1 +0,0 @@ -05352623a59d56c1633317ba7dbaba7d75bb8e529a748a90512dcf3641b8d3cb
\ No newline at end of file diff --git a/db/schema_migrations/20201015073808 b/db/schema_migrations/20201015073808 deleted file mode 100644 index c14d0b7a528..00000000000 --- a/db/schema_migrations/20201015073808 +++ /dev/null @@ -1 +0,0 @@ -e44ab2a7b3014b44d7d84de1f7e618d2fc89f98b8d59f5f6fa331544e206355f
\ No newline at end of file diff --git a/db/schema_migrations/20201015121805 b/db/schema_migrations/20201015121805 deleted file mode 100644 index 50c3cd1285c..00000000000 --- a/db/schema_migrations/20201015121805 +++ /dev/null @@ -1 +0,0 @@ -b8d5890fe5569127e794eea831fc18f8e5708b326e8037963fe2f6ae7f120e27
\ No newline at end of file diff --git a/db/schema_migrations/20201015121825 b/db/schema_migrations/20201015121825 deleted file mode 100644 index b853c405ba0..00000000000 --- a/db/schema_migrations/20201015121825 +++ /dev/null @@ -1 +0,0 @@ -76e5a5bb535019da28041d1c7dddd8a18d3b04f688b38edc0c4214d3a4d6e357
\ No newline at end of file diff --git a/db/schema_migrations/20201015154527 b/db/schema_migrations/20201015154527 deleted file mode 100644 index 995483bef49..00000000000 --- a/db/schema_migrations/20201015154527 +++ /dev/null @@ -1 +0,0 @@ -319502924c38f5e78e40226a55ad99db53b246aa0d35eb945ac9a96f9e55f584
\ No newline at end of file diff --git a/db/schema_migrations/20201015194852 b/db/schema_migrations/20201015194852 deleted file mode 100644 index 665135a7e3e..00000000000 --- a/db/schema_migrations/20201015194852 +++ /dev/null @@ -1 +0,0 @@ -1b12f68f7d8c56ecdd7d6d7551d81f5d95d1b4dc5f8d4c67eb239b8640128531
\ No newline at end of file diff --git a/db/schema_migrations/20201015231049 b/db/schema_migrations/20201015231049 deleted file mode 100644 index 17a4147993a..00000000000 --- a/db/schema_migrations/20201015231049 +++ /dev/null @@ -1 +0,0 @@ -cae3c41e344f15fa5a9cf71546a0bf209ead964fd3efefba39aba79afd60e0be
\ No newline at end of file diff --git a/db/schema_migrations/20201016074302 b/db/schema_migrations/20201016074302 deleted file mode 100644 index e0ed03f0ac3..00000000000 --- a/db/schema_migrations/20201016074302 +++ /dev/null @@ -1 +0,0 @@ -de07bcc8166421d01382038d930cabb6a4749b314f05ca148e8d13cff947447c
\ No newline at end of file diff --git a/db/schema_migrations/20201019091307 b/db/schema_migrations/20201019091307 deleted file mode 100644 index 6b74c804ed8..00000000000 --- a/db/schema_migrations/20201019091307 +++ /dev/null @@ -1 +0,0 @@ -f19ab0de07415e728849ef4e56804909a3a4a57ad8f55fe71a27bc43c535ac66
\ No newline at end of file diff --git a/db/schema_migrations/20201019094741 b/db/schema_migrations/20201019094741 deleted file mode 100644 index 5e53ab91e9b..00000000000 --- a/db/schema_migrations/20201019094741 +++ /dev/null @@ -1 +0,0 @@ -16ef5ba153f1145dcd2578bb8c860d4e1a975d5df3a1b1d9315946e632a95999
\ No newline at end of file diff --git a/db/schema_migrations/20201019101549 b/db/schema_migrations/20201019101549 deleted file mode 100644 index 9b22cf277fb..00000000000 --- a/db/schema_migrations/20201019101549 +++ /dev/null @@ -1 +0,0 @@ -1bd99d7d6b972ea66495f21358e3b8731532219fcf75731bf643c312eb56820d
\ No newline at end of file diff --git a/db/schema_migrations/20201019111952 b/db/schema_migrations/20201019111952 deleted file mode 100644 index 7fe9fcf3b2f..00000000000 --- a/db/schema_migrations/20201019111952 +++ /dev/null @@ -1 +0,0 @@ -82d6ed3e066c15352abdb58d58d195f48aa7b1d17bbb28f58f42c19ae67fab54
\ No newline at end of file diff --git a/db/schema_migrations/20201019113009 b/db/schema_migrations/20201019113009 deleted file mode 100644 index 88d91b79607..00000000000 --- a/db/schema_migrations/20201019113009 +++ /dev/null @@ -1 +0,0 @@ -fe57e8e74ebbe0e9567c1487e6e4f8b499afa6404c73424157c43ae79c005f08
\ No newline at end of file diff --git a/db/schema_migrations/20201019130244 b/db/schema_migrations/20201019130244 deleted file mode 100644 index b37e6eeae70..00000000000 --- a/db/schema_migrations/20201019130244 +++ /dev/null @@ -1 +0,0 @@ -fcd2cc46dae4f4da96ac5a2100a9de9bd360defee82a9c9d6cfbda0e1507ee66
\ No newline at end of file diff --git a/db/schema_migrations/20201019152046 b/db/schema_migrations/20201019152046 deleted file mode 100644 index bc364a38a46..00000000000 --- a/db/schema_migrations/20201019152046 +++ /dev/null @@ -1 +0,0 @@ -e5b3bcac7150df4443879db05b18b6aeb01271d99965b2468278954dedf8413b
\ No newline at end of file diff --git a/db/schema_migrations/20201019161924 b/db/schema_migrations/20201019161924 deleted file mode 100644 index 3857a5cb5a1..00000000000 --- a/db/schema_migrations/20201019161924 +++ /dev/null @@ -1 +0,0 @@ -47aba29a35e24113c9f198c731ba95597a2a6cd5d16b01a958644ce3e1a96170
\ No newline at end of file diff --git a/db/schema_migrations/20201019172704 b/db/schema_migrations/20201019172704 deleted file mode 100644 index 0bf2d30205f..00000000000 --- a/db/schema_migrations/20201019172704 +++ /dev/null @@ -1 +0,0 @@ -2a426e1a7cc6283e777667a1b4a6987f011c6cfd189ec702abc55d13a8499eca
\ No newline at end of file diff --git a/db/schema_migrations/20201020102551 b/db/schema_migrations/20201020102551 deleted file mode 100644 index f658f1fdc0a..00000000000 --- a/db/schema_migrations/20201020102551 +++ /dev/null @@ -1 +0,0 @@ -ba16ad5a51494f436dc47ffb924f94ce7795bfd3b9061ca58d1c8dda238245e9
\ No newline at end of file diff --git a/db/schema_migrations/20201021085007 b/db/schema_migrations/20201021085007 deleted file mode 100644 index 59567962e80..00000000000 --- a/db/schema_migrations/20201021085007 +++ /dev/null @@ -1 +0,0 @@ -552f8a042bdecb7511d63e129438faff3fde8e1086cc88f7a79269b2b7098a65
\ No newline at end of file diff --git a/db/schema_migrations/20201021101956 b/db/schema_migrations/20201021101956 deleted file mode 100644 index bf3e1092fd1..00000000000 --- a/db/schema_migrations/20201021101956 +++ /dev/null @@ -1 +0,0 @@ -47158d21bd1a800e5a9da1bfea25870f14cc0b094e5f3e9a4b7608b8a9eca180
\ No newline at end of file diff --git a/db/schema_migrations/20201021102554 b/db/schema_migrations/20201021102554 deleted file mode 100644 index c2bd788943b..00000000000 --- a/db/schema_migrations/20201021102554 +++ /dev/null @@ -1 +0,0 @@ -90936786a9c2a9d035d13be87021b2f8278342cd11992d58753ca5a5413ed9d7
\ No newline at end of file diff --git a/db/schema_migrations/20201021105347 b/db/schema_migrations/20201021105347 deleted file mode 100644 index 86117fd6538..00000000000 --- a/db/schema_migrations/20201021105347 +++ /dev/null @@ -1 +0,0 @@ -d7683f7a2db6aa27606756c158fa029c932230713b165917bc05a491f10e7adf
\ No newline at end of file diff --git a/db/schema_migrations/20201021105600 b/db/schema_migrations/20201021105600 deleted file mode 100644 index 14d2edb23a6..00000000000 --- a/db/schema_migrations/20201021105600 +++ /dev/null @@ -1 +0,0 @@ -9b90dd436cc1c315eacc60acbc5f6b3b94029b82b4fcb27a41abc4941ad9a4ad
\ No newline at end of file diff --git a/db/schema_migrations/20201021105959 b/db/schema_migrations/20201021105959 deleted file mode 100644 index 2ddfcb102c9..00000000000 --- a/db/schema_migrations/20201021105959 +++ /dev/null @@ -1 +0,0 @@ -d924e4ad9ff67d01d660db3b3a1b9e5d74cecb1a127d598d1d1193cbfa499030
\ No newline at end of file diff --git a/db/schema_migrations/20201021142812 b/db/schema_migrations/20201021142812 deleted file mode 100644 index d4ddf2a3595..00000000000 --- a/db/schema_migrations/20201021142812 +++ /dev/null @@ -1 +0,0 @@ -81b9b79f2ca8830b9d9e9315d93421875dfe44cfa0da6f4e9166567452a2363b
\ No newline at end of file diff --git a/db/schema_migrations/20201021152210 b/db/schema_migrations/20201021152210 deleted file mode 100644 index 78358b24bad..00000000000 --- a/db/schema_migrations/20201021152210 +++ /dev/null @@ -1 +0,0 @@ -853dbc604fc8ce4d82e6040aa7a7970ae194f09bafb2749077cd9f48d2708eac
\ No newline at end of file diff --git a/db/schema_migrations/20201021155606 b/db/schema_migrations/20201021155606 deleted file mode 100644 index 958683e9bce..00000000000 --- a/db/schema_migrations/20201021155606 +++ /dev/null @@ -1 +0,0 @@ -d9151c8cafe7a62be9904cb05cc2a6f6e28c2910e69744df1ddd4ad587c83335
\ No newline at end of file diff --git a/db/schema_migrations/20201021190539 b/db/schema_migrations/20201021190539 deleted file mode 100644 index 902213f9029..00000000000 --- a/db/schema_migrations/20201021190539 +++ /dev/null @@ -1 +0,0 @@ -1d0689b5182ac391473075aeabb0e341fb8634dbf0aa87dbb6d48cc0e61d2ada
\ No newline at end of file diff --git a/db/schema_migrations/20201021220101 b/db/schema_migrations/20201021220101 deleted file mode 100644 index cda2e4076a5..00000000000 --- a/db/schema_migrations/20201021220101 +++ /dev/null @@ -1 +0,0 @@ -72580665fcb0fca332ede450690902c0a7afb6159feff41df1bc10a3cf6607f2
\ No newline at end of file diff --git a/db/schema_migrations/20201022080802 b/db/schema_migrations/20201022080802 deleted file mode 100644 index c84c8c6ffbe..00000000000 --- a/db/schema_migrations/20201022080802 +++ /dev/null @@ -1 +0,0 @@ -809d93d367ff9310063904ee3c266914311ef54e8c7f9d6d7fd924d25890bf19
\ No newline at end of file diff --git a/db/schema_migrations/20201022094845 b/db/schema_migrations/20201022094845 deleted file mode 100644 index 3bc0b95b711..00000000000 --- a/db/schema_migrations/20201022094845 +++ /dev/null @@ -1 +0,0 @@ -16b402740c6b1dd21908265085e516f63f8858424724ba97f46658e7bd5f7bf2
\ No newline at end of file diff --git a/db/schema_migrations/20201022094846 b/db/schema_migrations/20201022094846 deleted file mode 100644 index 40ef0760dc8..00000000000 --- a/db/schema_migrations/20201022094846 +++ /dev/null @@ -1 +0,0 @@ -588c5f99d34652bbd5bde86351cbdb8c0455af0c31a440bfb63df02f12fd588f
\ No newline at end of file diff --git a/db/schema_migrations/20201022103304 b/db/schema_migrations/20201022103304 deleted file mode 100644 index e54cb431bd4..00000000000 --- a/db/schema_migrations/20201022103304 +++ /dev/null @@ -1 +0,0 @@ -aa15aad0b51f313f3cd59e1065023146fe53c6bd50319656ae992f8f43e1525e
\ No newline at end of file diff --git a/db/schema_migrations/20201022144501 b/db/schema_migrations/20201022144501 deleted file mode 100644 index 4e82b2785d0..00000000000 --- a/db/schema_migrations/20201022144501 +++ /dev/null @@ -1 +0,0 @@ -f9a573d50f8b4aeb3d8d2cc2f0223ab9970776d663e49e0f022e96158593d929
\ No newline at end of file diff --git a/db/schema_migrations/20201022191817 b/db/schema_migrations/20201022191817 deleted file mode 100644 index 619ae381a72..00000000000 --- a/db/schema_migrations/20201022191817 +++ /dev/null @@ -1 +0,0 @@ -205cb628e9637bcd1acb90c5211b71b51015fa5f50aadcacd5fbafc4f09c00d0
\ No newline at end of file diff --git a/db/schema_migrations/20201022192254 b/db/schema_migrations/20201022192254 deleted file mode 100644 index c09518b0e6c..00000000000 --- a/db/schema_migrations/20201022192254 +++ /dev/null @@ -1 +0,0 @@ -9f942de6f83629a144e9d460b4bed7a246afe95275b5913745109fc0ab9dacc1
\ No newline at end of file diff --git a/db/schema_migrations/20201023114628 b/db/schema_migrations/20201023114628 deleted file mode 100644 index 458392082ca..00000000000 --- a/db/schema_migrations/20201023114628 +++ /dev/null @@ -1 +0,0 @@ -f4fb466c74e1366d5980a54d6e5fc42fe78237cae33d8cdaf5573d2fe75f8a5a
\ No newline at end of file diff --git a/db/schema_migrations/20201026051643 b/db/schema_migrations/20201026051643 deleted file mode 100644 index f3290df0d23..00000000000 --- a/db/schema_migrations/20201026051643 +++ /dev/null @@ -1 +0,0 @@ -bb20b72c7fa65735f37d896cc098d27edd4cc07c3083fdb567e4b421309703a7
\ No newline at end of file diff --git a/db/schema_migrations/20201026182253 b/db/schema_migrations/20201026182253 deleted file mode 100644 index a8da92aa906..00000000000 --- a/db/schema_migrations/20201026182253 +++ /dev/null @@ -1 +0,0 @@ -ab2b8af98a8a29658f92c302d45668c7b9f8f5234ef35f4311a0f0ebbd954ec8
\ No newline at end of file diff --git a/db/schema_migrations/20201026185514 b/db/schema_migrations/20201026185514 deleted file mode 100644 index f6bdd06e501..00000000000 --- a/db/schema_migrations/20201026185514 +++ /dev/null @@ -1 +0,0 @@ -a9ae0161c40b9c72371d6eb992bd0da8c3698e7784357faac0821e3f513e48d2
\ No newline at end of file diff --git a/db/schema_migrations/20201026200736 b/db/schema_migrations/20201026200736 deleted file mode 100644 index 7ed57505c3e..00000000000 --- a/db/schema_migrations/20201026200736 +++ /dev/null @@ -1 +0,0 @@ -691fe3335de3e072bc5612705c4d16744ff17e334025ddd78eb37309f87441e3
\ No newline at end of file diff --git a/db/schema_migrations/20201027002551 b/db/schema_migrations/20201027002551 deleted file mode 100644 index f4a5527fac7..00000000000 --- a/db/schema_migrations/20201027002551 +++ /dev/null @@ -1 +0,0 @@ -34e357b739235d627e543e1bc7202e0cf26f5b1ca8021bb25357e29e883f785b
\ No newline at end of file diff --git a/db/schema_migrations/20201027101010 b/db/schema_migrations/20201027101010 deleted file mode 100644 index 68628373757..00000000000 --- a/db/schema_migrations/20201027101010 +++ /dev/null @@ -1 +0,0 @@ -d6b324e808265c4ba8b6216c77b7abfa96b4b8b4c9fbd8d0a15240548526c4f3
\ No newline at end of file diff --git a/db/schema_migrations/20201027135651 b/db/schema_migrations/20201027135651 deleted file mode 100644 index eb3a5080c0f..00000000000 --- a/db/schema_migrations/20201027135651 +++ /dev/null @@ -1 +0,0 @@ -3f24bfc2d18ffa5f171e027d4e7aaf9994b255e5806e2de57fd36b4a193db122
\ No newline at end of file diff --git a/db/schema_migrations/20201027210127 b/db/schema_migrations/20201027210127 deleted file mode 100644 index ab0ba73f588..00000000000 --- a/db/schema_migrations/20201027210127 +++ /dev/null @@ -1 +0,0 @@ -c269a999cabce99d26f3be303656bbb27f2b843b639755b112ad350d4cb5b5c6
\ No newline at end of file diff --git a/db/schema_migrations/20201027211138 b/db/schema_migrations/20201027211138 deleted file mode 100644 index 5e36445702b..00000000000 --- a/db/schema_migrations/20201027211138 +++ /dev/null @@ -1 +0,0 @@ -402e9a6e92802888ba01ee216850ab5b0fe9997a84415c9ffe8d5d37a9823220
\ No newline at end of file diff --git a/db/schema_migrations/20201028160831 b/db/schema_migrations/20201028160831 deleted file mode 100644 index de94901dcc5..00000000000 --- a/db/schema_migrations/20201028160831 +++ /dev/null @@ -1 +0,0 @@ -4b0c70d8cd2648149011adab4f302922483436406f361c3037f26efb12b19042
\ No newline at end of file diff --git a/db/schema_migrations/20201028160832 b/db/schema_migrations/20201028160832 deleted file mode 100644 index 4b0da32b638..00000000000 --- a/db/schema_migrations/20201028160832 +++ /dev/null @@ -1 +0,0 @@ -9ea8e8f1234d6291ea00e725d380bfe33d804853b90da1221be8781b3dd9bb77
\ No newline at end of file diff --git a/db/schema_migrations/20201028182809 b/db/schema_migrations/20201028182809 deleted file mode 100644 index 6747bd58d72..00000000000 --- a/db/schema_migrations/20201028182809 +++ /dev/null @@ -1 +0,0 @@ -c51bf825045ef80714f3903f25321785883da3d612725f6fa67ec3ddd12d5808
\ No newline at end of file diff --git a/db/schema_migrations/20201028184640 b/db/schema_migrations/20201028184640 deleted file mode 100644 index 4cac95e4e7b..00000000000 --- a/db/schema_migrations/20201028184640 +++ /dev/null @@ -1 +0,0 @@ -5520cca016af07fb2e009c0e3254362f106a9cc808cbb61e280221be82be1b25
\ No newline at end of file diff --git a/db/schema_migrations/20201028204306 b/db/schema_migrations/20201028204306 deleted file mode 100644 index 03b68c9a0d1..00000000000 --- a/db/schema_migrations/20201028204306 +++ /dev/null @@ -1 +0,0 @@ -ec5bab20a1b591b77b48b85dc0b871e88a41891d256201b7d8eb86195ef1c4ad
\ No newline at end of file diff --git a/db/schema_migrations/20201029052241 b/db/schema_migrations/20201029052241 deleted file mode 100644 index 8257e4d3681..00000000000 --- a/db/schema_migrations/20201029052241 +++ /dev/null @@ -1 +0,0 @@ -87e330bc15accb10733825b079cf89e78d905a7c4080075489857085f014bfe7
\ No newline at end of file diff --git a/db/schema_migrations/20201029143650 b/db/schema_migrations/20201029143650 deleted file mode 100644 index c6f00890f4f..00000000000 --- a/db/schema_migrations/20201029143650 +++ /dev/null @@ -1 +0,0 @@ -c718bc731f7dc3e1f0104dfdb79a3dc46c46849153ec9b228600eeb5a92465e7
\ No newline at end of file diff --git a/db/schema_migrations/20201029144157 b/db/schema_migrations/20201029144157 deleted file mode 100644 index 7fdac19230f..00000000000 --- a/db/schema_migrations/20201029144157 +++ /dev/null @@ -1 +0,0 @@ -a61310c95a1302871ea18881d45bc0c7357baa8f24daa31b7e2174318dab5707
\ No newline at end of file diff --git a/db/schema_migrations/20201029144444 b/db/schema_migrations/20201029144444 deleted file mode 100644 index 1ab20b33da5..00000000000 --- a/db/schema_migrations/20201029144444 +++ /dev/null @@ -1 +0,0 @@ -50e4e42c804d3abdcfe9ab2bbb890262d4b2ddd93bff1b2af1da1e55a0300cf5
\ No newline at end of file diff --git a/db/schema_migrations/20201029144524 b/db/schema_migrations/20201029144524 deleted file mode 100644 index dd25e96ff02..00000000000 --- a/db/schema_migrations/20201029144524 +++ /dev/null @@ -1 +0,0 @@ -764f08e3083985bb8e206bd25fb27209702110bb4848c8bbfc6546a2777d9157
\ No newline at end of file diff --git a/db/schema_migrations/20201030092151 b/db/schema_migrations/20201030092151 deleted file mode 100644 index 7b39a8e0dca..00000000000 --- a/db/schema_migrations/20201030092151 +++ /dev/null @@ -1 +0,0 @@ -ced03562d300f99abf687c258a25bf280a6c4f1798a893ee8a79189c09f19e6e
\ No newline at end of file diff --git a/db/schema_migrations/20201030121314 b/db/schema_migrations/20201030121314 deleted file mode 100644 index b96f100cbd7..00000000000 --- a/db/schema_migrations/20201030121314 +++ /dev/null @@ -1 +0,0 @@ -4875c1def91676d73f14c2fbff9318fc4ab1f26535503fd9700044b687e9714e
\ No newline at end of file diff --git a/db/schema_migrations/20201030200115 b/db/schema_migrations/20201030200115 deleted file mode 100644 index ed9c743f538..00000000000 --- a/db/schema_migrations/20201030200115 +++ /dev/null @@ -1 +0,0 @@ -bef50f2417b9676c89aea838f7b9c85fb88af9f52c197d8eb4613a9c91bc7741
\ No newline at end of file diff --git a/db/schema_migrations/20201030200539 b/db/schema_migrations/20201030200539 deleted file mode 100644 index f8e7642befb..00000000000 --- a/db/schema_migrations/20201030200539 +++ /dev/null @@ -1 +0,0 @@ -2f6c7efc1716d02dd40adb08bd09b9f1e63e4248619678c0562f4b8d581e6065
\ No newline at end of file diff --git a/db/schema_migrations/20201030203854 b/db/schema_migrations/20201030203854 deleted file mode 100644 index 6a337c366aa..00000000000 --- a/db/schema_migrations/20201030203854 +++ /dev/null @@ -1 +0,0 @@ -3937235469c8fb1f2b0af9cdf38933db5ae61552d1a9050755cec5f7c16ebb66
\ No newline at end of file diff --git a/db/schema_migrations/20201030223933 b/db/schema_migrations/20201030223933 deleted file mode 100644 index 2fb5f394989..00000000000 --- a/db/schema_migrations/20201030223933 +++ /dev/null @@ -1 +0,0 @@ -a3aa783f2648a95e3ff8b503ef15b8153759c74ac85b30bf94e39710824e57b0
\ No newline at end of file diff --git a/db/schema_migrations/20201102073808 b/db/schema_migrations/20201102073808 deleted file mode 100644 index 9e77ee028a5..00000000000 --- a/db/schema_migrations/20201102073808 +++ /dev/null @@ -1 +0,0 @@ -153b437ac481f4d79cd5bdee45dd3932f3cb58bf5dce793573c4b651a3b9314f
\ No newline at end of file diff --git a/db/schema_migrations/20201102112206 b/db/schema_migrations/20201102112206 deleted file mode 100644 index 5bbba26e110..00000000000 --- a/db/schema_migrations/20201102112206 +++ /dev/null @@ -1 +0,0 @@ -a861c91ebc7f7892020ba10a151df761b38bf69d5e02bcdf72a965eb266e6aff
\ No newline at end of file diff --git a/db/schema_migrations/20201102114018 b/db/schema_migrations/20201102114018 deleted file mode 100644 index 33615073453..00000000000 --- a/db/schema_migrations/20201102114018 +++ /dev/null @@ -1 +0,0 @@ -dc1c372f4976e3747d7201406123a54e3852d9ea9516089043a93698a09e2f9f
\ No newline at end of file diff --git a/db/schema_migrations/20201102152554 b/db/schema_migrations/20201102152554 deleted file mode 100644 index f52694965c6..00000000000 --- a/db/schema_migrations/20201102152554 +++ /dev/null @@ -1 +0,0 @@ -7ec73c06ccc4c9f618e0455d0a7aae3b591bf52b5ddb1b3f1678d2fd50b9fd5e
\ No newline at end of file diff --git a/db/schema_migrations/20201102152945 b/db/schema_migrations/20201102152945 deleted file mode 100644 index cb4ae9c2598..00000000000 --- a/db/schema_migrations/20201102152945 +++ /dev/null @@ -1 +0,0 @@ -55ffd18d5f55ee0fd51a31d50cf2d51595740c72ca23d5134d93e2da3fc186ff
\ No newline at end of file diff --git a/db/schema_migrations/20201102184743 b/db/schema_migrations/20201102184743 deleted file mode 100644 index da002122e5d..00000000000 --- a/db/schema_migrations/20201102184743 +++ /dev/null @@ -1 +0,0 @@ -040e73d690cb315627fe16c931273aa1f86dfabb481dc2086f787d067b87642f
\ No newline at end of file diff --git a/db/schema_migrations/20201103013242 b/db/schema_migrations/20201103013242 deleted file mode 100644 index 1f592b4a619..00000000000 --- a/db/schema_migrations/20201103013242 +++ /dev/null @@ -1 +0,0 @@ -8a30cf20f71e0cb198caf6f77a19e4da55b83eb38bdb5888cd2674373d94cede
\ No newline at end of file diff --git a/db/schema_migrations/20201103045515 b/db/schema_migrations/20201103045515 deleted file mode 100644 index 31b56acb147..00000000000 --- a/db/schema_migrations/20201103045515 +++ /dev/null @@ -1 +0,0 @@ -0172b71564e3d3e30c543890a4672b5a118f8053324b177fbbd9e83357ddf3a8
\ No newline at end of file diff --git a/db/schema_migrations/20201103095752 b/db/schema_migrations/20201103095752 deleted file mode 100644 index 4888f7c5dfb..00000000000 --- a/db/schema_migrations/20201103095752 +++ /dev/null @@ -1 +0,0 @@ -3427cf92dc785f399329b00a3dded01dd2a6386cafbd0ef4b732bfcf522ce615
\ No newline at end of file diff --git a/db/schema_migrations/20201103110018 b/db/schema_migrations/20201103110018 deleted file mode 100644 index 82ab2fda543..00000000000 --- a/db/schema_migrations/20201103110018 +++ /dev/null @@ -1 +0,0 @@ -8a45a6186d7e18f1dea43593dc0226860fc2e8d3ae386f50a022958b758c7c75
\ No newline at end of file diff --git a/db/schema_migrations/20201103171537 b/db/schema_migrations/20201103171537 deleted file mode 100644 index 4621c0e4802..00000000000 --- a/db/schema_migrations/20201103171537 +++ /dev/null @@ -1 +0,0 @@ -3120428427e3c0c94799501b1d31f384c98899f2ef9bda6f95066c94afd5ecf8
\ No newline at end of file diff --git a/db/schema_migrations/20201103184333 b/db/schema_migrations/20201103184333 deleted file mode 100644 index 0475ea2b466..00000000000 --- a/db/schema_migrations/20201103184333 +++ /dev/null @@ -1 +0,0 @@ -a3117169b472fffd6302a4da17850a11474c196fd06ebeb3f6b28705d59c74ba
\ No newline at end of file diff --git a/db/schema_migrations/20201103192526 b/db/schema_migrations/20201103192526 deleted file mode 100644 index 8fe11ed16d6..00000000000 --- a/db/schema_migrations/20201103192526 +++ /dev/null @@ -1 +0,0 @@ -bb137c3a41a40e740f8ae65b43d7f9218f52d6d5eaf53c8a64b3336a8f16141b
\ No newline at end of file diff --git a/db/schema_migrations/20201103202213 b/db/schema_migrations/20201103202213 deleted file mode 100644 index 74b0b1888d2..00000000000 --- a/db/schema_migrations/20201103202213 +++ /dev/null @@ -1 +0,0 @@ -af006a3c01620c258a253b5c9ccca6faa4cb46a97dddbfeecc0ecc4454eb46e6
\ No newline at end of file diff --git a/db/schema_migrations/20201104124300 b/db/schema_migrations/20201104124300 deleted file mode 100644 index 6c54da0da54..00000000000 --- a/db/schema_migrations/20201104124300 +++ /dev/null @@ -1 +0,0 @@ -e17da7eebb6d054a711368369d2b4fa684e96344f845bb7c6b3c89a9b4c4e067
\ No newline at end of file diff --git a/db/schema_migrations/20201104142036 b/db/schema_migrations/20201104142036 deleted file mode 100644 index 9c41c9c9724..00000000000 --- a/db/schema_migrations/20201104142036 +++ /dev/null @@ -1 +0,0 @@ -bde71afbe34006eedbd97ac457df31b247fc89a572ca8900c60b16c4d6a8ef93
\ No newline at end of file diff --git a/db/schema_migrations/20201104204739 b/db/schema_migrations/20201104204739 deleted file mode 100644 index 83794fd569f..00000000000 --- a/db/schema_migrations/20201104204739 +++ /dev/null @@ -1 +0,0 @@ -9431c771b14d61851e8e69b3a789f222463bbe460078a35c8ad3cbcf8df8b077
\ No newline at end of file diff --git a/db/schema_migrations/20201105021637 b/db/schema_migrations/20201105021637 deleted file mode 100644 index 05a76d22568..00000000000 --- a/db/schema_migrations/20201105021637 +++ /dev/null @@ -1 +0,0 @@ -b04e37c8713a333afbff4c7034d9f3ffca4a4490d0b563b73d9e6bffd45f3f6a
\ No newline at end of file diff --git a/db/schema_migrations/20201105024127 b/db/schema_migrations/20201105024127 deleted file mode 100644 index fecda19cb2f..00000000000 --- a/db/schema_migrations/20201105024127 +++ /dev/null @@ -1 +0,0 @@ -afeff8d6bf5ca14f955f5d387e8d219e852e9617b80fe07ed2e1b57af19fd4fa
\ No newline at end of file diff --git a/db/schema_migrations/20201105135051 b/db/schema_migrations/20201105135051 deleted file mode 100644 index 26ebc47fd3a..00000000000 --- a/db/schema_migrations/20201105135051 +++ /dev/null @@ -1 +0,0 @@ -41cc59ebfeed647b2525191befa43c1faeb1c133a687a5c93124f4b4c745117a
\ No newline at end of file diff --git a/db/schema_migrations/20201105143211 b/db/schema_migrations/20201105143211 deleted file mode 100644 index 6ddf20c1d68..00000000000 --- a/db/schema_migrations/20201105143211 +++ /dev/null @@ -1 +0,0 @@ -b614435cdb654ebbd11bcc5ac0ed69352219e51b368d8f10c0b2998c5258caf9
\ No newline at end of file diff --git a/db/schema_migrations/20201105143312 b/db/schema_migrations/20201105143312 deleted file mode 100644 index fe616c85dc9..00000000000 --- a/db/schema_migrations/20201105143312 +++ /dev/null @@ -1 +0,0 @@ -decdc314dbcf6b8ac2ce140f81f9d342efca0d98bbeff10c7a041568a67b63f3
\ No newline at end of file diff --git a/db/schema_migrations/20201106082723 b/db/schema_migrations/20201106082723 deleted file mode 100644 index 0bb6a3b85b8..00000000000 --- a/db/schema_migrations/20201106082723 +++ /dev/null @@ -1 +0,0 @@ -a2dc0d31af6834adf6634f6051d7d451fc48d31492d96efe57547c3e9d61a64d
\ No newline at end of file diff --git a/db/schema_migrations/20201106134139 b/db/schema_migrations/20201106134139 deleted file mode 100644 index 245cbbf712e..00000000000 --- a/db/schema_migrations/20201106134139 +++ /dev/null @@ -1 +0,0 @@ -9b1008df64741ad313ddf51969c18d609cd01a7255563fe0395d2bbf4d288e30
\ No newline at end of file diff --git a/db/schema_migrations/20201106134950 b/db/schema_migrations/20201106134950 deleted file mode 100644 index b36cccd4c40..00000000000 --- a/db/schema_migrations/20201106134950 +++ /dev/null @@ -1 +0,0 @@ -f6e4e62dbd992fc8283f3d7872bb33f1b6bea1b366806caf8f7a65140584c0c1
\ No newline at end of file diff --git a/db/schema_migrations/20201106135608 b/db/schema_migrations/20201106135608 deleted file mode 100644 index ce6570d9dbf..00000000000 --- a/db/schema_migrations/20201106135608 +++ /dev/null @@ -1 +0,0 @@ -52c8fb75035a08e212db52d032638a0c8f9d91306bfb8015fb3fc403a1cff1ec
\ No newline at end of file diff --git a/db/schema_migrations/20201106193452 b/db/schema_migrations/20201106193452 deleted file mode 100644 index c5ce966adfc..00000000000 --- a/db/schema_migrations/20201106193452 +++ /dev/null @@ -1 +0,0 @@ -dedc2eba6614c61df6e907ddd9813eea2b00fc43bccc6c3325674ad39950df62
\ No newline at end of file diff --git a/db/schema_migrations/20201107032257 b/db/schema_migrations/20201107032257 deleted file mode 100644 index 4ea5f763dc0..00000000000 --- a/db/schema_migrations/20201107032257 +++ /dev/null @@ -1 +0,0 @@ -07160ee3c92e68273042df979640c3927abbb187f79e1a4645471e28061e1c2c
\ No newline at end of file diff --git a/db/schema_migrations/20201108134919 b/db/schema_migrations/20201108134919 deleted file mode 100644 index 10e88ae9359..00000000000 --- a/db/schema_migrations/20201108134919 +++ /dev/null @@ -1 +0,0 @@ -6643e5b4c5597d92c94115f392bfbd5cfce9884eb0bcb18f9629855f3711eed0
\ No newline at end of file diff --git a/db/schema_migrations/20201109080645 b/db/schema_migrations/20201109080645 deleted file mode 100644 index 403f1951b8b..00000000000 --- a/db/schema_migrations/20201109080645 +++ /dev/null @@ -1 +0,0 @@ -27ee3c5429dba139e6c300961172c4f90d25397e3d1e13d0654e049b63ac3325
\ No newline at end of file diff --git a/db/schema_migrations/20201109080646 b/db/schema_migrations/20201109080646 deleted file mode 100644 index ef0edcba9cf..00000000000 --- a/db/schema_migrations/20201109080646 +++ /dev/null @@ -1 +0,0 @@ -bdbf3cf39228c9b65b02391a9aa030bdeb06aa3fc9955e2fd53bd784bea37b66
\ No newline at end of file diff --git a/db/schema_migrations/20201109114603 b/db/schema_migrations/20201109114603 deleted file mode 100644 index c1df2223dbd..00000000000 --- a/db/schema_migrations/20201109114603 +++ /dev/null @@ -1 +0,0 @@ -ae8034ec52df47ce2ce3397715dd18347e4d297a963c17c7b26321f414dfa632
\ No newline at end of file diff --git a/db/schema_migrations/20201109144634 b/db/schema_migrations/20201109144634 deleted file mode 100644 index 8f47a75dfb8..00000000000 --- a/db/schema_migrations/20201109144634 +++ /dev/null @@ -1 +0,0 @@ -cbb2a2027fb6083771e97510a00c07a4ded0576e89fafd6cff4faba4e21c82c0
\ No newline at end of file diff --git a/db/schema_migrations/20201109180311 b/db/schema_migrations/20201109180311 deleted file mode 100644 index 0752e2dabb3..00000000000 --- a/db/schema_migrations/20201109180311 +++ /dev/null @@ -1 +0,0 @@ -49143d2a7dd0a53c051151b0cdc93745a0fa1b01e6d54bb663e147c2064d9290
\ No newline at end of file diff --git a/db/schema_migrations/20201109184023 b/db/schema_migrations/20201109184023 deleted file mode 100644 index 7a66c0f0f4c..00000000000 --- a/db/schema_migrations/20201109184023 +++ /dev/null @@ -1 +0,0 @@ -698bcedf387fc01fbb7f1899f0f7660ba86a197fa72cf71d998cc90e3d1da9f3
\ No newline at end of file diff --git a/db/schema_migrations/20201110035029 b/db/schema_migrations/20201110035029 deleted file mode 100644 index 9631f17bce0..00000000000 --- a/db/schema_migrations/20201110035029 +++ /dev/null @@ -1 +0,0 @@ -21245809e056dfefedc4d2c6a8e2bf642bfcee480a863f8707ba6fa6b748a2e0
\ No newline at end of file diff --git a/db/schema_migrations/20201110110454 b/db/schema_migrations/20201110110454 deleted file mode 100644 index 5b721550325..00000000000 --- a/db/schema_migrations/20201110110454 +++ /dev/null @@ -1 +0,0 @@ -f008d77d2a0aef463a924923d5a338030758d6b9c194756a0490b51a95681127
\ No newline at end of file diff --git a/db/schema_migrations/20201110133629 b/db/schema_migrations/20201110133629 deleted file mode 100644 index 487b5eab7c1..00000000000 --- a/db/schema_migrations/20201110133629 +++ /dev/null @@ -1 +0,0 @@ -83773b825db9b2671fd4ffb2c0d6733036737385ce7a933040011026b34ba1e1
\ No newline at end of file diff --git a/db/schema_migrations/20201110161542 b/db/schema_migrations/20201110161542 deleted file mode 100644 index 1d4ca947738..00000000000 --- a/db/schema_migrations/20201110161542 +++ /dev/null @@ -1 +0,0 @@ -ebc304867bab499da3f9fa69b32373a328948b5068b226df5166042d1c1c7604
\ No newline at end of file diff --git a/db/schema_migrations/20201110221400 b/db/schema_migrations/20201110221400 deleted file mode 100644 index 703dcba863a..00000000000 --- a/db/schema_migrations/20201110221400 +++ /dev/null @@ -1 +0,0 @@ -9fba60d8805915fcf6af7812e2c752007ac17bb92c8a02c942c0c790d2997441
\ No newline at end of file diff --git a/db/schema_migrations/20201111051655 b/db/schema_migrations/20201111051655 deleted file mode 100644 index a2fff09e4b0..00000000000 --- a/db/schema_migrations/20201111051655 +++ /dev/null @@ -1 +0,0 @@ -4340d0f6d3b660b336fdc3166a4960865c79e90f505b1173bab4e0d11c1199b3
\ No newline at end of file diff --git a/db/schema_migrations/20201111051847 b/db/schema_migrations/20201111051847 deleted file mode 100644 index 6d593fc1497..00000000000 --- a/db/schema_migrations/20201111051847 +++ /dev/null @@ -1 +0,0 @@ -8180908c5e577757b3f518d312cbf0ba77c65b39fa55dde487036541f49114a1
\ No newline at end of file diff --git a/db/schema_migrations/20201111051904 b/db/schema_migrations/20201111051904 deleted file mode 100644 index 857f3a58788..00000000000 --- a/db/schema_migrations/20201111051904 +++ /dev/null @@ -1 +0,0 @@ -c228aa5c16e63af7520dd1bd90cefb1f74ec2371af3b0e839938d8c628f70e8a
\ No newline at end of file diff --git a/db/schema_migrations/20201111100136 b/db/schema_migrations/20201111100136 deleted file mode 100644 index da41078fafb..00000000000 --- a/db/schema_migrations/20201111100136 +++ /dev/null @@ -1 +0,0 @@ -7a905f8e636be21e328a622d9871018903982989836e6e0def09fd2c2826691f
\ No newline at end of file diff --git a/db/schema_migrations/20201111110318 b/db/schema_migrations/20201111110318 deleted file mode 100644 index 0a88f8f09df..00000000000 --- a/db/schema_migrations/20201111110318 +++ /dev/null @@ -1 +0,0 @@ -4168c39fe93b1c11d8080e07167f79c8234c74a7b274332174d9e861f2084ada
\ No newline at end of file diff --git a/db/schema_migrations/20201111110918 b/db/schema_migrations/20201111110918 deleted file mode 100644 index cfc30e2bcfc..00000000000 --- a/db/schema_migrations/20201111110918 +++ /dev/null @@ -1 +0,0 @@ -f5705da7bce46d98ca798c85f08d8a6a0577839aabacd0ba9b50e0b7351a4e96
\ No newline at end of file diff --git a/db/schema_migrations/20201111115414 b/db/schema_migrations/20201111115414 deleted file mode 100644 index b6fc30be8df..00000000000 --- a/db/schema_migrations/20201111115414 +++ /dev/null @@ -1 +0,0 @@ -0efb2dcfc65da007a67a15857d0a283dad301650f999a4227aa54ea00dca24bf
\ No newline at end of file diff --git a/db/schema_migrations/20201111145317 b/db/schema_migrations/20201111145317 deleted file mode 100644 index b6b33df7645..00000000000 --- a/db/schema_migrations/20201111145317 +++ /dev/null @@ -1 +0,0 @@ -51d26848722466503e43b0f41e2fa43ee6073a16b358311a0aff6d77fbb12b1d
\ No newline at end of file diff --git a/db/schema_migrations/20201111152859 b/db/schema_migrations/20201111152859 deleted file mode 100644 index 2d5b337b857..00000000000 --- a/db/schema_migrations/20201111152859 +++ /dev/null @@ -1 +0,0 @@ -4c5baa6a09a339fac544f830d5ef822b1e7e4eae8431bd91df5113125accbc77
\ No newline at end of file diff --git a/db/schema_migrations/20201112130710 b/db/schema_migrations/20201112130710 deleted file mode 100644 index a13668cf3ce..00000000000 --- a/db/schema_migrations/20201112130710 +++ /dev/null @@ -1 +0,0 @@ -322d7270e942c161cc8b50b8c3f531c93b6e6e938e415c1b6010a70b630bf82e
\ No newline at end of file diff --git a/db/schema_migrations/20201112130715 b/db/schema_migrations/20201112130715 deleted file mode 100644 index b241214e15e..00000000000 --- a/db/schema_migrations/20201112130715 +++ /dev/null @@ -1 +0,0 @@ -fc821ffb2e2298bfdf3555bb255e2300f3722141cadc8f89e62646fd6f22faf0
\ No newline at end of file diff --git a/db/schema_migrations/20201112132808 b/db/schema_migrations/20201112132808 deleted file mode 100644 index d6cc9595c80..00000000000 --- a/db/schema_migrations/20201112132808 +++ /dev/null @@ -1 +0,0 @@ -2b30b1ba41a49ce4a81711e6fef1dbcdaf8b76f824aaf83702cd27833815e57b
\ No newline at end of file diff --git a/db/schema_migrations/20201112145311 b/db/schema_migrations/20201112145311 deleted file mode 100644 index b6b88862a38..00000000000 --- a/db/schema_migrations/20201112145311 +++ /dev/null @@ -1 +0,0 @@ -085bb21bdbe3d062b3000d63c111aab5ba75c7e049c32779cccac5c320583759
\ No newline at end of file diff --git a/db/schema_migrations/20201112173532 b/db/schema_migrations/20201112173532 deleted file mode 100644 index a0c879e5b36..00000000000 --- a/db/schema_migrations/20201112173532 +++ /dev/null @@ -1 +0,0 @@ -d88a47333a4cc2b6c4aafa817c766822728d14b947a195c7c40b39e0c8b41610
\ No newline at end of file diff --git a/db/schema_migrations/20201112173911 b/db/schema_migrations/20201112173911 deleted file mode 100644 index aa98ecb7f14..00000000000 --- a/db/schema_migrations/20201112173911 +++ /dev/null @@ -1 +0,0 @@ -dde78a32d53a695e82b44574458b3670dce4803ffc6f34a1216f3671cca470ed
\ No newline at end of file diff --git a/db/schema_migrations/20201112195322 b/db/schema_migrations/20201112195322 deleted file mode 100644 index ba4c7e9d50f..00000000000 --- a/db/schema_migrations/20201112195322 +++ /dev/null @@ -1 +0,0 @@ -644bf793b3b62330bfb1f4dc406e6dd01cbcf4651ebfd2873fb551c757c8a3b4
\ No newline at end of file diff --git a/db/schema_migrations/20201112215028 b/db/schema_migrations/20201112215028 deleted file mode 100644 index 07cedc7a146..00000000000 --- a/db/schema_migrations/20201112215028 +++ /dev/null @@ -1 +0,0 @@ -d8d774e788eeaaecbda3cb7c5530926e74843d844bfad27b6a6e65bf5f89ac8a
\ No newline at end of file diff --git a/db/schema_migrations/20201112215132 b/db/schema_migrations/20201112215132 deleted file mode 100644 index e478dd0f9bf..00000000000 --- a/db/schema_migrations/20201112215132 +++ /dev/null @@ -1 +0,0 @@ -a436597e876a6d9efc2c1558e05dc576cbbc6f829dc8059d62fc231bbf0ce2fa
\ No newline at end of file diff --git a/db/schema_migrations/20201113105000 b/db/schema_migrations/20201113105000 deleted file mode 100644 index 0fe67898517..00000000000 --- a/db/schema_migrations/20201113105000 +++ /dev/null @@ -1 +0,0 @@ -9f2c60df8e89f89d721f7f7917048eb914fa7c7726ec42dcb772ff7a90c54a9c
\ No newline at end of file diff --git a/db/schema_migrations/20201116090328 b/db/schema_migrations/20201116090328 deleted file mode 100644 index 423eb54ff21..00000000000 --- a/db/schema_migrations/20201116090328 +++ /dev/null @@ -1 +0,0 @@ -39a109d2a0daaac6e5d40b13ee48f5388b85320c1ae6214408596417794307f3
\ No newline at end of file diff --git a/db/schema_migrations/20201116211829 b/db/schema_migrations/20201116211829 deleted file mode 100644 index bc583573000..00000000000 --- a/db/schema_migrations/20201116211829 +++ /dev/null @@ -1 +0,0 @@ -ecec9923058e58a5279f75dd9c2ff61263f187a1d893bb84241c57a4061dadf8
\ No newline at end of file diff --git a/db/schema_migrations/20201117054609 b/db/schema_migrations/20201117054609 deleted file mode 100644 index 624c12754d3..00000000000 --- a/db/schema_migrations/20201117054609 +++ /dev/null @@ -1 +0,0 @@ -119afd73a58c247522446bc9693ece5c83a25c279e4dd7dfb942f7febd5b7a82
\ No newline at end of file diff --git a/db/schema_migrations/20201117075742 b/db/schema_migrations/20201117075742 deleted file mode 100644 index b3efeee7e0b..00000000000 --- a/db/schema_migrations/20201117075742 +++ /dev/null @@ -1 +0,0 @@ -a39bad8b213833c84370cf64188a3ce444fd8aeeff239c29f5f2f633d94ac6bb
\ No newline at end of file diff --git a/db/schema_migrations/20201117153333 b/db/schema_migrations/20201117153333 deleted file mode 100644 index ee496f91777..00000000000 --- a/db/schema_migrations/20201117153333 +++ /dev/null @@ -1 +0,0 @@ -008f3a69d23abbd513336c5a48b2448e470a9413920beeb6a1684d0c6840d6a4
\ No newline at end of file diff --git a/db/schema_migrations/20201117184334 b/db/schema_migrations/20201117184334 deleted file mode 100644 index 347d6ca087c..00000000000 --- a/db/schema_migrations/20201117184334 +++ /dev/null @@ -1 +0,0 @@ -7988d01be5fac0f2a28cc97e309bfa16450d2e376888401fc2ad521aa0082020
\ No newline at end of file diff --git a/db/schema_migrations/20201117203224 b/db/schema_migrations/20201117203224 deleted file mode 100644 index c161bc5c404..00000000000 --- a/db/schema_migrations/20201117203224 +++ /dev/null @@ -1 +0,0 @@ -4c66fd85d6c219d9bedb06c3a38610ecd2c2b1fcb668b132624d7bb76ae2a1ee
\ No newline at end of file diff --git a/db/schema_migrations/20201117213024 b/db/schema_migrations/20201117213024 deleted file mode 100644 index 209e170caa0..00000000000 --- a/db/schema_migrations/20201117213024 +++ /dev/null @@ -1 +0,0 @@ -13b30e906a473ead632b808dca2dea2f9fff63920c4e55b97c43d2b30955c0c2
\ No newline at end of file diff --git a/db/schema_migrations/20201118093135 b/db/schema_migrations/20201118093135 deleted file mode 100644 index 7bf60967db0..00000000000 --- a/db/schema_migrations/20201118093135 +++ /dev/null @@ -1 +0,0 @@ -4be52737be2bc74e666e973fa42f17a16e652cb4fa2368c7f347c3f1f8941dbb
\ No newline at end of file diff --git a/db/schema_migrations/20201119031515 b/db/schema_migrations/20201119031515 deleted file mode 100644 index 3abfe9de238..00000000000 --- a/db/schema_migrations/20201119031515 +++ /dev/null @@ -1 +0,0 @@ -6d2e6937c9e41975b1fd402bf2985796792a1e5f8e4f4f98bc76b65ff73c4e02
\ No newline at end of file diff --git a/db/schema_migrations/20201119053603 b/db/schema_migrations/20201119053603 deleted file mode 100644 index 7555dbfb2ca..00000000000 --- a/db/schema_migrations/20201119053603 +++ /dev/null @@ -1 +0,0 @@ -c7567489156bbc047cf9f7827f060ad507fd5d328179f2796566a7dc54806e3e
\ No newline at end of file diff --git a/db/schema_migrations/20201119092319 b/db/schema_migrations/20201119092319 deleted file mode 100644 index c48e0fc2563..00000000000 --- a/db/schema_migrations/20201119092319 +++ /dev/null @@ -1 +0,0 @@ -9ff8ddefff1df81f1eac2ccfc6f3019bb77a6129280e799c0abe54f51e09277a
\ No newline at end of file diff --git a/db/schema_migrations/20201119125730 b/db/schema_migrations/20201119125730 deleted file mode 100644 index 39de483e890..00000000000 --- a/db/schema_migrations/20201119125730 +++ /dev/null @@ -1 +0,0 @@ -9fb3c338c999617b40e4c63f24ea037b5b1403354b93c2117e028ad8348d96aa
\ No newline at end of file diff --git a/db/schema_migrations/20201119133534 b/db/schema_migrations/20201119133534 deleted file mode 100644 index b3999923381..00000000000 --- a/db/schema_migrations/20201119133534 +++ /dev/null @@ -1 +0,0 @@ -6c8fc7904f50a792e10b5f1b0abe90ba21b1bdfd47430b3caa0df870c0a24079
\ No newline at end of file diff --git a/db/schema_migrations/20201119133604 b/db/schema_migrations/20201119133604 deleted file mode 100644 index 865ce7db9e7..00000000000 --- a/db/schema_migrations/20201119133604 +++ /dev/null @@ -1 +0,0 @@ -bfb8ac3b697675bd4fca53273c6c6feb2f7a5659cbdaf57b9b4adb3e189b74ad
\ No newline at end of file diff --git a/db/schema_migrations/20201119162801 b/db/schema_migrations/20201119162801 deleted file mode 100644 index b6aa67ad5f6..00000000000 --- a/db/schema_migrations/20201119162801 +++ /dev/null @@ -1 +0,0 @@ -c41f4649540c23d25f0ae26c3754476409b5e77f53b96db65f2c1fd4a6caf087
\ No newline at end of file diff --git a/db/schema_migrations/20201119164605 b/db/schema_migrations/20201119164605 deleted file mode 100644 index 61e4c88a241..00000000000 --- a/db/schema_migrations/20201119164605 +++ /dev/null @@ -1 +0,0 @@ -5abd2cfdf96b493f8d3ecc857f850acb95e3ea30307a72c2e6f20c5feff8f5e7
\ No newline at end of file diff --git a/db/schema_migrations/20201119213406 b/db/schema_migrations/20201119213406 deleted file mode 100644 index 0bd2418a6ee..00000000000 --- a/db/schema_migrations/20201119213406 +++ /dev/null @@ -1 +0,0 @@ -33970a1295b84040c82034041c99f13578352844c9c6cb092b5cc35913576a7e
\ No newline at end of file diff --git a/db/schema_migrations/20201120071303 b/db/schema_migrations/20201120071303 deleted file mode 100644 index 23d712c9993..00000000000 --- a/db/schema_migrations/20201120071303 +++ /dev/null @@ -1 +0,0 @@ -9684403a075bd1ddf3ae9290ad9a39ed24f4624d99498f8b8ed567588c15e082
\ No newline at end of file diff --git a/db/schema_migrations/20201120092000 b/db/schema_migrations/20201120092000 deleted file mode 100644 index eaa6c37cff2..00000000000 --- a/db/schema_migrations/20201120092000 +++ /dev/null @@ -1 +0,0 @@ -c8f837a5fe7a1959af41f19f93b6dd96d8907a476626f124876ee8b10b120b71
\ No newline at end of file diff --git a/db/schema_migrations/20201120125953 b/db/schema_migrations/20201120125953 deleted file mode 100644 index 23aca1557e0..00000000000 --- a/db/schema_migrations/20201120125953 +++ /dev/null @@ -1 +0,0 @@ -8b60a6bc892f9700df81de9909595544f9f820621a210906a249428ddec9eefa
\ No newline at end of file diff --git a/db/schema_migrations/20201120140210 b/db/schema_migrations/20201120140210 deleted file mode 100644 index 5a281f95f5d..00000000000 --- a/db/schema_migrations/20201120140210 +++ /dev/null @@ -1 +0,0 @@ -6b88d79aa8d373fa1d9aa2698a9d20c09aff14ef16af4c123abd4e7c98e41311
\ No newline at end of file diff --git a/db/schema_migrations/20201120144823 b/db/schema_migrations/20201120144823 deleted file mode 100644 index 4f0c5c43978..00000000000 --- a/db/schema_migrations/20201120144823 +++ /dev/null @@ -1 +0,0 @@ -dde424c434c78e22087123fa30eec75c07268a9079fea44339915747aae235e0
\ No newline at end of file diff --git a/db/schema_migrations/20201123081307 b/db/schema_migrations/20201123081307 deleted file mode 100644 index 5169f80108d..00000000000 --- a/db/schema_migrations/20201123081307 +++ /dev/null @@ -1 +0,0 @@ -9b212f5fd6f58123f0d46249c82b2da49af9bcdd36bcc0de610c4be186b17345
\ No newline at end of file diff --git a/db/schema_migrations/20201123161611 b/db/schema_migrations/20201123161611 deleted file mode 100644 index bcd28f2b4da..00000000000 --- a/db/schema_migrations/20201123161611 +++ /dev/null @@ -1 +0,0 @@ -9d69938cda6db1510ed17d087cc1a582af1e5482d65e4fb457e34011e09c3469
\ No newline at end of file diff --git a/db/schema_migrations/20201124030537 b/db/schema_migrations/20201124030537 deleted file mode 100644 index 6754e179ae3..00000000000 --- a/db/schema_migrations/20201124030537 +++ /dev/null @@ -1 +0,0 @@ -2929b74d9b9d6e205c0e1fb2aaaffe323394058f6e583c56035a2c83b4d4ff03
\ No newline at end of file diff --git a/db/schema_migrations/20201124075951 b/db/schema_migrations/20201124075951 deleted file mode 100644 index b659c83ad21..00000000000 --- a/db/schema_migrations/20201124075951 +++ /dev/null @@ -1 +0,0 @@ -6779e92fa65ff206b19bb99a5a242e3ab5fd7a8d15be89dee925d1fbb5b00632
\ No newline at end of file diff --git a/db/schema_migrations/20201124122817 b/db/schema_migrations/20201124122817 deleted file mode 100644 index d7fd2707dd3..00000000000 --- a/db/schema_migrations/20201124122817 +++ /dev/null @@ -1 +0,0 @@ -1113642dfc9069dcea01ac12b1653dfcf67b3aea449538e9747d3bc857ce88d8
\ No newline at end of file diff --git a/db/schema_migrations/20201124185639 b/db/schema_migrations/20201124185639 deleted file mode 100644 index 9ca03d7d837..00000000000 --- a/db/schema_migrations/20201124185639 +++ /dev/null @@ -1 +0,0 @@ -dd36b2815c62ef9710d88fa92c410398a228c50a7e51d44ce02e85c9f63d648e
\ No newline at end of file diff --git a/db/schema_migrations/20201125030847 b/db/schema_migrations/20201125030847 deleted file mode 100644 index 2b88d374d52..00000000000 --- a/db/schema_migrations/20201125030847 +++ /dev/null @@ -1 +0,0 @@ -e19c6d019f1478e5998b2a264c5327dc82da7fde7edd19b15da70a30c5779844
\ No newline at end of file diff --git a/db/schema_migrations/20201125233219 b/db/schema_migrations/20201125233219 deleted file mode 100644 index 54728b704e9..00000000000 --- a/db/schema_migrations/20201125233219 +++ /dev/null @@ -1 +0,0 @@ -451d7f29392f965467f364c7b119d269551e2dc1485e8cb15ebd14753fdb6e6a
\ No newline at end of file diff --git a/db/schema_migrations/20201126165919 b/db/schema_migrations/20201126165919 deleted file mode 100644 index 533273ec9a2..00000000000 --- a/db/schema_migrations/20201126165919 +++ /dev/null @@ -1 +0,0 @@ -a68c609800f5bdb0a77e39f706b410477493e7b7db3af11e4b2a67534df31079
\ No newline at end of file diff --git a/db/schema_migrations/20201126172030 b/db/schema_migrations/20201126172030 deleted file mode 100644 index 789a914af41..00000000000 --- a/db/schema_migrations/20201126172030 +++ /dev/null @@ -1 +0,0 @@ -65dcc2a53d48acc83dbfc5276e8cfc1eee5f20ffea8355d86df1f2d5b329061b
\ No newline at end of file diff --git a/db/schema_migrations/20201126190039 b/db/schema_migrations/20201126190039 deleted file mode 100644 index 0e70a7e92bf..00000000000 --- a/db/schema_migrations/20201126190039 +++ /dev/null @@ -1 +0,0 @@ -65935afe9b4ad195aaf31cddb915dcd62b23674e278e93ce7ff9b4ae98e32331
\ No newline at end of file diff --git a/db/schema_migrations/20201127104228 b/db/schema_migrations/20201127104228 deleted file mode 100644 index 9a582600854..00000000000 --- a/db/schema_migrations/20201127104228 +++ /dev/null @@ -1 +0,0 @@ -a66f13cf62740c590aa195dd510f1e9f4a36e12d29fd0c824fbd0ace03717706
\ No newline at end of file diff --git a/db/schema_migrations/20201127141433 b/db/schema_migrations/20201127141433 deleted file mode 100644 index b3db67b566e..00000000000 --- a/db/schema_migrations/20201127141433 +++ /dev/null @@ -1 +0,0 @@ -70fae11d6a73ea8b2ad75c574716f48e9cc78a58ae23db48e74840646fd46672
\ No newline at end of file diff --git a/db/schema_migrations/20201127170848 b/db/schema_migrations/20201127170848 deleted file mode 100644 index 11c7ccbb236..00000000000 --- a/db/schema_migrations/20201127170848 +++ /dev/null @@ -1 +0,0 @@ -ef378c2512a2c3940016bcc82bc8885762ed1a982e38cba1c452a9063e0717e2
\ No newline at end of file diff --git a/db/schema_migrations/20201128210000 b/db/schema_migrations/20201128210000 deleted file mode 100644 index 9ce8d37ff37..00000000000 --- a/db/schema_migrations/20201128210000 +++ /dev/null @@ -1 +0,0 @@ -2f7415e3e3e66f326f2f65c38406c2103d5075493c86a836497c3541655f4e86
\ No newline at end of file diff --git a/db/schema_migrations/20201128210234 b/db/schema_migrations/20201128210234 deleted file mode 100644 index 6c85130bf58..00000000000 --- a/db/schema_migrations/20201128210234 +++ /dev/null @@ -1 +0,0 @@ -7c2f83a5821765f3657a6dd6f69bc8711a3b9388aec7335293748b883f7ab872
\ No newline at end of file diff --git a/db/schema_migrations/20201130103926 b/db/schema_migrations/20201130103926 deleted file mode 100644 index 518d58860af..00000000000 --- a/db/schema_migrations/20201130103926 +++ /dev/null @@ -1 +0,0 @@ -27cd7e7cd01175c157e6aa666b2263bf29210277d5acd997a0619cee67870345
\ No newline at end of file diff --git a/db/schema_migrations/20201201033202 b/db/schema_migrations/20201201033202 deleted file mode 100644 index a061dc5f404..00000000000 --- a/db/schema_migrations/20201201033202 +++ /dev/null @@ -1 +0,0 @@ -418481f8281f8908740d3a8378b420f4d83853aab139b3401f7e410fc97d2488
\ No newline at end of file diff --git a/db/schema_migrations/20201201034258 b/db/schema_migrations/20201201034258 deleted file mode 100644 index 6cf3caf2a06..00000000000 --- a/db/schema_migrations/20201201034258 +++ /dev/null @@ -1 +0,0 @@ -12cc1beb73bcc31f6546066842913284aabba22ea4e93095271c0cfdacfd0858
\ No newline at end of file diff --git a/db/schema_migrations/20201201161655 b/db/schema_migrations/20201201161655 deleted file mode 100644 index 892d2bfc08d..00000000000 --- a/db/schema_migrations/20201201161655 +++ /dev/null @@ -1 +0,0 @@ -d9ad12dce02d6823536f3206e9c90a0da82c08089c3ce252e8ef28a59589e747
\ No newline at end of file diff --git a/db/schema_migrations/20201201163227 b/db/schema_migrations/20201201163227 deleted file mode 100644 index 0366850ee2f..00000000000 --- a/db/schema_migrations/20201201163227 +++ /dev/null @@ -1 +0,0 @@ -cc978ac56ed177575706436c52125b51915dff97a20ed47ae0c7b16caa837313
\ No newline at end of file diff --git a/db/schema_migrations/20201201175656 b/db/schema_migrations/20201201175656 deleted file mode 100644 index 52c98e28eee..00000000000 --- a/db/schema_migrations/20201201175656 +++ /dev/null @@ -1 +0,0 @@ -54ed18361a28d0b750cbbdb3bfb53b7e4bbe3d1d7264de51522796d3bd15f7a5
\ No newline at end of file diff --git a/db/schema_migrations/20201201190002 b/db/schema_migrations/20201201190002 deleted file mode 100644 index aac9ac34c64..00000000000 --- a/db/schema_migrations/20201201190002 +++ /dev/null @@ -1 +0,0 @@ -f4ec800e68cbe092775b428d3ff85a4a84be0d55d70e59d23de390847ea3c2b7
\ No newline at end of file diff --git a/db/schema_migrations/20201201192112 b/db/schema_migrations/20201201192112 deleted file mode 100644 index 26e17430dbe..00000000000 --- a/db/schema_migrations/20201201192112 +++ /dev/null @@ -1 +0,0 @@ -bd10ddc5e78ff2d878f3ce6a45a3e808b89e0885dcc710b87f44ede15ace372b
\ No newline at end of file diff --git a/db/schema_migrations/20201202003042 b/db/schema_migrations/20201202003042 deleted file mode 100644 index 13bbfe9f8af..00000000000 --- a/db/schema_migrations/20201202003042 +++ /dev/null @@ -1 +0,0 @@ -779effb1db70aa8b9a24942ec3e0681064c01b69ee4731f82477c54361a670b0
\ No newline at end of file diff --git a/db/schema_migrations/20201202025644 b/db/schema_migrations/20201202025644 deleted file mode 100644 index 189704a6d1e..00000000000 --- a/db/schema_migrations/20201202025644 +++ /dev/null @@ -1 +0,0 @@ -3b0e685327e2199e0a6721e00d1fa3c9fee3a173ce1cf5ddd99df3349a28fea9
\ No newline at end of file diff --git a/db/schema_migrations/20201202025937 b/db/schema_migrations/20201202025937 deleted file mode 100644 index eb2088259a5..00000000000 --- a/db/schema_migrations/20201202025937 +++ /dev/null @@ -1 +0,0 @@ -d0706f4a60ae6f26be206aee80fdeb4a7e5c4c0b99e518140ae3cb8c47ed7a82
\ No newline at end of file diff --git a/db/schema_migrations/20201202133606 b/db/schema_migrations/20201202133606 deleted file mode 100644 index 693c4fc074e..00000000000 --- a/db/schema_migrations/20201202133606 +++ /dev/null @@ -1 +0,0 @@ -83c7e30abb0c8f4e11faa648a4a509029aafa3230e64fe7b14d63f0a39df05ad
\ No newline at end of file diff --git a/db/schema_migrations/20201202142751 b/db/schema_migrations/20201202142751 deleted file mode 100644 index cb0013a5d70..00000000000 --- a/db/schema_migrations/20201202142751 +++ /dev/null @@ -1 +0,0 @@ -cb11dc9996b1706feaa8a53f96cbaa6209a4d07b3be9e88ebc3d1e1ada561287
\ No newline at end of file diff --git a/db/schema_migrations/20201202150001 b/db/schema_migrations/20201202150001 deleted file mode 100644 index a22d35f424e..00000000000 --- a/db/schema_migrations/20201202150001 +++ /dev/null @@ -1 +0,0 @@ -af9d8c7cda142e2a96a289ebd7afef73367bd544a60794c9e0414c7b82bef8a2
\ No newline at end of file diff --git a/db/schema_migrations/20201202155913 b/db/schema_migrations/20201202155913 deleted file mode 100644 index 7cb0055455d..00000000000 --- a/db/schema_migrations/20201202155913 +++ /dev/null @@ -1 +0,0 @@ -926f54b5756fa9495e71f2340823418b5679195d5720212dddda0d0c6396629e
\ No newline at end of file diff --git a/db/schema_migrations/20201202160105 b/db/schema_migrations/20201202160105 deleted file mode 100644 index ff2e6f4ddbc..00000000000 --- a/db/schema_migrations/20201202160105 +++ /dev/null @@ -1 +0,0 @@ -a011331d225cef852d2402add6fb2b77e7325b87d58343a9367e0dd31a32ed7f
\ No newline at end of file diff --git a/db/schema_migrations/20201202161021 b/db/schema_migrations/20201202161021 deleted file mode 100644 index eae05342e40..00000000000 --- a/db/schema_migrations/20201202161021 +++ /dev/null @@ -1 +0,0 @@ -696c1d9f8cc90337549530e129e6abf4429d218f151cefaacacacb6e3f33d1c7
\ No newline at end of file diff --git a/db/schema_migrations/20201203123201 b/db/schema_migrations/20201203123201 deleted file mode 100644 index e3799665ffc..00000000000 --- a/db/schema_migrations/20201203123201 +++ /dev/null @@ -1 +0,0 @@ -85a642d60e92a880e0a0699f8dcca42aebe2b5363bfcc3010e647734c7cb7dec
\ No newline at end of file diff --git a/db/schema_migrations/20201203123524 b/db/schema_migrations/20201203123524 deleted file mode 100644 index 27f47a237c0..00000000000 --- a/db/schema_migrations/20201203123524 +++ /dev/null @@ -1 +0,0 @@ -4bb54293c339e20082a739f7724b02141d8fb3b0b140e21ac2acab6cbd2d2f01
\ No newline at end of file diff --git a/db/schema_migrations/20201203144655 b/db/schema_migrations/20201203144655 deleted file mode 100644 index 50c5e928c82..00000000000 --- a/db/schema_migrations/20201203144655 +++ /dev/null @@ -1 +0,0 @@ -700e5d0d5615080f7d747cc71dc437abd24a76b5783f8db7d613036142841e09
\ No newline at end of file diff --git a/db/schema_migrations/20201203171631 b/db/schema_migrations/20201203171631 deleted file mode 100644 index e93633344b9..00000000000 --- a/db/schema_migrations/20201203171631 +++ /dev/null @@ -1 +0,0 @@ -3b6d3fb9c279f5e8c76921e654b188a5a5ba0fddd7ff753a03706b41f43240ed
\ No newline at end of file diff --git a/db/schema_migrations/20201204085522 b/db/schema_migrations/20201204085522 deleted file mode 100644 index 21009a5d34a..00000000000 --- a/db/schema_migrations/20201204085522 +++ /dev/null @@ -1 +0,0 @@ -a1d8228731066fb6dfe436b4d8d034353421d1f45f3896e963f3c7f15fb09fbc
\ No newline at end of file diff --git a/db/schema_migrations/20201204090855 b/db/schema_migrations/20201204090855 deleted file mode 100644 index 7e6bb71d977..00000000000 --- a/db/schema_migrations/20201204090855 +++ /dev/null @@ -1 +0,0 @@ -01712e32d95578fe701738529abfa0e051ef68ed646f7a9c7f775f8a8d108578
\ No newline at end of file diff --git a/db/schema_migrations/20201204105300 b/db/schema_migrations/20201204105300 deleted file mode 100644 index e54d4f939b9..00000000000 --- a/db/schema_migrations/20201204105300 +++ /dev/null @@ -1 +0,0 @@ -15f48c654c08b58c90e46ce6e6413efa14d5a6e8299f100fc65f09f38190132a
\ No newline at end of file diff --git a/db/schema_migrations/20201204110700 b/db/schema_migrations/20201204110700 deleted file mode 100644 index b69e93149c2..00000000000 --- a/db/schema_migrations/20201204110700 +++ /dev/null @@ -1 +0,0 @@ -986ffa5e3e168ce9acf9b346c94bdee05d85c71abe238b8aa21f95cc472faabc
\ No newline at end of file diff --git a/db/schema_migrations/20201204110800 b/db/schema_migrations/20201204110800 deleted file mode 100644 index de1fdf7442a..00000000000 --- a/db/schema_migrations/20201204110800 +++ /dev/null @@ -1 +0,0 @@ -aecf517402d3decf8f7323e8f43fdfe7160cbe7542a474e392996abd75b2d70f
\ No newline at end of file diff --git a/db/schema_migrations/20201204111000 b/db/schema_migrations/20201204111000 deleted file mode 100644 index be3078cf503..00000000000 --- a/db/schema_migrations/20201204111000 +++ /dev/null @@ -1 +0,0 @@ -e9ca7eb8a47f6c48667135eca26f729471f8bb4ffa91dfceea87d98c8f2a616b
\ No newline at end of file diff --git a/db/schema_migrations/20201204111100 b/db/schema_migrations/20201204111100 deleted file mode 100644 index db3832d5331..00000000000 --- a/db/schema_migrations/20201204111100 +++ /dev/null @@ -1 +0,0 @@ -b613f8654641948b2933910ebbfc926fd801b18c00a5d23b1c801a9ba9925520
\ No newline at end of file diff --git a/db/schema_migrations/20201204111200 b/db/schema_migrations/20201204111200 deleted file mode 100644 index 34628516bf8..00000000000 --- a/db/schema_migrations/20201204111200 +++ /dev/null @@ -1 +0,0 @@ -2aad94b0577882df4fec3df3806993858dad9f4eb20db71c94f8590c6640d62e
\ No newline at end of file diff --git a/db/schema_migrations/20201204111300 b/db/schema_migrations/20201204111300 deleted file mode 100644 index 69a114bed98..00000000000 --- a/db/schema_migrations/20201204111300 +++ /dev/null @@ -1 +0,0 @@ -e1265a293640d0d067672cb0426987c4a308025cf5a15b17bac8e30267dc8eaf
\ No newline at end of file diff --git a/db/schema_migrations/20201204111400 b/db/schema_migrations/20201204111400 deleted file mode 100644 index 54fcc022f10..00000000000 --- a/db/schema_migrations/20201204111400 +++ /dev/null @@ -1 +0,0 @@ -6fcaa4184ae69fabd6f2668cad19c38a8ae7c187053d60cdf4fcbdbc0443aa42
\ No newline at end of file diff --git a/db/schema_migrations/20201204111500 b/db/schema_migrations/20201204111500 deleted file mode 100644 index d482fb6d31a..00000000000 --- a/db/schema_migrations/20201204111500 +++ /dev/null @@ -1 +0,0 @@ -3f422a916b50cafd46b4a7486b6c3cc0a9992831a7dbc40c51323c835d845a0a
\ No newline at end of file diff --git a/db/schema_migrations/20201204111600 b/db/schema_migrations/20201204111600 deleted file mode 100644 index d6c5e232962..00000000000 --- a/db/schema_migrations/20201204111600 +++ /dev/null @@ -1 +0,0 @@ -51967d740ce184b27d0d9417fc86cb896fd3e3aa8a5e40759b290f47b9f3e99b
\ No newline at end of file diff --git a/db/schema_migrations/20201204141038 b/db/schema_migrations/20201204141038 deleted file mode 100644 index c422a095eda..00000000000 --- a/db/schema_migrations/20201204141038 +++ /dev/null @@ -1 +0,0 @@ -9dc8d6b557198a60def4690ea06ec3dc9a29deca9082b7b03666aaed483a42f1
\ No newline at end of file diff --git a/db/schema_migrations/20201204193952 b/db/schema_migrations/20201204193952 deleted file mode 100644 index 4dcea03722f..00000000000 --- a/db/schema_migrations/20201204193952 +++ /dev/null @@ -1 +0,0 @@ -39e5550b6ad6f718a51cf9838ac9148bcaa070aff60f6114bd96e4a76faf2ca1
\ No newline at end of file diff --git a/db/schema_migrations/20201204205814 b/db/schema_migrations/20201204205814 deleted file mode 100644 index 2308ba1245c..00000000000 --- a/db/schema_migrations/20201204205814 +++ /dev/null @@ -1 +0,0 @@ -8178b8a9acf7d2d8990bb6f7d984eb9e3b77d45cb2a8b54b56500ef6f93772ad
\ No newline at end of file diff --git a/db/schema_migrations/20201204215353 b/db/schema_migrations/20201204215353 deleted file mode 100644 index 08305f419eb..00000000000 --- a/db/schema_migrations/20201204215353 +++ /dev/null @@ -1 +0,0 @@ -a3dd8cfe4a5d83ca370cac90acf127facf40c0fd63ae8d1d3f99418295bae148
\ No newline at end of file diff --git a/db/schema_migrations/20201207151651 b/db/schema_migrations/20201207151651 deleted file mode 100644 index 92d8fbec6bd..00000000000 --- a/db/schema_migrations/20201207151651 +++ /dev/null @@ -1 +0,0 @@ -93def9138efddc9cd0ace5524dc5cf6cdc0221977083324c5c0ad3cf3fb75e55
\ No newline at end of file diff --git a/db/schema_migrations/20201207165956 b/db/schema_migrations/20201207165956 deleted file mode 100644 index 4bded1d3152..00000000000 --- a/db/schema_migrations/20201207165956 +++ /dev/null @@ -1 +0,0 @@ -1ad19d6b4bc37d24f61f158aa58e4ce6be75cc54722cdc59427c00522fd40b4c
\ No newline at end of file diff --git a/db/schema_migrations/20201208081429 b/db/schema_migrations/20201208081429 deleted file mode 100644 index c7156129ecc..00000000000 --- a/db/schema_migrations/20201208081429 +++ /dev/null @@ -1 +0,0 @@ -5c429e8090fd779ba29a8bd78d69e78d1d5d143a6fd3097a715e178fb150d877
\ No newline at end of file diff --git a/db/schema_migrations/20201208143911 b/db/schema_migrations/20201208143911 deleted file mode 100644 index b953bd502f1..00000000000 --- a/db/schema_migrations/20201208143911 +++ /dev/null @@ -1 +0,0 @@ -1e55cafd8b7c5b13514a8709c05d75c8ef0bdd99ea1a5bd3d36f8d20fc0ead2b
\ No newline at end of file diff --git a/db/schema_migrations/20201208175117 b/db/schema_migrations/20201208175117 deleted file mode 100644 index caa1bcaedd8..00000000000 --- a/db/schema_migrations/20201208175117 +++ /dev/null @@ -1 +0,0 @@ -68971e7f9a722e98d9e611f614b5465de83ff3d4dc8c7a8078ed1db8f21e6590
\ No newline at end of file diff --git a/db/schema_migrations/20201208181411 b/db/schema_migrations/20201208181411 deleted file mode 100644 index 951925cef9d..00000000000 --- a/db/schema_migrations/20201208181411 +++ /dev/null @@ -1 +0,0 @@ -7bbd0cfb98c3e051942bf062444d2586588fe029d9a9548f0e50e0fbad10a490
\ No newline at end of file diff --git a/db/schema_migrations/20201208210209 b/db/schema_migrations/20201208210209 deleted file mode 100644 index 61679844170..00000000000 --- a/db/schema_migrations/20201208210209 +++ /dev/null @@ -1 +0,0 @@ -90b661656195e61c3b3ac43b8eebcdc06f462eb7e73a6201b2f2a8bc9dd519bf
\ No newline at end of file diff --git a/db/schema_migrations/20201209154746 b/db/schema_migrations/20201209154746 deleted file mode 100644 index 3f88f88dc50..00000000000 --- a/db/schema_migrations/20201209154746 +++ /dev/null @@ -1 +0,0 @@ -98e132fd1daadca14b4313783691c523290efdc81372ec8416bcea1a597376bf
\ No newline at end of file diff --git a/db/schema_migrations/20201209163113 b/db/schema_migrations/20201209163113 deleted file mode 100644 index a850a8d90a2..00000000000 --- a/db/schema_migrations/20201209163113 +++ /dev/null @@ -1 +0,0 @@ -a7397b8f5d00b85f8c963f04ae062393b21313d97c9b9875a88a76608b98f826
\ No newline at end of file diff --git a/db/schema_migrations/20201209163958 b/db/schema_migrations/20201209163958 deleted file mode 100644 index 081f12e64ea..00000000000 --- a/db/schema_migrations/20201209163958 +++ /dev/null @@ -1 +0,0 @@ -4bdd5eba48a76d8feab948857ec32ef7fe25e04e8633ee7d94fd059e73703472
\ No newline at end of file diff --git a/db/schema_migrations/20201209193551 b/db/schema_migrations/20201209193551 deleted file mode 100644 index 2eb96840500..00000000000 --- a/db/schema_migrations/20201209193551 +++ /dev/null @@ -1 +0,0 @@ -2278b1e4e19b5306e4b616eb87b622427ef2dcf73dae761739cb3106d5e64718
\ No newline at end of file diff --git a/db/schema_migrations/20201210101250 b/db/schema_migrations/20201210101250 deleted file mode 100644 index 4657c9f264e..00000000000 --- a/db/schema_migrations/20201210101250 +++ /dev/null @@ -1 +0,0 @@ -734ef1c319549df72bbbfe3acf93ca05f7a6c5547a1efdcaba780195181f5f9a
\ No newline at end of file diff --git a/db/schema_migrations/20201210175044 b/db/schema_migrations/20201210175044 deleted file mode 100644 index 63da0b55aed..00000000000 --- a/db/schema_migrations/20201210175044 +++ /dev/null @@ -1 +0,0 @@ -32f0889266a05c12f1bba6d3d8646c6cd5c27ffcc01e4cc0cb1721c495e17237
\ No newline at end of file diff --git a/db/schema_migrations/20201211042306 b/db/schema_migrations/20201211042306 deleted file mode 100644 index 07d4bc66b63..00000000000 --- a/db/schema_migrations/20201211042306 +++ /dev/null @@ -1 +0,0 @@ -a4d82ca9610a1426bb026c43a00791bcdae38d49ed3ca59285d5a752124a7f20
\ No newline at end of file diff --git a/db/schema_migrations/20210923192648 b/db/schema_migrations/20210923192648 new file mode 100644 index 00000000000..5514ec65903 --- /dev/null +++ b/db/schema_migrations/20210923192648 @@ -0,0 +1 @@ +d9cb520f198893019b24c970ba409471e3d98581eb62f746320fc6e81a16af08
\ No newline at end of file diff --git a/db/schema_migrations/20210923192649 b/db/schema_migrations/20210923192649 new file mode 100644 index 00000000000..e91955f09fe --- /dev/null +++ b/db/schema_migrations/20210923192649 @@ -0,0 +1 @@ +12fb550e936ede5a8e83ab06f2fc535201e7a276295a2103564412ded32958f8
\ No newline at end of file diff --git a/db/schema_migrations/20210930211936 b/db/schema_migrations/20210930211936 new file mode 100644 index 00000000000..4538ddf180d --- /dev/null +++ b/db/schema_migrations/20210930211936 @@ -0,0 +1 @@ +3aaf2a4fa834331768e2acc10f67b8d456e70aca9784787e40b55dade7b6f64c
\ No newline at end of file diff --git a/db/schema_migrations/20211004120135 b/db/schema_migrations/20211004120135 new file mode 100644 index 00000000000..e03dc56e002 --- /dev/null +++ b/db/schema_migrations/20211004120135 @@ -0,0 +1 @@ +9cefd32c003a68752f257973a983f77215b02011b7ca792de06c0e92c2462745
\ No newline at end of file diff --git a/db/schema_migrations/20211004122540 b/db/schema_migrations/20211004122540 new file mode 100644 index 00000000000..1c7fc785b29 --- /dev/null +++ b/db/schema_migrations/20211004122540 @@ -0,0 +1 @@ +72358f01061f5296e21647d5da9bbb6a33e94055c9c9aded6088cfb9126564b2
\ No newline at end of file diff --git a/db/schema_migrations/20211005112404 b/db/schema_migrations/20211005112404 new file mode 100644 index 00000000000..80ce0534de8 --- /dev/null +++ b/db/schema_migrations/20211005112404 @@ -0,0 +1 @@ +f4fe6c4a2860dd35f767d98d5025326142cab7fc9c12b5efb1541e2604791691
\ No newline at end of file diff --git a/db/schema_migrations/20211005112645 b/db/schema_migrations/20211005112645 new file mode 100644 index 00000000000..e17b00586e5 --- /dev/null +++ b/db/schema_migrations/20211005112645 @@ -0,0 +1 @@ +59e5de7766dc55e820ec714fbb61b5db61a73959f1e877e66caf668f93d0d633
\ No newline at end of file diff --git a/db/schema_migrations/20211005194425 b/db/schema_migrations/20211005194425 new file mode 100644 index 00000000000..cd3710a6492 --- /dev/null +++ b/db/schema_migrations/20211005194425 @@ -0,0 +1 @@ +6647e94d315c76629f9726e26bafd124fb2fed361568d65315e7c7557f8d9ecf
\ No newline at end of file diff --git a/db/schema_migrations/20211008193137 b/db/schema_migrations/20211008193137 new file mode 100644 index 00000000000..57d2f8cfbc8 --- /dev/null +++ b/db/schema_migrations/20211008193137 @@ -0,0 +1 @@ +97efc3bb2039b66dac98135d93baefc780a62571bd80aa39d7458f37ce92905b
\ No newline at end of file diff --git a/db/schema_migrations/20211011004242 b/db/schema_migrations/20211011004242 new file mode 100644 index 00000000000..f25581cae75 --- /dev/null +++ b/db/schema_migrations/20211011004242 @@ -0,0 +1 @@ +88bb0ca64281134fd97be474a1bb2be3ee60e59f10b9e144776a3282bba5a4c5
\ No newline at end of file diff --git a/db/schema_migrations/20211011104843 b/db/schema_migrations/20211011104843 new file mode 100644 index 00000000000..78789b94ece --- /dev/null +++ b/db/schema_migrations/20211011104843 @@ -0,0 +1 @@ +e2812344b16cd51c544235bae8a365713ab7e34652c2c05511a7fe9d84c05fb1
\ No newline at end of file diff --git a/db/schema_migrations/20211012015903 b/db/schema_migrations/20211012015903 new file mode 100644 index 00000000000..bfa36780370 --- /dev/null +++ b/db/schema_migrations/20211012015903 @@ -0,0 +1 @@ +4c3a55f7891dab4ee1ae019d97cf9d40e7bba81d87a544d6aa23a7f57e6d0f70
\ No newline at end of file diff --git a/db/schema_migrations/20211012051221 b/db/schema_migrations/20211012051221 new file mode 100644 index 00000000000..0dc5e9331e1 --- /dev/null +++ b/db/schema_migrations/20211012051221 @@ -0,0 +1 @@ +52b2a6d78fa649078167e842061ab7c04e3c41c0fc4a092a0a6123dad202fb0e
\ No newline at end of file diff --git a/db/schema_migrations/20211012134316 b/db/schema_migrations/20211012134316 new file mode 100644 index 00000000000..72e01841ddf --- /dev/null +++ b/db/schema_migrations/20211012134316 @@ -0,0 +1 @@ +0f2578f0266154ad2790cc808233c71566b3a3ea87c40909feba9ccc5872927c
\ No newline at end of file diff --git a/db/schema_migrations/20211012143815 b/db/schema_migrations/20211012143815 new file mode 100644 index 00000000000..6e6a5493e99 --- /dev/null +++ b/db/schema_migrations/20211012143815 @@ -0,0 +1 @@ +2685a534728ab1a50acb49a7a5ac7d9285fdc36ec3610b93a4219e6687c22b06
\ No newline at end of file diff --git a/db/schema_migrations/20211013014228 b/db/schema_migrations/20211013014228 new file mode 100644 index 00000000000..5a833b7ee14 --- /dev/null +++ b/db/schema_migrations/20211013014228 @@ -0,0 +1 @@ +5316cfddc074ae5a320ba763dd9481b46ba47d30eefa28d6bb5caa9368027598
\ No newline at end of file diff --git a/db/schema_migrations/20211013080714 b/db/schema_migrations/20211013080714 new file mode 100644 index 00000000000..3579bdf3c78 --- /dev/null +++ b/db/schema_migrations/20211013080714 @@ -0,0 +1 @@ +5c5adaf0f6f053c7e737051fbccf61d1fc36e20360a82d5fca142883d3e3bfdd
\ No newline at end of file diff --git a/db/schema_migrations/20211013080715 b/db/schema_migrations/20211013080715 new file mode 100644 index 00000000000..ff2d473c946 --- /dev/null +++ b/db/schema_migrations/20211013080715 @@ -0,0 +1 @@ +06d6458f7b85b3e729c3c8a8ae29c29f7c5504ea330ae3a3bcf1e0074ed66cf6
\ No newline at end of file diff --git a/db/schema_migrations/20211013080716 b/db/schema_migrations/20211013080716 new file mode 100644 index 00000000000..d2131eb811a --- /dev/null +++ b/db/schema_migrations/20211013080716 @@ -0,0 +1 @@ +a5928cef69626ad5e972e8cb7a570ca83201cdfe7ec4f2401f2aa14c34b9cfb8
\ No newline at end of file diff --git a/db/schema_migrations/20211013125341 b/db/schema_migrations/20211013125341 new file mode 100644 index 00000000000..6177dfa56bc --- /dev/null +++ b/db/schema_migrations/20211013125341 @@ -0,0 +1 @@ +933c37a1a44869588b6586d34dec6bc8d731c81b6e5889ce588d535c011b9340
\ No newline at end of file diff --git a/db/schema_migrations/20211013192749 b/db/schema_migrations/20211013192749 new file mode 100644 index 00000000000..54f05dc3fd6 --- /dev/null +++ b/db/schema_migrations/20211013192749 @@ -0,0 +1 @@ +eeda27c42a80d23851bb58b00cee79feeffbe9ae1fef76b3034f92c8610a8aaf
\ No newline at end of file diff --git a/db/schema_migrations/20211015021114 b/db/schema_migrations/20211015021114 new file mode 100644 index 00000000000..1acbe9eded3 --- /dev/null +++ b/db/schema_migrations/20211015021114 @@ -0,0 +1 @@ +687fa7d06a8d74b561d2b392e706fb209dbb1c0c8a483ad066820d29f7df059b
\ No newline at end of file diff --git a/db/schema_migrations/20211015024135 b/db/schema_migrations/20211015024135 new file mode 100644 index 00000000000..9f40fe5b71c --- /dev/null +++ b/db/schema_migrations/20211015024135 @@ -0,0 +1 @@ +d3cafd6eb712ba3f11aa0e2bddc15bf312230e52d53ba8b7ae6c8d3cfd4aabcc
\ No newline at end of file diff --git a/db/schema_migrations/20211018101034 b/db/schema_migrations/20211018101034 new file mode 100644 index 00000000000..57b1cc1e3c2 --- /dev/null +++ b/db/schema_migrations/20211018101034 @@ -0,0 +1 @@ +1cadc3a932d5b62cfeafcd4090eddc37b44997dbbd0b34da1c7c87a5774bb683
\ No newline at end of file diff --git a/db/schema_migrations/20211018101552 b/db/schema_migrations/20211018101552 new file mode 100644 index 00000000000..3814122d9a3 --- /dev/null +++ b/db/schema_migrations/20211018101552 @@ -0,0 +1 @@ +9a62f0ec43ab295619d82494090c38539cb16408c8971bdde86bb8d02546f558
\ No newline at end of file diff --git a/db/schema_migrations/20211018101852 b/db/schema_migrations/20211018101852 new file mode 100644 index 00000000000..5288e753211 --- /dev/null +++ b/db/schema_migrations/20211018101852 @@ -0,0 +1 @@ +30e9632877d3ad33528be0f56962c0ab57f5eee3889183d9638cbaea903a3d82
\ No newline at end of file diff --git a/db/schema_migrations/20211018102252 b/db/schema_migrations/20211018102252 new file mode 100644 index 00000000000..7d8b2c19da1 --- /dev/null +++ b/db/schema_migrations/20211018102252 @@ -0,0 +1 @@ +14bb815cbdad2db56dafb7eaaff893de96116a1a9e8d6c5ed95f4bef9b9717fc
\ No newline at end of file diff --git a/db/schema_migrations/20211018123316 b/db/schema_migrations/20211018123316 new file mode 100644 index 00000000000..37bf0b261f1 --- /dev/null +++ b/db/schema_migrations/20211018123316 @@ -0,0 +1 @@ +fcee17f25ad3a8b6fb56c23b72978f4a6952200264d285b9e3df4b5e7733e8f6
\ No newline at end of file diff --git a/db/schema_migrations/20211018152654 b/db/schema_migrations/20211018152654 new file mode 100644 index 00000000000..86e9980ad10 --- /dev/null +++ b/db/schema_migrations/20211018152654 @@ -0,0 +1 @@ +fd7b6eb9439c00334f613e3e4977e44054930c1343e5df32bbe82c64acd6ca7b
\ No newline at end of file diff --git a/db/schema_migrations/20211018161447 b/db/schema_migrations/20211018161447 new file mode 100644 index 00000000000..e10f5b06d9a --- /dev/null +++ b/db/schema_migrations/20211018161447 @@ -0,0 +1 @@ +168b383c4a85de35ade8a26e442ca49a40342ba05fb23fab4f0444814d976f65
\ No newline at end of file diff --git a/db/schema_migrations/20211019153615 b/db/schema_migrations/20211019153615 new file mode 100644 index 00000000000..7c1c7d7775f --- /dev/null +++ b/db/schema_migrations/20211019153615 @@ -0,0 +1 @@ +713efc9673bc6cda8eff4e433c3c85f0cc4b8b8ca7b5cc4308e57a6d0b0040a0
\ No newline at end of file diff --git a/db/schema_migrations/20211020030948 b/db/schema_migrations/20211020030948 new file mode 100644 index 00000000000..1964b852444 --- /dev/null +++ b/db/schema_migrations/20211020030948 @@ -0,0 +1 @@ +97e8b2ce324594581ec0af65840a0dde8271b1b2712e22059f5c26b30d7d5cac
\ No newline at end of file diff --git a/db/schema_migrations/20211020095357 b/db/schema_migrations/20211020095357 new file mode 100644 index 00000000000..7fcb8fa6866 --- /dev/null +++ b/db/schema_migrations/20211020095357 @@ -0,0 +1 @@ +a62ac8920223469c6e4c5a7f67ce9eec972189c98a8c542b377afe4ab28ee25a
\ No newline at end of file diff --git a/db/schema_migrations/20211021125908 b/db/schema_migrations/20211021125908 new file mode 100644 index 00000000000..9cb92e1eabe --- /dev/null +++ b/db/schema_migrations/20211021125908 @@ -0,0 +1 @@ +d6fbe3efc3e45b750d82e277e30b7b0048b960d9f9f5b4f7c6a7a1ed869e76b5
\ No newline at end of file diff --git a/db/schema_migrations/20211021131217 b/db/schema_migrations/20211021131217 new file mode 100644 index 00000000000..70b45512900 --- /dev/null +++ b/db/schema_migrations/20211021131217 @@ -0,0 +1 @@ +87834e00821eb1ed8489c1d772dc3ac743bcf84669e78c04c7988f6f761970b8
\ No newline at end of file diff --git a/db/schema_migrations/20211021134458 b/db/schema_migrations/20211021134458 new file mode 100644 index 00000000000..dc168e12229 --- /dev/null +++ b/db/schema_migrations/20211021134458 @@ -0,0 +1 @@ +1baa8db0d42a8d99e48b61930f5c42d1af5f86555488419b6551e1dbf417d3ad
\ No newline at end of file diff --git a/db/schema_migrations/20211021140426 b/db/schema_migrations/20211021140426 new file mode 100644 index 00000000000..c32db84a138 --- /dev/null +++ b/db/schema_migrations/20211021140426 @@ -0,0 +1 @@ +bc7974917509bfbda47375299009295bc5a55970b92443dd5d7134075b161279
\ No newline at end of file diff --git a/db/schema_migrations/20211021141930 b/db/schema_migrations/20211021141930 new file mode 100644 index 00000000000..294e1c80aea --- /dev/null +++ b/db/schema_migrations/20211021141930 @@ -0,0 +1 @@ +483e4cbe2a0be2afbda511f2298e3715abaca29afafeeae26449fc862f49a08f
\ No newline at end of file diff --git a/db/schema_migrations/20211022112202 b/db/schema_migrations/20211022112202 new file mode 100644 index 00000000000..6ef610f80bc --- /dev/null +++ b/db/schema_migrations/20211022112202 @@ -0,0 +1 @@ +b5fbbfe186b3eeeb88bfd901ac426fc52355b71b67c5f5b42373008c19c35bee
\ No newline at end of file diff --git a/db/schema_migrations/20211022113000 b/db/schema_migrations/20211022113000 new file mode 100644 index 00000000000..85044f34206 --- /dev/null +++ b/db/schema_migrations/20211022113000 @@ -0,0 +1 @@ +ded528d0485951403f1c5af804f40b1c0a7c71a0dc67f24fadbc357a45fb1a19
\ No newline at end of file diff --git a/db/schema_migrations/20211022160154 b/db/schema_migrations/20211022160154 new file mode 100644 index 00000000000..2a76379bc66 --- /dev/null +++ b/db/schema_migrations/20211022160154 @@ -0,0 +1 @@ +c474870a626c909da772a1c9f459f369d50658ce8f585a35e7cc3c7ef64af657
\ No newline at end of file diff --git a/db/schema_migrations/20211025103744 b/db/schema_migrations/20211025103744 new file mode 100644 index 00000000000..29c49c81606 --- /dev/null +++ b/db/schema_migrations/20211025103744 @@ -0,0 +1 @@ +56f86f2a20509f2052d0eab918a6d2bbb679d785cf5349916ba695aa92f0609f
\ No newline at end of file diff --git a/db/schema_migrations/20211025103758 b/db/schema_migrations/20211025103758 new file mode 100644 index 00000000000..902973a42d9 --- /dev/null +++ b/db/schema_migrations/20211025103758 @@ -0,0 +1 @@ +1722382c5141157497f48b209c0fa60c5959fa16c53d09fb6e8e6b2cb6e6ab9b
\ No newline at end of file diff --git a/db/schema_migrations/20211026143238 b/db/schema_migrations/20211026143238 new file mode 100644 index 00000000000..9f0e7f76cd9 --- /dev/null +++ b/db/schema_migrations/20211026143238 @@ -0,0 +1 @@ +6b1377dd7e9b78a35c2f5635d2d11f5fe254aa772576510b41fcf1e03ad56c87
\ No newline at end of file diff --git a/db/schema_migrations/20211027064021 b/db/schema_migrations/20211027064021 new file mode 100644 index 00000000000..3bd57b30583 --- /dev/null +++ b/db/schema_migrations/20211027064021 @@ -0,0 +1 @@ +f1b218eaddb9bcc5e4d854a6b43fc5e122b38dc989225327a1c4a899f41e5ac6
\ No newline at end of file diff --git a/db/schema_migrations/20211027064156 b/db/schema_migrations/20211027064156 new file mode 100644 index 00000000000..880b7a00694 --- /dev/null +++ b/db/schema_migrations/20211027064156 @@ -0,0 +1 @@ +3d7b72684102836d7a7efcab7590b3d14bc63eb3e1bfbc7a95fb5eb5c6a906af
\ No newline at end of file diff --git a/db/schema_migrations/20211027112901 b/db/schema_migrations/20211027112901 new file mode 100644 index 00000000000..0e4cb808f00 --- /dev/null +++ b/db/schema_migrations/20211027112901 @@ -0,0 +1 @@ +83c1d699e5de98007ef815b5f9dfbc9a644c6289bf86832af1d5b8a6d3d83659
\ No newline at end of file diff --git a/db/schema_migrations/20211027203950 b/db/schema_migrations/20211027203950 new file mode 100644 index 00000000000..4e4265a34c9 --- /dev/null +++ b/db/schema_migrations/20211027203950 @@ -0,0 +1 @@ +38643fbd719e7d65e5e79eeb279a5732cee5c28774a300859a2bace13d882ee2
\ No newline at end of file diff --git a/db/schema_migrations/20211027204011 b/db/schema_migrations/20211027204011 new file mode 100644 index 00000000000..7c1e07a87c0 --- /dev/null +++ b/db/schema_migrations/20211027204011 @@ -0,0 +1 @@ +8542de6f3bf260b4e7596ed497ff8ed4204c81519d8f19e64ac86cd5532e7a61
\ No newline at end of file diff --git a/db/schema_migrations/20211028085926 b/db/schema_migrations/20211028085926 new file mode 100644 index 00000000000..c1e8d928fa0 --- /dev/null +++ b/db/schema_migrations/20211028085926 @@ -0,0 +1 @@ +ed6939c1e89f78290c312bf005cb33bd1a5ee778e8d9be3ae2eb04cc25416b92
\ No newline at end of file diff --git a/db/schema_migrations/20211028100303 b/db/schema_migrations/20211028100303 new file mode 100644 index 00000000000..472b2ce78ef --- /dev/null +++ b/db/schema_migrations/20211028100303 @@ -0,0 +1 @@ +bb28267d020cbc26614e4635c803af0168ab5606f3aadc40e1c0e0bc6d988254
\ No newline at end of file diff --git a/db/schema_migrations/20211028100843 b/db/schema_migrations/20211028100843 new file mode 100644 index 00000000000..4be06f29039 --- /dev/null +++ b/db/schema_migrations/20211028100843 @@ -0,0 +1 @@ +27578f62b5cde4fdbfe79eb717404a5cef62b8c17170525428dbf81e6b394ce9
\ No newline at end of file diff --git a/db/schema_migrations/20211028123412 b/db/schema_migrations/20211028123412 new file mode 100644 index 00000000000..d32c7c95d8f --- /dev/null +++ b/db/schema_migrations/20211028123412 @@ -0,0 +1 @@ +d7655fb2a01e389f59990b395ed7ef683b21a3371b7e68d3eb29def85eea1888
\ No newline at end of file diff --git a/db/schema_migrations/20211028132247 b/db/schema_migrations/20211028132247 new file mode 100644 index 00000000000..ab8fa3b55eb --- /dev/null +++ b/db/schema_migrations/20211028132247 @@ -0,0 +1 @@ +50a5c8af2cde1ae79d627f70d3b266488f76f76b481aefca8516db5360cfa843
\ No newline at end of file diff --git a/db/schema_migrations/20211028155449 b/db/schema_migrations/20211028155449 new file mode 100644 index 00000000000..00b1c4e14dd --- /dev/null +++ b/db/schema_migrations/20211028155449 @@ -0,0 +1 @@ +385c540b1f80c31a5ba009ae3507d2b855a737389bcb75c07a8872f26f8a9b44
\ No newline at end of file diff --git a/db/schema_migrations/20211028212259 b/db/schema_migrations/20211028212259 new file mode 100644 index 00000000000..777c5546592 --- /dev/null +++ b/db/schema_migrations/20211028212259 @@ -0,0 +1 @@ +56af9791c8625d99e9a53690135086afccdbe8f58a5c236d6805b0883fb971b0
\ No newline at end of file diff --git a/db/schema_migrations/20211029102822 b/db/schema_migrations/20211029102822 new file mode 100644 index 00000000000..72198f302b3 --- /dev/null +++ b/db/schema_migrations/20211029102822 @@ -0,0 +1 @@ +e1f9d87287048010e9816fd5b4a9a2d30b64d2ad150226852f6679b950031914
\ No newline at end of file diff --git a/db/schema_migrations/20211031152417 b/db/schema_migrations/20211031152417 new file mode 100644 index 00000000000..429c7dc0d8c --- /dev/null +++ b/db/schema_migrations/20211031152417 @@ -0,0 +1 @@ +f46a0dd662a80d38a4e8d3e6c4db05e61563a959b75d30a4c3724ae6afc2647f
\ No newline at end of file diff --git a/db/schema_migrations/20211031154919 b/db/schema_migrations/20211031154919 new file mode 100644 index 00000000000..29cf7cc1580 --- /dev/null +++ b/db/schema_migrations/20211031154919 @@ -0,0 +1 @@ +08399bfbf62533c00dfe3ca3434f6be292ec768f053d3b1fde41d2d68de32fe7
\ No newline at end of file diff --git a/db/schema_migrations/20211101132310 b/db/schema_migrations/20211101132310 new file mode 100644 index 00000000000..08a95d2747e --- /dev/null +++ b/db/schema_migrations/20211101132310 @@ -0,0 +1 @@ +3e02605ce307d0ce37c3830e6909e7cfe5632408a757adf59209a70da92c0bc6
\ No newline at end of file diff --git a/db/schema_migrations/20211102103127 b/db/schema_migrations/20211102103127 new file mode 100644 index 00000000000..2ce33ad085a --- /dev/null +++ b/db/schema_migrations/20211102103127 @@ -0,0 +1 @@ +450028c90cb92f5ce3f8239eb56364b83ed025839aaf305b7ceb4fda077681b1
\ No newline at end of file diff --git a/db/schema_migrations/20211102114802 b/db/schema_migrations/20211102114802 new file mode 100644 index 00000000000..35d3a25f3cb --- /dev/null +++ b/db/schema_migrations/20211102114802 @@ -0,0 +1 @@ +a3f9fcac354cccfdfc42b8f5baab651cb65ca60e4474ce937ab25b552bfe483c
\ No newline at end of file diff --git a/db/schema_migrations/20211103062728 b/db/schema_migrations/20211103062728 new file mode 100644 index 00000000000..45bb2fcda65 --- /dev/null +++ b/db/schema_migrations/20211103062728 @@ -0,0 +1 @@ +a22322122144f28306b3b38dbe50b3465ad623c389f8bfe6fa97a0f71b1c7c21
\ No newline at end of file diff --git a/db/schema_migrations/20211103162025 b/db/schema_migrations/20211103162025 new file mode 100644 index 00000000000..e6cb01358d4 --- /dev/null +++ b/db/schema_migrations/20211103162025 @@ -0,0 +1 @@ +2ed9198926eb0579fccd4a8b1866f10ba4f42683d676e0664db3fadefe0bed39
\ No newline at end of file diff --git a/db/schema_migrations/20211104012209 b/db/schema_migrations/20211104012209 new file mode 100644 index 00000000000..8a81fbdf9b8 --- /dev/null +++ b/db/schema_migrations/20211104012209 @@ -0,0 +1 @@ +e7cf08543f911b5f95f08d4aa6063e05b026e463e71a65b6b8200191de1b02a1
\ No newline at end of file diff --git a/db/schema_migrations/20211104044453 b/db/schema_migrations/20211104044453 new file mode 100644 index 00000000000..7d39c0e48e8 --- /dev/null +++ b/db/schema_migrations/20211104044453 @@ -0,0 +1 @@ +fc5a60c27ca89b122d798abe8f55a0951fece712c885555df0d2f37b565d6f94
\ No newline at end of file diff --git a/db/schema_migrations/20211105010101 b/db/schema_migrations/20211105010101 new file mode 100644 index 00000000000..a7f79387e9f --- /dev/null +++ b/db/schema_migrations/20211105010101 @@ -0,0 +1 @@ +26c534cdae8630e3f28ad2b61a1049aaab5c5b7a1b761f0961831b621e148ed3
\ No newline at end of file diff --git a/db/schema_migrations/20211105125756 b/db/schema_migrations/20211105125756 new file mode 100644 index 00000000000..842187d9ae2 --- /dev/null +++ b/db/schema_migrations/20211105125756 @@ -0,0 +1 @@ +13cf3d164d541df48b6d14d7cc1953113476ba8ea5975d7d0c5f84098e2e0e61
\ No newline at end of file diff --git a/db/schema_migrations/20211105125813 b/db/schema_migrations/20211105125813 new file mode 100644 index 00000000000..449c3d95d6a --- /dev/null +++ b/db/schema_migrations/20211105125813 @@ -0,0 +1 @@ +a48f62bed7e4c4a0e69acd3b340065317aff71602e696970276a4e443f1dcabf
\ No newline at end of file diff --git a/db/schema_migrations/20211105135157 b/db/schema_migrations/20211105135157 new file mode 100644 index 00000000000..694509bfafd --- /dev/null +++ b/db/schema_migrations/20211105135157 @@ -0,0 +1 @@ +20f10ae28d439de1d07357ab7e977dae88feaaedb16770820350a9bf8242817f
\ No newline at end of file diff --git a/db/schema_migrations/20211105160316 b/db/schema_migrations/20211105160316 new file mode 100644 index 00000000000..493dfb4afbd --- /dev/null +++ b/db/schema_migrations/20211105160316 @@ -0,0 +1 @@ +afb9552a4104b10b25d65a9fec478c5c28a31ec31402400554db4288033bacb6
\ No newline at end of file diff --git a/db/schema_migrations/20211105161404 b/db/schema_migrations/20211105161404 new file mode 100644 index 00000000000..98b4bcdacfb --- /dev/null +++ b/db/schema_migrations/20211105161404 @@ -0,0 +1 @@ +911cc21de320d0d5716ce80ebca56433b793c2072cb62da783605c99bb9aada9
\ No newline at end of file diff --git a/db/schema_migrations/20211108154510 b/db/schema_migrations/20211108154510 new file mode 100644 index 00000000000..c978d671d29 --- /dev/null +++ b/db/schema_migrations/20211108154510 @@ -0,0 +1 @@ +024c123bf06b796341a22e54f4c34b967d84aeb9b2006acf5cfef96a6161c13d
\ No newline at end of file diff --git a/db/schema_migrations/20211108154841 b/db/schema_migrations/20211108154841 new file mode 100644 index 00000000000..c602a1b6c24 --- /dev/null +++ b/db/schema_migrations/20211108154841 @@ -0,0 +1 @@ +03842b87c4118f0e2aba1597ff08a6830b1dd5442a455e4bc9774b93b36a09b5
\ No newline at end of file diff --git a/db/schema_migrations/20211108203248 b/db/schema_migrations/20211108203248 new file mode 100644 index 00000000000..4f8c570b627 --- /dev/null +++ b/db/schema_migrations/20211108203248 @@ -0,0 +1 @@ +a2556a3d8b21e59caa6cbf7f83d621fef391904d0c13c77c0e5da713a580b4c9
\ No newline at end of file diff --git a/db/schema_migrations/20211108211434 b/db/schema_migrations/20211108211434 new file mode 100644 index 00000000000..17a90668900 --- /dev/null +++ b/db/schema_migrations/20211108211434 @@ -0,0 +1 @@ +06cbecc52e62a48664ae486181047d8ca4d71a7991ba36bdca4bfa44257627f3
\ No newline at end of file diff --git a/db/schema_migrations/20211109100050 b/db/schema_migrations/20211109100050 new file mode 100644 index 00000000000..94f9612277f --- /dev/null +++ b/db/schema_migrations/20211109100050 @@ -0,0 +1 @@ +86aa6ad1759a00c2cc5cb6dc2e381aead2910a24f0e37933a5e72af56d08101a
\ No newline at end of file diff --git a/db/schema_migrations/20211109101010 b/db/schema_migrations/20211109101010 new file mode 100644 index 00000000000..ea24f5e7e37 --- /dev/null +++ b/db/schema_migrations/20211109101010 @@ -0,0 +1 @@ +30eb98b8fdb24bc5de357b0ec14a6b92d520db025c82bd7b9448f71542c7d7e3
\ No newline at end of file diff --git a/db/schema_migrations/20211109112454 b/db/schema_migrations/20211109112454 new file mode 100644 index 00000000000..6fdb1e344b9 --- /dev/null +++ b/db/schema_migrations/20211109112454 @@ -0,0 +1 @@ +1bc48cdae55eea5a5963edd3a138d7d6859afa6caafe0b793c553fdfabe9f488
\ No newline at end of file diff --git a/db/schema_migrations/20211110010101 b/db/schema_migrations/20211110010101 new file mode 100644 index 00000000000..bedcfdb2b3b --- /dev/null +++ b/db/schema_migrations/20211110010101 @@ -0,0 +1 @@ +63495b9f9ca2d4fa121b75eea36f2923942a6e11f27bef2c51414e00ccd48973
\ No newline at end of file diff --git a/db/schema_migrations/20211110100050 b/db/schema_migrations/20211110100050 new file mode 100644 index 00000000000..eed0afbac1c --- /dev/null +++ b/db/schema_migrations/20211110100050 @@ -0,0 +1 @@ +54b83ba1f8e8aa8a23f230664bcd6cc068a2df2d669e395713f0805d0f054f9c
\ No newline at end of file diff --git a/db/schema_migrations/20211112113300 b/db/schema_migrations/20211112113300 new file mode 100644 index 00000000000..8074c437751 --- /dev/null +++ b/db/schema_migrations/20211112113300 @@ -0,0 +1 @@ +be11c0b1c7b9c99c28d44c164742815da57bfc4a32afd54df9135e3ce6edeff9
\ No newline at end of file diff --git a/db/schema_migrations/20211112155416 b/db/schema_migrations/20211112155416 new file mode 100644 index 00000000000..91037c578a7 --- /dev/null +++ b/db/schema_migrations/20211112155416 @@ -0,0 +1 @@ +0c5627518093f6261679940402cbd756a91bf4617a37eecdbbc82dc57856dcec
\ No newline at end of file diff --git a/db/schema_migrations/20211115151704 b/db/schema_migrations/20211115151704 new file mode 100644 index 00000000000..03093ade126 --- /dev/null +++ b/db/schema_migrations/20211115151704 @@ -0,0 +1 @@ +3db18116febc760bcfeab597e0508d5b2835d0135068d79073770d343aa4b09c
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index c73ade92f80..5373aa7a31e 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -46,6 +46,15 @@ RETURN NULL; END $$; +CREATE FUNCTION next_traversal_ids_sibling(traversal_ids integer[]) RETURNS integer[] + LANGUAGE plpgsql IMMUTABLE STRICT + AS $$ +BEGIN + return traversal_ids[1:array_length(traversal_ids, 1)-1] || + ARRAY[traversal_ids[array_length(traversal_ids, 1)]+1]; +END; +$$; + CREATE FUNCTION set_has_external_issue_tracker() RETURNS trigger LANGUAGE plpgsql AS $$ @@ -77,15 +86,6 @@ RETURN NULL; END $$; -CREATE FUNCTION trigger_91dc388a5fe6() RETURNS trigger - LANGUAGE plpgsql - AS $$ -BEGIN - NEW."build_id_convert_to_bigint" := NEW."build_id"; - RETURN NEW; -END; -$$; - CREATE TABLE audit_events ( id bigint NOT NULL, author_id integer NOT NULL, @@ -126,6 +126,19 @@ CREATE TABLE incident_management_pending_issue_escalations ( ) PARTITION BY RANGE (process_at); +CREATE TABLE verification_codes ( + created_at timestamp with time zone DEFAULT now() NOT NULL, + visitor_id_code text NOT NULL, + code text NOT NULL, + phone text NOT NULL, + CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)), + CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)), + CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 32)) +) +PARTITION BY RANGE (created_at); + +COMMENT ON TABLE verification_codes IS 'JiHu-specific table'; + CREATE TABLE web_hook_logs ( id bigint NOT NULL, web_hook_id integer NOT NULL, @@ -151,7 +164,8 @@ CREATE TABLE analytics_cycle_analytics_issue_stage_events ( milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ) PARTITION BY HASH (stage_event_hash_id); @@ -163,7 +177,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 FOR VALUES WITH (modulus 32, remainder 0); @@ -175,7 +190,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 FOR VALUES WITH (modulus 32, remainder 1); @@ -187,7 +203,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 FOR VALUES WITH (modulus 32, remainder 2); @@ -199,7 +216,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 FOR VALUES WITH (modulus 32, remainder 3); @@ -211,7 +229,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 FOR VALUES WITH (modulus 32, remainder 4); @@ -223,7 +242,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 FOR VALUES WITH (modulus 32, remainder 5); @@ -235,7 +255,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 FOR VALUES WITH (modulus 32, remainder 6); @@ -247,7 +268,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 FOR VALUES WITH (modulus 32, remainder 7); @@ -259,7 +281,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 FOR VALUES WITH (modulus 32, remainder 8); @@ -271,7 +294,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 FOR VALUES WITH (modulus 32, remainder 9); @@ -283,7 +307,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 FOR VALUES WITH (modulus 32, remainder 10); @@ -295,7 +320,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 FOR VALUES WITH (modulus 32, remainder 11); @@ -307,7 +333,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 FOR VALUES WITH (modulus 32, remainder 12); @@ -319,7 +346,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 FOR VALUES WITH (modulus 32, remainder 13); @@ -331,7 +359,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 FOR VALUES WITH (modulus 32, remainder 14); @@ -343,7 +372,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 FOR VALUES WITH (modulus 32, remainder 15); @@ -355,7 +385,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 FOR VALUES WITH (modulus 32, remainder 16); @@ -367,7 +398,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 FOR VALUES WITH (modulus 32, remainder 17); @@ -379,7 +411,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 FOR VALUES WITH (modulus 32, remainder 18); @@ -391,7 +424,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 FOR VALUES WITH (modulus 32, remainder 19); @@ -403,7 +437,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 FOR VALUES WITH (modulus 32, remainder 20); @@ -415,7 +450,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 FOR VALUES WITH (modulus 32, remainder 21); @@ -427,7 +463,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 FOR VALUES WITH (modulus 32, remainder 22); @@ -439,7 +476,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 FOR VALUES WITH (modulus 32, remainder 23); @@ -451,7 +489,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 FOR VALUES WITH (modulus 32, remainder 24); @@ -463,7 +502,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 FOR VALUES WITH (modulus 32, remainder 25); @@ -475,7 +515,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 FOR VALUES WITH (modulus 32, remainder 26); @@ -487,7 +528,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 FOR VALUES WITH (modulus 32, remainder 27); @@ -499,7 +541,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 FOR VALUES WITH (modulus 32, remainder 28); @@ -511,7 +554,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 FOR VALUES WITH (modulus 32, remainder 29); @@ -523,7 +567,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 FOR VALUES WITH (modulus 32, remainder 30); @@ -535,7 +580,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 FOR VALUES WITH (modulus 32, remainder 31); @@ -547,7 +593,8 @@ CREATE TABLE analytics_cycle_analytics_merge_request_stage_events ( milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ) PARTITION BY HASH (stage_event_hash_id); @@ -559,7 +606,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 FOR VALUES WITH (modulus 32, remainder 0); @@ -571,7 +619,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 FOR VALUES WITH (modulus 32, remainder 1); @@ -583,7 +632,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 FOR VALUES WITH (modulus 32, remainder 2); @@ -595,7 +645,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 FOR VALUES WITH (modulus 32, remainder 3); @@ -607,7 +658,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 FOR VALUES WITH (modulus 32, remainder 4); @@ -619,7 +671,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 FOR VALUES WITH (modulus 32, remainder 5); @@ -631,7 +684,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 FOR VALUES WITH (modulus 32, remainder 6); @@ -643,7 +697,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 FOR VALUES WITH (modulus 32, remainder 7); @@ -655,7 +710,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 FOR VALUES WITH (modulus 32, remainder 8); @@ -667,7 +723,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 FOR VALUES WITH (modulus 32, remainder 9); @@ -679,7 +736,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 FOR VALUES WITH (modulus 32, remainder 10); @@ -691,7 +749,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 FOR VALUES WITH (modulus 32, remainder 11); @@ -703,7 +762,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 FOR VALUES WITH (modulus 32, remainder 12); @@ -715,7 +775,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 FOR VALUES WITH (modulus 32, remainder 13); @@ -727,7 +788,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 FOR VALUES WITH (modulus 32, remainder 14); @@ -739,7 +801,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 FOR VALUES WITH (modulus 32, remainder 15); @@ -751,7 +814,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 FOR VALUES WITH (modulus 32, remainder 16); @@ -763,7 +827,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 FOR VALUES WITH (modulus 32, remainder 17); @@ -775,7 +840,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 FOR VALUES WITH (modulus 32, remainder 18); @@ -787,7 +853,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 FOR VALUES WITH (modulus 32, remainder 19); @@ -799,7 +866,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 FOR VALUES WITH (modulus 32, remainder 20); @@ -811,7 +879,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 FOR VALUES WITH (modulus 32, remainder 21); @@ -823,7 +892,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 FOR VALUES WITH (modulus 32, remainder 22); @@ -835,7 +905,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 FOR VALUES WITH (modulus 32, remainder 23); @@ -847,7 +918,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 FOR VALUES WITH (modulus 32, remainder 24); @@ -859,7 +931,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 FOR VALUES WITH (modulus 32, remainder 25); @@ -871,7 +944,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 FOR VALUES WITH (modulus 32, remainder 26); @@ -883,7 +957,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 FOR VALUES WITH (modulus 32, remainder 27); @@ -895,7 +970,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 FOR VALUES WITH (modulus 32, remainder 28); @@ -907,7 +983,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 FOR VALUES WITH (modulus 32, remainder 29); @@ -919,7 +996,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 FOR VALUES WITH (modulus 32, remainder 30); @@ -931,7 +1009,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 FOR VALUES WITH (modulus 32, remainder 31); @@ -942,6 +1021,7 @@ CREATE TABLE loose_foreign_keys_deleted_records ( status smallint DEFAULT 1 NOT NULL, created_at timestamp with time zone DEFAULT now() NOT NULL, fully_qualified_table_name text NOT NULL, + consume_after timestamp with time zone DEFAULT now(), CONSTRAINT check_1a541f3235 CHECK ((char_length(fully_qualified_table_name) <= 150)) ) PARTITION BY LIST (partition); @@ -962,6 +1042,7 @@ CREATE TABLE gitlab_partitions_static.loose_foreign_keys_deleted_records_1 ( status smallint DEFAULT 1 NOT NULL, created_at timestamp with time zone DEFAULT now() NOT NULL, fully_qualified_table_name text NOT NULL, + consume_after timestamp with time zone DEFAULT now(), CONSTRAINT check_1a541f3235 CHECK ((char_length(fully_qualified_table_name) <= 150)) ); ALTER TABLE ONLY loose_foreign_keys_deleted_records ATTACH PARTITION gitlab_partitions_static.loose_foreign_keys_deleted_records_1 FOR VALUES IN ('1'); @@ -10295,7 +10376,7 @@ CREATE TABLE application_settings ( encrypted_cloud_license_auth_token_iv text, secret_detection_revocation_token_types_url text, disable_feed_token boolean DEFAULT false NOT NULL, - personal_access_token_prefix text, + personal_access_token_prefix text DEFAULT 'glpat-'::text, rate_limiting_response_text text, invisible_captcha_enabled boolean DEFAULT false NOT NULL, container_registry_cleanup_tags_service_max_list_size integer DEFAULT 200 NOT NULL, @@ -10365,6 +10446,14 @@ CREATE TABLE application_settings ( throttle_authenticated_deprecated_api_period_in_seconds integer DEFAULT 3600 NOT NULL, throttle_authenticated_deprecated_api_enabled boolean DEFAULT false NOT NULL, dependency_proxy_ttl_group_policy_worker_capacity smallint DEFAULT 2 NOT NULL, + content_validation_endpoint_url text, + encrypted_content_validation_api_key bytea, + encrypted_content_validation_api_key_iv bytea, + content_validation_endpoint_enabled boolean DEFAULT false NOT NULL, + sentry_enabled boolean DEFAULT false NOT NULL, + sentry_dsn text, + sentry_clientside_dsn text, + sentry_environment text, CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)), CONSTRAINT app_settings_dep_proxy_ttl_policies_worker_capacity_positive CHECK ((dependency_proxy_ttl_group_policy_worker_capacity >= 0)), CONSTRAINT app_settings_ext_pipeline_validation_service_url_text_limit CHECK ((char_length(external_pipeline_validation_service_url) <= 255)), @@ -10373,8 +10462,12 @@ CREATE TABLE application_settings ( CONSTRAINT app_settings_yaml_max_size_positive CHECK ((max_yaml_size_bytes > 0)), CONSTRAINT check_17d9558205 CHECK ((char_length((kroki_url)::text) <= 1024)), CONSTRAINT check_2dba05b802 CHECK ((char_length(gitpod_url) <= 255)), + CONSTRAINT check_3def0f1829 CHECK ((char_length(sentry_clientside_dsn) <= 255)), + CONSTRAINT check_4f8b811780 CHECK ((char_length(sentry_dsn) <= 255)), CONSTRAINT check_51700b31b5 CHECK ((char_length(default_branch_name) <= 255)), CONSTRAINT check_57123c9593 CHECK ((char_length(help_page_documentation_base_url) <= 255)), + CONSTRAINT check_5a84c3ffdc CHECK ((char_length(content_validation_endpoint_url) <= 255)), + CONSTRAINT check_5bcba483c4 CHECK ((char_length(sentry_environment) <= 255)), CONSTRAINT check_718b4458ae CHECK ((char_length(personal_access_token_prefix) <= 20)), CONSTRAINT check_7227fad848 CHECK ((char_length(rate_limiting_response_text) <= 255)), CONSTRAINT check_85a39b68ff CHECK ((char_length(encrypted_ci_jwt_signing_key_iv) <= 255)), @@ -10388,6 +10481,14 @@ CREATE TABLE application_settings ( CONSTRAINT check_ef6176834f CHECK ((char_length(encrypted_cloud_license_auth_token_iv) <= 255)) ); +COMMENT ON COLUMN application_settings.content_validation_endpoint_url IS 'JiHu-specific column'; + +COMMENT ON COLUMN application_settings.encrypted_content_validation_api_key IS 'JiHu-specific column'; + +COMMENT ON COLUMN application_settings.encrypted_content_validation_api_key_iv IS 'JiHu-specific column'; + +COMMENT ON COLUMN application_settings.content_validation_endpoint_enabled IS 'JiHu-specific column'; + CREATE SEQUENCE application_settings_id_seq START WITH 1 INCREMENT BY 1 @@ -10491,7 +10592,8 @@ CREATE TABLE approval_project_rules ( scanners text[], vulnerabilities_allowed smallint DEFAULT 0 NOT NULL, severity_levels text[] DEFAULT '{}'::text[] NOT NULL, - report_type smallint + report_type smallint, + vulnerability_states text[] DEFAULT '{newly_detected}'::text[] NOT NULL ); CREATE TABLE approval_project_rules_groups ( @@ -11419,7 +11521,8 @@ CREATE TABLE ci_builds_metadata ( secrets jsonb DEFAULT '{}'::jsonb NOT NULL, build_id bigint NOT NULL, id bigint NOT NULL, - runner_features jsonb DEFAULT '{}'::jsonb NOT NULL + runner_features jsonb DEFAULT '{}'::jsonb NOT NULL, + runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL ); CREATE SEQUENCE ci_builds_metadata_id_seq @@ -12619,7 +12722,8 @@ CREATE TABLE clusters_integration_prometheus ( cluster_id bigint NOT NULL, enabled boolean DEFAULT false NOT NULL, encrypted_alert_manager_token text, - encrypted_alert_manager_token_iv text + encrypted_alert_manager_token_iv text, + health_status smallint DEFAULT 0 NOT NULL ); CREATE TABLE clusters_kubernetes_namespaces ( @@ -12721,6 +12825,29 @@ CREATE SEQUENCE container_repositories_id_seq ALTER SEQUENCE container_repositories_id_seq OWNED BY container_repositories.id; +CREATE TABLE content_blocked_states ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + commit_sha bytea NOT NULL, + blob_sha bytea NOT NULL, + path text NOT NULL, + container_identifier text NOT NULL, + CONSTRAINT check_023093d38f CHECK ((char_length(container_identifier) <= 255)), + CONSTRAINT check_1870100678 CHECK ((char_length(path) <= 2048)) +); + +COMMENT ON TABLE content_blocked_states IS 'JiHu-specific table'; + +CREATE SEQUENCE content_blocked_states_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE content_blocked_states_id_seq OWNED BY content_blocked_states.id; + CREATE TABLE conversational_development_index_metrics ( id integer NOT NULL, leader_issues double precision NOT NULL, @@ -13101,33 +13228,6 @@ CREATE SEQUENCE dast_sites_id_seq ALTER SEQUENCE dast_sites_id_seq OWNED BY dast_sites.id; -CREATE TABLE dep_ci_build_trace_section_names ( - id integer NOT NULL, - project_id integer NOT NULL, - name character varying NOT NULL -); - -CREATE SEQUENCE dep_ci_build_trace_section_names_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE dep_ci_build_trace_section_names_id_seq OWNED BY dep_ci_build_trace_section_names.id; - -CREATE TABLE dep_ci_build_trace_sections ( - project_id integer NOT NULL, - date_start timestamp without time zone NOT NULL, - date_end timestamp without time zone NOT NULL, - byte_start bigint NOT NULL, - byte_end bigint NOT NULL, - build_id integer NOT NULL, - section_name_id integer NOT NULL, - build_id_convert_to_bigint bigint DEFAULT 0 NOT NULL -); - CREATE TABLE dependency_proxy_blobs ( id integer NOT NULL, group_id integer NOT NULL, @@ -13137,7 +13237,8 @@ CREATE TABLE dependency_proxy_blobs ( file_store integer, file_name character varying NOT NULL, file text NOT NULL, - status smallint DEFAULT 0 NOT NULL + status smallint DEFAULT 0 NOT NULL, + read_at timestamp with time zone DEFAULT now() NOT NULL ); CREATE SEQUENCE dependency_proxy_blobs_id_seq @@ -13186,6 +13287,7 @@ CREATE TABLE dependency_proxy_manifests ( digest text NOT NULL, content_type text, status smallint DEFAULT 0 NOT NULL, + read_at timestamp with time zone DEFAULT now() NOT NULL, CONSTRAINT check_079b293a7b CHECK ((char_length(file) <= 255)), CONSTRAINT check_167a9a8a91 CHECK ((char_length(content_type) <= 255)), CONSTRAINT check_c579e3f586 CHECK ((char_length(file_name) <= 255)), @@ -13273,7 +13375,8 @@ CREATE TABLE deployments ( status smallint NOT NULL, finished_at timestamp with time zone, cluster_id integer, - deployable_id bigint + deployable_id bigint, + archived boolean DEFAULT false NOT NULL ); CREATE SEQUENCE deployments_id_seq @@ -14068,7 +14171,6 @@ CREATE TABLE geo_event_log ( hashed_storage_migrated_event_id bigint, lfs_object_deleted_event_id bigint, hashed_storage_attachments_event_id bigint, - upload_deleted_event_id bigint, job_artifact_deleted_event_id bigint, reset_checksum_event_id bigint, cache_invalidation_event_id bigint, @@ -14198,9 +14300,6 @@ CREATE TABLE geo_node_statuses ( lfs_objects_count integer, lfs_objects_synced_count integer, lfs_objects_failed_count integer, - attachments_count integer, - attachments_synced_count integer, - attachments_failed_count integer, last_event_id integer, last_event_date timestamp without time zone, cursor_last_event_id integer, @@ -14225,7 +14324,6 @@ CREATE TABLE geo_node_statuses ( wikis_verification_failed_count integer, lfs_objects_synced_missing_on_primary_count integer, job_artifacts_synced_missing_on_primary_count integer, - attachments_synced_missing_on_primary_count integer, repositories_checksummed_count integer, repositories_checksum_failed_count integer, repositories_checksum_mismatch_count integer, @@ -14394,24 +14492,6 @@ CREATE SEQUENCE geo_reset_checksum_events_id_seq ALTER SEQUENCE geo_reset_checksum_events_id_seq OWNED BY geo_reset_checksum_events.id; -CREATE TABLE geo_upload_deleted_events ( - id bigint NOT NULL, - upload_id integer NOT NULL, - file_path character varying NOT NULL, - model_id integer NOT NULL, - model_type character varying NOT NULL, - uploader character varying NOT NULL -); - -CREATE SEQUENCE geo_upload_deleted_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE geo_upload_deleted_events_id_seq OWNED BY geo_upload_deleted_events.id; - CREATE TABLE gitlab_subscription_histories ( id bigint NOT NULL, gitlab_subscription_created_at timestamp with time zone, @@ -15661,6 +15741,24 @@ CREATE SEQUENCE lists_id_seq ALTER SEQUENCE lists_id_seq OWNED BY lists.id; +CREATE TABLE member_tasks ( + id bigint NOT NULL, + member_id bigint NOT NULL, + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + tasks smallint[] DEFAULT '{}'::smallint[] NOT NULL +); + +CREATE SEQUENCE member_tasks_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE member_tasks_id_seq OWNED BY member_tasks.id; + CREATE TABLE members ( id integer NOT NULL, access_level integer NOT NULL, @@ -15696,7 +15794,8 @@ CREATE TABLE merge_request_assignees ( id bigint NOT NULL, user_id integer NOT NULL, merge_request_id integer NOT NULL, - created_at timestamp with time zone + created_at timestamp with time zone, + state smallint DEFAULT 0 NOT NULL ); CREATE SEQUENCE merge_request_assignees_id_seq @@ -15808,10 +15907,6 @@ CREATE TABLE merge_request_diff_commits ( merge_request_diff_id integer NOT NULL, relative_order integer NOT NULL, sha bytea NOT NULL, - author_name text, - author_email text, - committer_name text, - committer_email text, message text, trailers jsonb DEFAULT '{}'::jsonb NOT NULL, commit_author_id bigint, @@ -16258,7 +16353,8 @@ CREATE TABLE namespaces ( push_rule_id bigint, shared_runners_enabled boolean DEFAULT true NOT NULL, allow_descendants_override_disabled_shared_runners boolean DEFAULT false NOT NULL, - traversal_ids integer[] DEFAULT '{}'::integer[] NOT NULL + traversal_ids integer[] DEFAULT '{}'::integer[] NOT NULL, + tmp_project_id integer ); CREATE SEQUENCE namespaces_id_seq @@ -16488,30 +16584,6 @@ CREATE SEQUENCE onboarding_progresses_id_seq ALTER SEQUENCE onboarding_progresses_id_seq OWNED BY onboarding_progresses.id; -CREATE TABLE open_project_tracker_data ( - id bigint NOT NULL, - service_id integer NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - encrypted_url character varying(255), - encrypted_url_iv character varying(255), - encrypted_api_url character varying(255), - encrypted_api_url_iv character varying(255), - encrypted_token character varying(255), - encrypted_token_iv character varying(255), - closed_status_id character varying(5), - project_identifier_code character varying(100) -); - -CREATE SEQUENCE open_project_tracker_data_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE open_project_tracker_data_id_seq OWNED BY open_project_tracker_data.id; - CREATE TABLE operations_feature_flag_scopes ( id bigint NOT NULL, feature_flag_id bigint NOT NULL, @@ -17084,6 +17156,12 @@ CREATE SEQUENCE packages_maven_metadata_id_seq ALTER SEQUENCE packages_maven_metadata_id_seq OWNED BY packages_maven_metadata.id; +CREATE TABLE packages_npm_metadata ( + package_id bigint NOT NULL, + package_json jsonb DEFAULT '{}'::jsonb NOT NULL, + CONSTRAINT chk_rails_e5cbc301ae CHECK ((char_length((package_json)::text) < 20000)) +); + CREATE TABLE packages_nuget_dependency_link_metadata ( dependency_link_id bigint NOT NULL, target_framework text NOT NULL, @@ -17451,7 +17529,10 @@ CREATE TABLE plan_limits ( ci_jobs_trace_size_limit integer DEFAULT 100 NOT NULL, pages_file_entries integer DEFAULT 200000 NOT NULL, dast_profile_schedules integer DEFAULT 1 NOT NULL, - external_audit_event_destinations integer DEFAULT 5 NOT NULL + external_audit_event_destinations integer DEFAULT 5 NOT NULL, + dotenv_variables integer DEFAULT 20 NOT NULL, + dotenv_size integer DEFAULT 5120 NOT NULL, + pipeline_triggers integer DEFAULT 25000 NOT NULL ); CREATE SEQUENCE plan_limits_id_seq @@ -17660,7 +17741,7 @@ CREATE VIEW postgres_indexes AS FROM ((((pg_index JOIN pg_class i ON ((i.oid = pg_index.indexrelid))) JOIN pg_namespace ON ((i.relnamespace = pg_namespace.oid))) - JOIN pg_indexes ON ((i.relname = pg_indexes.indexname))) + JOIN pg_indexes ON (((i.relname = pg_indexes.indexname) AND (pg_namespace.nspname = pg_indexes.schemaname)))) JOIN pg_am a ON ((i.relam = a.oid))) WHERE ((pg_namespace.nspname <> 'pg_catalog'::name) AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name]))); @@ -17727,6 +17808,24 @@ CREATE SEQUENCE postgres_reindex_actions_id_seq ALTER SEQUENCE postgres_reindex_actions_id_seq OWNED BY postgres_reindex_actions.id; +CREATE TABLE postgres_reindex_queued_actions ( + id bigint NOT NULL, + index_identifier text NOT NULL, + state smallint DEFAULT 0 NOT NULL, + created_at timestamp with time zone DEFAULT now() NOT NULL, + updated_at timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT check_e4b01395c0 CHECK ((char_length(index_identifier) <= 255)) +); + +CREATE SEQUENCE postgres_reindex_queued_actions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE postgres_reindex_queued_actions_id_seq OWNED BY postgres_reindex_queued_actions.id; + CREATE TABLE programming_languages ( id integer NOT NULL, name character varying NOT NULL, @@ -18157,8 +18256,11 @@ CREATE TABLE project_settings ( mr_default_target_self boolean DEFAULT false NOT NULL, previous_default_branch text, warn_about_potentially_unwanted_characters boolean DEFAULT true NOT NULL, + merge_commit_template text, + has_shimo boolean DEFAULT false NOT NULL, CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)), - CONSTRAINT check_bde223416c CHECK ((show_default_award_emojis IS NOT NULL)) + CONSTRAINT check_bde223416c CHECK ((show_default_award_emojis IS NOT NULL)), + CONSTRAINT check_eaf7cfb6a7 CHECK ((char_length(merge_commit_template) <= 500)) ); CREATE TABLE project_statistics ( @@ -19819,6 +19921,8 @@ CREATE TABLE user_credit_card_validations ( expiration_date date, last_digits smallint, holder_name text, + network text, + CONSTRAINT check_1765e2b30f CHECK ((char_length(network) <= 32)), CONSTRAINT check_3eea080c91 CHECK (((last_digits >= 0) AND (last_digits <= 9999))), CONSTRAINT check_eafe45d88b CHECK ((char_length(holder_name) <= 26)) ); @@ -20045,7 +20149,7 @@ CREATE TABLE users ( encrypted_otp_secret_salt character varying, otp_required_for_login boolean DEFAULT false NOT NULL, otp_backup_codes text, - public_email character varying DEFAULT ''::character varying NOT NULL, + public_email character varying, dashboard integer DEFAULT 0, project_view integer DEFAULT 0, consumed_timestep integer, @@ -20142,7 +20246,8 @@ CREATE TABLE users_statistics ( with_highest_role_maintainer integer DEFAULT 0 NOT NULL, with_highest_role_owner integer DEFAULT 0 NOT NULL, bots integer DEFAULT 0 NOT NULL, - blocked integer DEFAULT 0 NOT NULL + blocked integer DEFAULT 0 NOT NULL, + with_highest_role_minimal_access integer DEFAULT 0 NOT NULL ); CREATE SEQUENCE users_statistics_id_seq @@ -20154,19 +20259,6 @@ CREATE SEQUENCE users_statistics_id_seq ALTER SEQUENCE users_statistics_id_seq OWNED BY users_statistics.id; -CREATE TABLE verification_codes ( - created_at timestamp with time zone DEFAULT now() NOT NULL, - visitor_id_code text NOT NULL, - code text NOT NULL, - phone text NOT NULL, - CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)), - CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)), - CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 32)) -) -PARTITION BY RANGE (created_at); - -COMMENT ON TABLE verification_codes IS 'JiHu-specific table'; - CREATE TABLE vulnerabilities ( id bigint NOT NULL, milestone_id bigint, @@ -21224,6 +21316,8 @@ ALTER TABLE ONLY compliance_management_frameworks ALTER COLUMN id SET DEFAULT ne ALTER TABLE ONLY container_repositories ALTER COLUMN id SET DEFAULT nextval('container_repositories_id_seq'::regclass); +ALTER TABLE ONLY content_blocked_states ALTER COLUMN id SET DEFAULT nextval('content_blocked_states_id_seq'::regclass); + ALTER TABLE ONLY conversational_development_index_metrics ALTER COLUMN id SET DEFAULT nextval('conversational_development_index_metrics_id_seq'::regclass); ALTER TABLE ONLY coverage_fuzzing_corpuses ALTER COLUMN id SET DEFAULT nextval('coverage_fuzzing_corpuses_id_seq'::regclass); @@ -21252,8 +21346,6 @@ ALTER TABLE ONLY dast_site_validations ALTER COLUMN id SET DEFAULT nextval('dast ALTER TABLE ONLY dast_sites ALTER COLUMN id SET DEFAULT nextval('dast_sites_id_seq'::regclass); -ALTER TABLE ONLY dep_ci_build_trace_section_names ALTER COLUMN id SET DEFAULT nextval('dep_ci_build_trace_section_names_id_seq'::regclass); - ALTER TABLE ONLY dependency_proxy_blobs ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_blobs_id_seq'::regclass); ALTER TABLE ONLY dependency_proxy_group_settings ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_group_settings_id_seq'::regclass); @@ -21372,8 +21464,6 @@ ALTER TABLE ONLY geo_repository_updated_events ALTER COLUMN id SET DEFAULT nextv ALTER TABLE ONLY geo_reset_checksum_events ALTER COLUMN id SET DEFAULT nextval('geo_reset_checksum_events_id_seq'::regclass); -ALTER TABLE ONLY geo_upload_deleted_events ALTER COLUMN id SET DEFAULT nextval('geo_upload_deleted_events_id_seq'::regclass); - ALTER TABLE ONLY gitlab_subscription_histories ALTER COLUMN id SET DEFAULT nextval('gitlab_subscription_histories_id_seq'::regclass); ALTER TABLE ONLY gitlab_subscriptions ALTER COLUMN id SET DEFAULT nextval('gitlab_subscriptions_id_seq'::regclass); @@ -21492,6 +21582,8 @@ ALTER TABLE ONLY lists ALTER COLUMN id SET DEFAULT nextval('lists_id_seq'::regcl ALTER TABLE ONLY loose_foreign_keys_deleted_records ALTER COLUMN id SET DEFAULT nextval('loose_foreign_keys_deleted_records_id_seq'::regclass); +ALTER TABLE ONLY member_tasks ALTER COLUMN id SET DEFAULT nextval('member_tasks_id_seq'::regclass); + ALTER TABLE ONLY members ALTER COLUMN id SET DEFAULT nextval('members_id_seq'::regclass); ALTER TABLE ONLY merge_request_assignees ALTER COLUMN id SET DEFAULT nextval('merge_request_assignees_id_seq'::regclass); @@ -21548,8 +21640,6 @@ ALTER TABLE ONLY oauth_openid_requests ALTER COLUMN id SET DEFAULT nextval('oaut ALTER TABLE ONLY onboarding_progresses ALTER COLUMN id SET DEFAULT nextval('onboarding_progresses_id_seq'::regclass); -ALTER TABLE ONLY open_project_tracker_data ALTER COLUMN id SET DEFAULT nextval('open_project_tracker_data_id_seq'::regclass); - ALTER TABLE ONLY operations_feature_flag_scopes ALTER COLUMN id SET DEFAULT nextval('operations_feature_flag_scopes_id_seq'::regclass); ALTER TABLE ONLY operations_feature_flags ALTER COLUMN id SET DEFAULT nextval('operations_feature_flags_id_seq'::regclass); @@ -21634,6 +21724,8 @@ ALTER TABLE ONLY postgres_async_indexes ALTER COLUMN id SET DEFAULT nextval('pos ALTER TABLE ONLY postgres_reindex_actions ALTER COLUMN id SET DEFAULT nextval('postgres_reindex_actions_id_seq'::regclass); +ALTER TABLE ONLY postgres_reindex_queued_actions ALTER COLUMN id SET DEFAULT nextval('postgres_reindex_queued_actions_id_seq'::regclass); + ALTER TABLE ONLY product_analytics_events_experimental ALTER COLUMN id SET DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass); ALTER TABLE ONLY programming_languages ALTER COLUMN id SET DEFAULT nextval('programming_languages_id_seq'::regclass); @@ -22543,9 +22635,6 @@ ALTER TABLE ONLY ci_build_trace_chunks ALTER TABLE ONLY ci_build_trace_metadata ADD CONSTRAINT ci_build_trace_metadata_pkey PRIMARY KEY (build_id); -ALTER TABLE ONLY dep_ci_build_trace_sections - ADD CONSTRAINT ci_build_trace_sections_pkey PRIMARY KEY (build_id, section_name_id); - ALTER TABLE ONLY ci_builds_metadata ADD CONSTRAINT ci_builds_metadata_pkey PRIMARY KEY (id); @@ -22741,6 +22830,9 @@ ALTER TABLE ONLY container_expiration_policies ALTER TABLE ONLY container_repositories ADD CONSTRAINT container_repositories_pkey PRIMARY KEY (id); +ALTER TABLE ONLY content_blocked_states + ADD CONSTRAINT content_blocked_states_pkey PRIMARY KEY (id); + ALTER TABLE ONLY conversational_development_index_metrics ADD CONSTRAINT conversational_development_index_metrics_pkey PRIMARY KEY (id); @@ -22795,9 +22887,6 @@ ALTER TABLE ONLY dast_site_validations ALTER TABLE ONLY dast_sites ADD CONSTRAINT dast_sites_pkey PRIMARY KEY (id); -ALTER TABLE ONLY dep_ci_build_trace_section_names - ADD CONSTRAINT dep_ci_build_trace_section_names_pkey PRIMARY KEY (id); - ALTER TABLE ONLY dependency_proxy_blobs ADD CONSTRAINT dependency_proxy_blobs_pkey PRIMARY KEY (id); @@ -22990,9 +23079,6 @@ ALTER TABLE ONLY geo_repository_updated_events ALTER TABLE ONLY geo_reset_checksum_events ADD CONSTRAINT geo_reset_checksum_events_pkey PRIMARY KEY (id); -ALTER TABLE ONLY geo_upload_deleted_events - ADD CONSTRAINT geo_upload_deleted_events_pkey PRIMARY KEY (id); - ALTER TABLE ONLY gitlab_subscription_histories ADD CONSTRAINT gitlab_subscription_histories_pkey PRIMARY KEY (id); @@ -23194,6 +23280,9 @@ ALTER TABLE ONLY list_user_preferences ALTER TABLE ONLY lists ADD CONSTRAINT lists_pkey PRIMARY KEY (id); +ALTER TABLE ONLY member_tasks + ADD CONSTRAINT member_tasks_pkey PRIMARY KEY (id); + ALTER TABLE ONLY members ADD CONSTRAINT members_pkey PRIMARY KEY (id); @@ -23305,9 +23394,6 @@ ALTER TABLE ONLY oauth_openid_requests ALTER TABLE ONLY onboarding_progresses ADD CONSTRAINT onboarding_progresses_pkey PRIMARY KEY (id); -ALTER TABLE ONLY open_project_tracker_data - ADD CONSTRAINT open_project_tracker_data_pkey PRIMARY KEY (id); - ALTER TABLE ONLY operations_feature_flag_scopes ADD CONSTRAINT operations_feature_flag_scopes_pkey PRIMARY KEY (id); @@ -23398,6 +23484,9 @@ ALTER TABLE ONLY packages_helm_file_metadata ALTER TABLE ONLY packages_maven_metadata ADD CONSTRAINT packages_maven_metadata_pkey PRIMARY KEY (id); +ALTER TABLE ONLY packages_npm_metadata + ADD CONSTRAINT packages_npm_metadata_pkey PRIMARY KEY (package_id); + ALTER TABLE ONLY packages_nuget_dependency_link_metadata ADD CONSTRAINT packages_nuget_dependency_link_metadata_pkey PRIMARY KEY (dependency_link_id); @@ -23455,6 +23544,9 @@ ALTER TABLE ONLY postgres_async_indexes ALTER TABLE ONLY postgres_reindex_actions ADD CONSTRAINT postgres_reindex_actions_pkey PRIMARY KEY (id); +ALTER TABLE ONLY postgres_reindex_queued_actions + ADD CONSTRAINT postgres_reindex_queued_actions_pkey PRIMARY KEY (id); + ALTER TABLE ONLY programming_languages ADD CONSTRAINT programming_languages_pkey PRIMARY KEY (id); @@ -23938,6 +24030,538 @@ ALTER TABLE ONLY zentao_tracker_data ALTER TABLE ONLY zoom_meetings ADD CONSTRAINT zoom_meetings_pkey PRIMARY KEY (id); +CREATE INDEX index_issue_stage_events_project_duration ON ONLY analytics_cycle_analytics_issue_stage_events USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_000925dbd7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_merge_request_stage_events_project_duration ON ONLY analytics_cycle_analytics_merge_request_stage_events USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_006f943df6 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_loose_foreign_keys_deleted_records_for_partitioned_query ON ONLY loose_foreign_keys_deleted_records USING btree (partition, fully_qualified_table_name, consume_after, id) WHERE (status = 1); + +CREATE INDEX index_01e3390fac ON gitlab_partitions_static.loose_foreign_keys_deleted_records_1 USING btree (partition, fully_qualified_table_name, consume_after, id) WHERE (status = 1); + +CREATE INDEX index_02749b504c ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_merge_request_stage_events_group_duration ON ONLY analytics_cycle_analytics_merge_request_stage_events USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_0287f5ba09 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_03aa30a758 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_issue_stage_events_group_duration ON ONLY analytics_cycle_analytics_issue_stage_events USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_055179c3ea ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_061fe00461 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_070cef72c3 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_08e3cfc564 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_merge_request_stage_events_group_in_progress_duration ON ONLY analytics_cycle_analytics_merge_request_stage_events USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_09af45dd6f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_0c153e2eae ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_issue_stage_events_group_in_progress_duration ON ONLY analytics_cycle_analytics_issue_stage_events USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_0ca85f3d71 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_issue_stage_events_project_in_progress_duration ON ONLY analytics_cycle_analytics_issue_stage_events USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_0d837a5dda ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_0f28a65451 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_10588dbff0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_107e123e17 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_1230a7a402 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_142c4e7ea4 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_merge_request_stage_events_project_in_progress_duration ON ONLY analytics_cycle_analytics_merge_request_stage_events USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_14e4fa1d7d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_14f3645821 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_16627b455e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_1a0388713a ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_1a349ed064 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_1af932a3c7 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_1b0ea30bdb ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_1f6c3faabe ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_1f8af04ed1 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_201c5ddbe9 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_20353089e0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_206349925b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_21db459e34 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_21e262390a ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_2208bd7d7f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_223592b4a1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_22acc9ab11 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_22ed8f01dd ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_234d38a657 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_23783dc748 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_241e9a574c ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_24ac321751 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_25e2aaee9b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_2653e7eeb8 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_2745f5a388 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_27759556bc ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_27d7ad78d8 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_281840d2d1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_296f64df5c ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_2ad4b4fdbc ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_2b7c0a294e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_2c6422f668 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_2dfcdbe81e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_2e1054b181 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_2e6991d05b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_2f80c360c3 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_2fc271c673 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_2fcfd0dc70 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_3005c75335 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_3206c1e6af ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_3249505125 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_331eb67441 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_3640194b77 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_372160a706 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_38a538234e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_39625b8a41 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_399dc06649 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_3a10b315c0 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_3c2a3a6ac9 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_3e6be332b7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_41a1c3a4c6 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_435802dd01 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_436fa9ad5f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_453a659cb6 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_46b989b294 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_47638677a3 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_4810ac88f5 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_491b4b749e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_4a243772d7 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_4b1793a4c4 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_4b22560035 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_4c2645eef2 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_4c9d14f978 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_4d04210a95 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_4d4f2f7de6 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_4db5aa5872 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_4dead6f314 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_4e6ce1c371 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_4f2eb7a06b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_4f6fc34e57 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_50c09f6e04 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_5111e3e7e7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_52ea79bf8e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_541cc045fc ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_551676e972 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_56281bfb73 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_5660b1b38e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_59a8209ab6 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_59ce40fcc4 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_5a5f39d824 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_5b613b5fcf ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_5b944f308d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_5bc2f32084 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_5c4053b63d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_5db09170d4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_5ee060202f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_5f24f6ead2 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_5f96b344e2 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_5fb1867c41 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_5fe1d00845 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_60e3480f23 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_6137e27484 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_620fe77c99 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_625ed9e965 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_64e3a1dfa1 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_64eb4cf8bd ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_6580ecb2db ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_682eba05f6 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_69bdcf213e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_6a39f6d5ac ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_6add8e74cf ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_6b1ce61c8f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_6cfb391b86 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_6e6c2e6a1d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_6ea423bbd1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_6ec4c4afd4 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_6f4e0abe54 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_6fa47e1334 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_70c657954b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_71c2b26944 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_72027c157f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_739845f617 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_74addd1240 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_75dc81d1d7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_765b0cd8db ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_77096a1dc6 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_77c6293242 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_7b7c85eceb ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_7da2307d2e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_7ead2300ca ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_7ecb5b68b4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_807671c4be ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_807fa83fc0 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_80c65daf20 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_81b9cf594f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_82c675952c ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_83c5049b3e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_83edf231b8 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_844abd2888 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_8464227c80 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_8685d7c69c ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_8688b40056 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_87d40fb9f9 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_88b40d6740 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_89c79afe5c ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_8a0fc3de4f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_8b9f9a19a4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_8fb48e72ce ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_9201b952a0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_92c09e352b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_9490e0e0b7 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_95a353f50b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_971af9481e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_9955b1dc59 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_9b8e89ae41 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_9ee83b068b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_a1a9dc36c1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_a2d9f185a5 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_a3feed3097 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_a6999c65c9 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_a6c68d16b2 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_a8276a450f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_a88f20fc98 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_a9424aa392 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_a99cee1904 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_a9deff2159 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_aabc184267 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_ab22231a16 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_abbdf80ab1 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_adc159c3fe ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_aed7f7b10c ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_aee84adb5b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_b1dda405af ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_b607012614 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_b7f21460bb ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_b83fe1306b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_bc189e47ab ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_bca83177ef ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_bedd7e160b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_bee2b94a80 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_c08e669dfa ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_c09bb66559 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_c119f5b92e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_c17dae3605 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_c1cdd90d0d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_c2b951bf20 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_c42b2e7eae ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_c435d904ce ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_c473921734 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_c546bb0736 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_c59cde6209 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_c66758baa7 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_c6ea8a0e26 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_c8c4219c0a ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_c971e6c5ce ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_c9b14a3d9f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_cbb61ea269 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_cc0ba6343b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_cd2b2939a4 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_cda41e106e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_cfa4237c83 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_d01ea0126a ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_d0d285c264 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_d27b4c84e7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_d2fe918e83 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_d35c969634 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_d6047ee813 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_d69c2485f4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_d8fa9793ad ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_d9384b768d ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_dc571ba649 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_df62a8c50e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_e1a4f994d8 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_e3d1fd5b19 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_e3d6234929 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_e54adf9acb ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_e6405afea0 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_e64588e276 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_e716b8ac3f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_e73bc5ba6a ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_e8f3a327b2 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_ea0c2d3361 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_eb558957f0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_ec25d494e6 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_ed094a4f13 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_ee4c549a2d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_ef6a48bd29 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_ef7be2ae94 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_f0cdd09a5e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_f112fae8ac ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_f1c3d14cdc ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_f256d3f6a1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_f2848acfc7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_f3d7d86e09 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_f47327ec1f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_f6b0d458a3 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_f705dc8541 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_f76e8a5304 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_f86acdc2ff ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_f878aab8e3 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_f902c261ce ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_fbccc855cf ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_fbf2d3310b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_fccbe45c32 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_fee429223e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_ff00c038cc ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + +CREATE INDEX index_ff39be5400 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL); + +CREATE INDEX index_ff8741d8d7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1)); + CREATE INDEX index_product_analytics_events_experimental_project_and_time ON ONLY product_analytics_events_experimental USING btree (project_id, collector_tstamp); CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx10 ON gitlab_partitions_static.product_analytics_events_experimental_10 USING btree (project_id, collector_tstamp); @@ -24512,6 +25136,8 @@ CREATE INDEX index_boards_on_project_id ON boards USING btree (project_id); CREATE INDEX index_broadcast_message_on_ends_at_and_broadcast_type_and_id ON broadcast_messages USING btree (ends_at, broadcast_type, id); +CREATE INDEX index_btree_namespaces_traversal_ids ON namespaces USING btree (traversal_ids); + CREATE INDEX index_bulk_import_configurations_on_bulk_import_id ON bulk_import_configurations USING btree (bulk_import_id); CREATE INDEX index_bulk_import_entities_on_bulk_import_id_and_status ON bulk_import_entities USING btree (bulk_import_id, status); @@ -24904,6 +25530,8 @@ CREATE UNIQUE INDEX index_container_repositories_on_project_id_and_name ON conta CREATE INDEX index_container_repository_on_name_trigram ON container_repositories USING gin (name gin_trgm_ops); +CREATE UNIQUE INDEX index_content_blocked_states_on_container_id_commit_sha_path ON content_blocked_states USING btree (container_identifier, commit_sha, path); + CREATE INDEX index_coverage_fuzzing_corpuses_on_package_id ON coverage_fuzzing_corpuses USING btree (package_id); CREATE INDEX index_coverage_fuzzing_corpuses_on_project_id ON coverage_fuzzing_corpuses USING btree (project_id); @@ -24968,23 +25596,17 @@ CREATE INDEX index_dast_sites_on_dast_site_validation_id ON dast_sites USING btr CREATE UNIQUE INDEX index_dast_sites_on_project_id_and_url ON dast_sites USING btree (project_id, url); -CREATE UNIQUE INDEX index_dep_ci_build_trace_section_names_on_project_id_and_name ON dep_ci_build_trace_section_names USING btree (project_id, name); - -CREATE INDEX index_dep_ci_build_trace_sections_on_project_id ON dep_ci_build_trace_sections USING btree (project_id); - -CREATE INDEX index_dep_ci_build_trace_sections_on_section_name_id ON dep_ci_build_trace_sections USING btree (section_name_id); - CREATE UNIQUE INDEX index_dep_prox_manifests_on_group_id_file_name_and_status ON dependency_proxy_manifests USING btree (group_id, file_name, status); CREATE INDEX index_dependency_proxy_blobs_on_group_id_and_file_name ON dependency_proxy_blobs USING btree (group_id, file_name); -CREATE INDEX index_dependency_proxy_blobs_on_group_id_status_and_id ON dependency_proxy_blobs USING btree (group_id, status, id); +CREATE INDEX index_dependency_proxy_blobs_on_group_id_status_read_at_id ON dependency_proxy_blobs USING btree (group_id, status, read_at, id); CREATE INDEX index_dependency_proxy_blobs_on_status ON dependency_proxy_blobs USING btree (status); CREATE INDEX index_dependency_proxy_group_settings_on_group_id ON dependency_proxy_group_settings USING btree (group_id); -CREATE INDEX index_dependency_proxy_manifests_on_group_id_status_and_id ON dependency_proxy_manifests USING btree (group_id, status, id); +CREATE INDEX index_dependency_proxy_manifests_on_group_id_status_read_at_id ON dependency_proxy_manifests USING btree (group_id, status, read_at, id); CREATE INDEX index_dependency_proxy_manifests_on_status ON dependency_proxy_manifests USING btree (status); @@ -25004,6 +25626,8 @@ CREATE UNIQUE INDEX index_deployment_clusters_on_cluster_id_and_deployment_id ON CREATE INDEX index_deployment_merge_requests_on_merge_request_id ON deployment_merge_requests USING btree (merge_request_id); +CREATE INDEX index_deployments_on_archived_project_id_iid ON deployments USING btree (archived, project_id, iid); + CREATE INDEX index_deployments_on_cluster_id_and_status ON deployments USING btree (cluster_id, status); CREATE INDEX index_deployments_on_created_at ON deployments USING btree (created_at); @@ -25014,6 +25638,8 @@ CREATE INDEX index_deployments_on_environment_id_and_id ON deployments USING btr CREATE INDEX index_deployments_on_environment_id_and_iid_and_project_id ON deployments USING btree (environment_id, iid, project_id); +CREATE INDEX index_deployments_on_environment_id_and_ref ON deployments USING btree (environment_id, ref); + CREATE INDEX index_deployments_on_environment_id_status_and_finished_at ON deployments USING btree (environment_id, status, finished_at); CREATE INDEX index_deployments_on_environment_id_status_and_id ON deployments USING btree (environment_id, status, id); @@ -25192,6 +25818,8 @@ CREATE INDEX index_events_on_author_id_and_created_at_merge_requests ON events U CREATE INDEX index_events_on_author_id_and_project_id ON events USING btree (author_id, project_id); +CREATE INDEX index_events_on_created_at_and_id ON events USING btree (created_at, id) WHERE (created_at > '2021-08-27 00:00:00+00'::timestamp with time zone); + CREATE INDEX index_events_on_group_id_partial ON events USING btree (group_id) WHERE (group_id IS NOT NULL); CREATE INDEX index_events_on_project_id_and_created_at ON events USING btree (project_id, created_at); @@ -25200,8 +25828,6 @@ CREATE INDEX index_events_on_project_id_and_id ON events USING btree (project_id CREATE INDEX index_events_on_project_id_and_id_desc_on_merged_action ON events USING btree (project_id, id DESC) WHERE (action = 7); -CREATE INDEX index_events_on_target_type_and_target_id ON events USING btree (target_type, target_id); - CREATE UNIQUE INDEX index_events_on_target_type_and_target_id_and_fingerprint ON events USING btree (target_type, target_id, fingerprint); CREATE INDEX index_evidences_on_release_id ON evidences USING btree (release_id); @@ -25234,8 +25860,6 @@ CREATE UNIQUE INDEX index_feature_gates_on_feature_key_and_key_and_value ON feat CREATE UNIQUE INDEX index_features_on_key ON features USING btree (key); -CREATE INDEX index_for_resource_group ON ci_builds USING btree (resource_group_id, id) WHERE (resource_group_id IS NOT NULL); - CREATE INDEX index_for_status_per_branch_per_project ON merge_trains USING btree (target_project_id, target_branch, status); CREATE INDEX index_fork_network_members_on_fork_network_id ON fork_network_members USING btree (fork_network_id); @@ -25272,8 +25896,6 @@ CREATE INDEX index_geo_event_log_on_repository_updated_event_id ON geo_event_log CREATE INDEX index_geo_event_log_on_reset_checksum_event_id ON geo_event_log USING btree (reset_checksum_event_id) WHERE (reset_checksum_event_id IS NOT NULL); -CREATE INDEX index_geo_event_log_on_upload_deleted_event_id ON geo_event_log USING btree (upload_deleted_event_id) WHERE (upload_deleted_event_id IS NOT NULL); - CREATE INDEX index_geo_hashed_storage_attachments_events_on_project_id ON geo_hashed_storage_attachments_events USING btree (project_id); CREATE INDEX index_geo_hashed_storage_migrated_events_on_project_id ON geo_hashed_storage_migrated_events USING btree (project_id); @@ -25310,8 +25932,6 @@ CREATE INDEX index_geo_repository_updated_events_on_source ON geo_repository_upd CREATE INDEX index_geo_reset_checksum_events_on_project_id ON geo_reset_checksum_events USING btree (project_id); -CREATE INDEX index_geo_upload_deleted_events_on_upload_id ON geo_upload_deleted_events USING btree (upload_id); - CREATE INDEX index_gin_ci_pending_builds_on_namespace_traversal_ids ON ci_pending_builds USING gin (namespace_traversal_ids); CREATE INDEX index_gitlab_subscription_histories_on_gitlab_subscription_id ON gitlab_subscription_histories USING btree (gitlab_subscription_id); @@ -25418,6 +26038,8 @@ CREATE INDEX index_import_failures_on_project_id_not_null ON import_failures USI CREATE INDEX index_imported_projects_on_import_type_creator_id_created_at ON projects USING btree (import_type, creator_id, created_at) WHERE (import_type IS NOT NULL); +CREATE INDEX index_imported_projects_on_import_type_id ON projects USING btree (import_type, id) WHERE (import_type IS NOT NULL); + CREATE INDEX index_in_product_marketing_emails_on_user_id ON in_product_marketing_emails USING btree (user_id); CREATE UNIQUE INDEX index_in_product_marketing_emails_on_user_track_series ON in_product_marketing_emails USING btree (user_id, track, series); @@ -25568,8 +26190,6 @@ CREATE INDEX index_jira_imports_on_user_id ON jira_imports USING btree (user_id) CREATE INDEX index_jira_tracker_data_on_service_id ON jira_tracker_data USING btree (service_id); -CREATE INDEX index_keys_on_expires_at_and_expiry_notification_undelivered ON keys USING btree (date(timezone('UTC'::text, expires_at)), expiry_notification_delivered_at) WHERE (expiry_notification_delivered_at IS NULL); - CREATE INDEX index_keys_on_expires_at_and_id ON keys USING btree (date(timezone('UTC'::text, expires_at)), id) WHERE (expiry_notification_delivered_at IS NULL); CREATE UNIQUE INDEX index_keys_on_fingerprint ON keys USING btree (fingerprint); @@ -25638,6 +26258,12 @@ CREATE INDEX index_lists_on_milestone_id ON lists USING btree (milestone_id); CREATE INDEX index_lists_on_user_id ON lists USING btree (user_id); +CREATE INDEX index_member_tasks_on_member_id ON member_tasks USING btree (member_id); + +CREATE UNIQUE INDEX index_member_tasks_on_member_id_and_project_id ON member_tasks USING btree (member_id, project_id); + +CREATE INDEX index_member_tasks_on_project_id ON member_tasks USING btree (project_id); + CREATE INDEX index_members_on_access_level ON members USING btree (access_level); CREATE INDEX index_members_on_expires_at ON members USING btree (expires_at); @@ -25856,6 +26482,8 @@ CREATE INDEX index_namespaces_on_shared_and_extra_runners_minutes_limit ON names CREATE INDEX index_namespaces_on_traversal_ids ON namespaces USING gin (traversal_ids); +CREATE INDEX index_namespaces_on_traversal_ids_for_groups ON namespaces USING gin (traversal_ids) WHERE ((type)::text = 'Group'::text); + CREATE INDEX index_namespaces_on_type_and_id ON namespaces USING btree (type, id); CREATE INDEX index_namespaces_public_groups_name_id ON namespaces USING btree (name, id) WHERE (((type)::text = 'Group'::text) AND (visibility_level = 20)); @@ -25910,6 +26538,8 @@ CREATE INDEX index_oauth_openid_requests_on_access_grant_id ON oauth_openid_requ CREATE UNIQUE INDEX index_on_deploy_keys_id_and_type_and_public ON keys USING btree (id, type) WHERE (public = true); +CREATE INDEX index_on_group_id_on_webhooks ON web_hooks USING btree (group_id); + CREATE INDEX index_on_identities_lower_extern_uid_and_provider ON identities USING btree (lower((extern_uid)::text), provider); CREATE UNIQUE INDEX index_on_instance_statistics_recorded_at_and_identifier ON analytics_usage_trends_measurements USING btree (identifier, recorded_at); @@ -25952,8 +26582,6 @@ CREATE UNIQUE INDEX index_onboarding_progresses_on_namespace_id ON onboarding_pr CREATE INDEX index_oncall_shifts_on_rotation_id_and_starts_at_and_ends_at ON incident_management_oncall_shifts USING btree (rotation_id, starts_at, ends_at); -CREATE INDEX index_open_project_tracker_data_on_service_id ON open_project_tracker_data USING btree (service_id); - CREATE INDEX index_operations_feature_flags_issues_on_issue_id ON operations_feature_flags_issues USING btree (issue_id); CREATE UNIQUE INDEX index_operations_feature_flags_on_project_id_and_iid ON operations_feature_flags USING btree (project_id, iid); @@ -26120,6 +26748,8 @@ CREATE UNIQUE INDEX index_postgres_async_indexes_on_name ON postgres_async_index CREATE INDEX index_postgres_reindex_actions_on_index_identifier ON postgres_reindex_actions USING btree (index_identifier); +CREATE INDEX index_postgres_reindex_queued_actions_on_state ON postgres_reindex_queued_actions USING btree (state); + CREATE UNIQUE INDEX index_programming_languages_on_name ON programming_languages USING btree (name); CREATE INDEX index_project_access_tokens_on_project_id ON project_access_tokens USING btree (project_id); @@ -26396,8 +27026,6 @@ CREATE UNIQUE INDEX index_release_links_on_release_id_and_name ON release_links CREATE UNIQUE INDEX index_release_links_on_release_id_and_url ON release_links USING btree (release_id, url); -CREATE INDEX index_releases_on_author_id ON releases USING btree (author_id); - CREATE INDEX index_releases_on_author_id_id_created_at ON releases USING btree (author_id, id, created_at); CREATE INDEX index_releases_on_project_id_and_tag ON releases USING btree (project_id, tag); @@ -26512,7 +27140,7 @@ CREATE UNIQUE INDEX index_scim_oauth_access_tokens_on_group_id_and_token_encrypt CREATE INDEX index_secure_ci_builds_on_user_id_name_created_at ON ci_builds USING btree (user_id, name, created_at) WHERE (((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('apifuzzer_fuzz'::character varying)::text, ('apifuzzer_fuzz_dnd'::character varying)::text, ('secret_detection'::character varying)::text]))); -CREATE INDEX index_security_ci_builds_on_name_and_id_parser_features_broken ON ci_builds USING btree (name, id) WHERE (((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('license_scanning'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text)); +CREATE INDEX index_security_ci_builds_on_name_and_id_parser_features ON ci_builds USING btree (name, id) WHERE (((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('license_scanning'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text)); CREATE INDEX index_security_findings_on_confidence ON security_findings USING btree (confidence); @@ -26778,6 +27406,8 @@ CREATE UNIQUE INDEX index_user_canonical_emails_on_user_id_and_canonical_email O CREATE INDEX index_user_credit_card_validations_meta_data_full_match ON user_credit_card_validations USING btree (holder_name, expiration_date, last_digits, credit_card_validated_at); +CREATE INDEX index_user_credit_card_validations_meta_data_partial_match ON user_credit_card_validations USING btree (expiration_date, last_digits, network, credit_card_validated_at); + CREATE INDEX index_user_custom_attributes_on_key_and_value ON user_custom_attributes USING btree (key, value); CREATE UNIQUE INDEX index_user_custom_attributes_on_user_id_and_key ON user_custom_attributes USING btree (user_id, key); @@ -26824,7 +27454,7 @@ CREATE INDEX index_users_on_feed_token ON users USING btree (feed_token); CREATE INDEX index_users_on_group_view ON users USING btree (group_view); -CREATE INDEX index_users_on_id_and_last_activity_on_for_non_internal_active ON users USING btree (id, last_activity_on) WHERE (((state)::text = 'active'::text) AND ((user_type IS NULL) OR (user_type = ANY (ARRAY[NULL::integer, 6, 4])))); +CREATE INDEX index_users_on_id_and_last_activity_on_for_active_human_service ON users USING btree (id, last_activity_on) WHERE (((state)::text = 'active'::text) AND ((user_type IS NULL) OR (user_type = 4))); CREATE INDEX index_users_on_incoming_email_token ON users USING btree (incoming_email_token); @@ -26944,12 +27574,16 @@ CREATE INDEX index_vulnerability_occurrence_identifiers_on_identifier_id ON vuln CREATE UNIQUE INDEX index_vulnerability_occurrence_identifiers_on_unique_keys ON vulnerability_occurrence_identifiers USING btree (occurrence_id, identifier_id); +CREATE INDEX index_vulnerability_occurrence_pipelines_occurrence_id_and_id ON vulnerability_occurrence_pipelines USING btree (occurrence_id, id DESC); + CREATE INDEX index_vulnerability_occurrence_pipelines_on_pipeline_id ON vulnerability_occurrence_pipelines USING btree (pipeline_id); CREATE INDEX index_vulnerability_occurrences_deduplication ON vulnerability_occurrences USING btree (project_id, report_type, project_fingerprint); CREATE INDEX index_vulnerability_occurrences_for_issue_links_migration ON vulnerability_occurrences USING btree (project_id, report_type, encode(project_fingerprint, 'hex'::text)); +CREATE INDEX index_vulnerability_occurrences_on_location_cluster_id ON vulnerability_occurrences USING gin (((location -> 'cluster_id'::text))) WHERE (report_type = 7); + CREATE INDEX index_vulnerability_occurrences_on_location_image ON vulnerability_occurrences USING gin (((location -> 'image'::text))) WHERE (report_type = ANY (ARRAY[2, 7])); CREATE INDEX index_vulnerability_occurrences_on_primary_identifier_id ON vulnerability_occurrences USING btree (primary_identifier_id); @@ -27082,6 +27716,8 @@ CREATE INDEX tmp_index_namespaces_empty_traversal_ids_with_child_namespaces ON n CREATE INDEX tmp_index_namespaces_empty_traversal_ids_with_root_namespaces ON namespaces USING btree (id) WHERE ((parent_id IS NULL) AND (traversal_ids = '{}'::integer[])); +CREATE UNIQUE INDEX tmp_index_on_tmp_project_id_on_namespaces ON namespaces USING btree (tmp_project_id); + CREATE INDEX tmp_index_on_vulnerabilities_non_dismissed ON vulnerabilities USING btree (id) WHERE (state <> 2); CREATE UNIQUE INDEX uniq_pkgs_deb_grp_architectures_on_distribution_id_and_name ON packages_debian_group_architectures USING btree (distribution_id, name); @@ -27108,6 +27744,8 @@ CREATE UNIQUE INDEX vulnerability_feedback_unique_idx ON vulnerability_feedback CREATE UNIQUE INDEX vulnerability_occurrence_pipelines_on_unique_keys ON vulnerability_occurrence_pipelines USING btree (occurrence_id, pipeline_id); +CREATE INDEX vulnerability_occurrences_location_temp_index ON vulnerability_occurrences USING btree (id) WHERE (location IS NULL); + CREATE UNIQUE INDEX work_item_types_namespace_id_and_name_unique ON work_item_types USING btree (namespace_id, btrim(lower(name))); ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00_pkey; @@ -27238,6 +27876,520 @@ ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PAR ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31_pkey; +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_000925dbd7; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_006f943df6; + +ALTER INDEX index_loose_foreign_keys_deleted_records_for_partitioned_query ATTACH PARTITION gitlab_partitions_static.index_01e3390fac; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_02749b504c; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_0287f5ba09; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_03aa30a758; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_055179c3ea; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_061fe00461; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_070cef72c3; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_08e3cfc564; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_09af45dd6f; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_0c153e2eae; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_0ca85f3d71; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_0d837a5dda; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_0f28a65451; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_10588dbff0; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_107e123e17; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1230a7a402; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_142c4e7ea4; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_14e4fa1d7d; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_14f3645821; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_16627b455e; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_1a0388713a; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1a349ed064; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1af932a3c7; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1b0ea30bdb; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1f6c3faabe; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1f8af04ed1; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_201c5ddbe9; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_20353089e0; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_206349925b; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_21db459e34; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_21e262390a; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_2208bd7d7f; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_223592b4a1; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_22acc9ab11; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_22ed8f01dd; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_234d38a657; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_23783dc748; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_241e9a574c; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_24ac321751; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_25e2aaee9b; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_2653e7eeb8; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_2745f5a388; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_27759556bc; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_27d7ad78d8; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_281840d2d1; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_296f64df5c; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2ad4b4fdbc; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2b7c0a294e; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2c6422f668; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2dfcdbe81e; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_2e1054b181; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2e6991d05b; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_2f80c360c3; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2fc271c673; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_2fcfd0dc70; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_3005c75335; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_3206c1e6af; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_3249505125; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_331eb67441; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_3640194b77; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_372160a706; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_38a538234e; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_39625b8a41; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_399dc06649; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_3a10b315c0; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_3c2a3a6ac9; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_3e6be332b7; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_41a1c3a4c6; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_435802dd01; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_436fa9ad5f; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_453a659cb6; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_46b989b294; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_47638677a3; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4810ac88f5; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_491b4b749e; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4a243772d7; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_4b1793a4c4; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4b22560035; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4c2645eef2; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4c9d14f978; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4d04210a95; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_4d4f2f7de6; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_4db5aa5872; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4dead6f314; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4e6ce1c371; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4f2eb7a06b; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4f6fc34e57; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_50c09f6e04; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5111e3e7e7; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_52ea79bf8e; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_541cc045fc; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_551676e972; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_56281bfb73; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5660b1b38e; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_59a8209ab6; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_59ce40fcc4; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5a5f39d824; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5b613b5fcf; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_5b944f308d; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5bc2f32084; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5c4053b63d; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_5db09170d4; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5ee060202f; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5f24f6ead2; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5f96b344e2; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5fb1867c41; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5fe1d00845; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_60e3480f23; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_6137e27484; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_620fe77c99; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_625ed9e965; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_64e3a1dfa1; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_64eb4cf8bd; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6580ecb2db; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_682eba05f6; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_69bdcf213e; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_6a39f6d5ac; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6add8e74cf; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6b1ce61c8f; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_6cfb391b86; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6e6c2e6a1d; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_6ea423bbd1; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6ec4c4afd4; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6f4e0abe54; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6fa47e1334; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_70c657954b; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_71c2b26944; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_72027c157f; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_739845f617; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_74addd1240; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_75dc81d1d7; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_765b0cd8db; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_77096a1dc6; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_77c6293242; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_7b7c85eceb; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_7da2307d2e; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_7ead2300ca; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_7ecb5b68b4; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_807671c4be; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_807fa83fc0; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_80c65daf20; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_81b9cf594f; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_82c675952c; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_83c5049b3e; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_83edf231b8; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_844abd2888; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_8464227c80; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_8685d7c69c; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_8688b40056; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_87d40fb9f9; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_88b40d6740; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_89c79afe5c; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_8a0fc3de4f; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_8b9f9a19a4; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_8fb48e72ce; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_9201b952a0; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_92c09e352b; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_9490e0e0b7; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_95a353f50b; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_971af9481e; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_9955b1dc59; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_9b8e89ae41; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_9ee83b068b; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a1a9dc36c1; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a2d9f185a5; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a3feed3097; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a6999c65c9; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_a6c68d16b2; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_a8276a450f; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a88f20fc98; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a9424aa392; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a99cee1904; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_a9deff2159; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_aabc184267; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ab22231a16; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_abbdf80ab1; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_adc159c3fe; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_aed7f7b10c; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_aee84adb5b; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_b1dda405af; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_b607012614; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_b7f21460bb; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_b83fe1306b; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_bc189e47ab; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_bca83177ef; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_bedd7e160b; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_bee2b94a80; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c08e669dfa; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c09bb66559; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_c119f5b92e; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c17dae3605; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c1cdd90d0d; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_c2b951bf20; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c42b2e7eae; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c435d904ce; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c473921734; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c546bb0736; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c59cde6209; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c66758baa7; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c6ea8a0e26; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c8c4219c0a; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_c971e6c5ce; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c9b14a3d9f; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_cbb61ea269; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_cc0ba6343b; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_cd2b2939a4; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_cda41e106e; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_cfa4237c83; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_d01ea0126a; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d0d285c264; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d27b4c84e7; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d2fe918e83; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d35c969634; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d6047ee813; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d69c2485f4; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d8fa9793ad; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d9384b768d; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_dc571ba649; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_df62a8c50e; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e1a4f994d8; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e3d1fd5b19; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e3d6234929; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e54adf9acb; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e6405afea0; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e64588e276; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e716b8ac3f; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e73bc5ba6a; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e8f3a327b2; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ea0c2d3361; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_eb558957f0; + +ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_ec25d494e6; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ed094a4f13; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ee4c549a2d; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ef6a48bd29; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_ef7be2ae94; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f0cdd09a5e; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_f112fae8ac; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_f1c3d14cdc; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f256d3f6a1; + +ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_f2848acfc7; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f3d7d86e09; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_f47327ec1f; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_f6b0d458a3; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f705dc8541; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f76e8a5304; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f86acdc2ff; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f878aab8e3; + +ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f902c261ce; + +ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_fbccc855cf; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_fbf2d3310b; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_fccbe45c32; + +ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_fee429223e; + +ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ff00c038cc; + +ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ff39be5400; + +ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ff8741d8d7; + ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_static.loose_foreign_keys_deleted_records_1_pkey; ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx10; @@ -27496,7 +28648,9 @@ ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_p ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63_pkey; -CREATE TRIGGER trigger_91dc388a5fe6 BEFORE INSERT OR UPDATE ON dep_ci_build_trace_sections FOR EACH ROW EXECUTE FUNCTION trigger_91dc388a5fe6(); +CREATE TRIGGER chat_names_loose_fk_trigger AFTER DELETE ON chat_names REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); + +CREATE TRIGGER ci_runners_loose_fk_trigger AFTER DELETE ON ci_runners REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); CREATE TRIGGER trigger_delete_project_namespace_on_project_delete AFTER DELETE ON projects FOR EACH ROW WHEN ((old.project_namespace_id IS NOT NULL)) EXECUTE FUNCTION delete_associated_project_namespace(); @@ -27570,6 +28724,9 @@ ALTER TABLE ONLY project_pages_metadata ALTER TABLE ONLY group_deletion_schedules ADD CONSTRAINT fk_11e3ebfcdd FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY member_tasks + ADD CONSTRAINT fk_12816d4bbb FOREIGN KEY (member_id) REFERENCES members(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerabilities ADD CONSTRAINT fk_1302949740 FOREIGN KEY (last_edited_by_id) REFERENCES users(id) ON DELETE SET NULL; @@ -27648,9 +28805,6 @@ ALTER TABLE ONLY projects ALTER TABLE ONLY ci_pipelines ADD CONSTRAINT fk_262d4c2d19 FOREIGN KEY (auto_canceled_by_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL; -ALTER TABLE ONLY dep_ci_build_trace_sections - ADD CONSTRAINT fk_264e112c66 FOREIGN KEY (section_name_id) REFERENCES dep_ci_build_trace_section_names(id) ON DELETE CASCADE; - ALTER TABLE ONLY geo_event_log ADD CONSTRAINT fk_27548c6db3 FOREIGN KEY (hashed_storage_migrated_event_id) REFERENCES geo_hashed_storage_migrated_events(id) ON DELETE CASCADE; @@ -27807,6 +28961,9 @@ ALTER TABLE ONLY application_settings ALTER TABLE ONLY merge_requests ADD CONSTRAINT fk_6a5165a692 FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE SET NULL; +ALTER TABLE ONLY namespaces + ADD CONSTRAINT fk_6a77f66919 FOREIGN KEY (tmp_project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY geo_event_log ADD CONSTRAINT fk_6ada82d42a FOREIGN KEY (container_repository_updated_event_id) REFERENCES geo_container_repository_updated_events(id) ON DELETE CASCADE; @@ -28050,8 +29207,8 @@ ALTER TABLE ONLY identities ALTER TABLE ONLY boards ADD CONSTRAINT fk_ab0a250ff6 FOREIGN KEY (iteration_cadence_id) REFERENCES iterations_cadences(id) ON DELETE CASCADE; -ALTER TABLE ONLY dep_ci_build_trace_sections - ADD CONSTRAINT fk_ab7c104e26 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY member_tasks + ADD CONSTRAINT fk_ab636303dd FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY ci_sources_pipelines ADD CONSTRAINT fk_acd9737679 FOREIGN KEY (source_project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -28137,9 +29294,6 @@ ALTER TABLE ONLY design_management_versions ALTER TABLE ONLY packages_packages ADD CONSTRAINT fk_c188f0dba4 FOREIGN KEY (creator_id) REFERENCES users(id) ON DELETE SET NULL; -ALTER TABLE ONLY geo_event_log - ADD CONSTRAINT fk_c1f241c70d FOREIGN KEY (upload_deleted_event_id) REFERENCES geo_upload_deleted_events(id) ON DELETE CASCADE; - ALTER TABLE ONLY analytics_cycle_analytics_project_stages ADD CONSTRAINT fk_c3339bdfc9 FOREIGN KEY (stage_event_hash_id) REFERENCES analytics_cycle_analytics_stage_event_hashes(id) ON DELETE CASCADE; @@ -28344,9 +29498,6 @@ ALTER TABLE ONLY cluster_agents ALTER TABLE ONLY protected_tag_create_access_levels ADD CONSTRAINT fk_f7dfda8c51 FOREIGN KEY (protected_tag_id) REFERENCES protected_tags(id) ON DELETE CASCADE; -ALTER TABLE ONLY dep_ci_build_trace_section_names - ADD CONSTRAINT fk_f8cd72cd26 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; - ALTER TABLE ONLY ci_stages ADD CONSTRAINT fk_fb57e6cc56 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; @@ -28545,9 +29696,6 @@ ALTER TABLE ONLY bulk_import_failures ALTER TABLE ONLY group_wiki_repositories ADD CONSTRAINT fk_rails_19755e374b FOREIGN KEY (shard_id) REFERENCES shards(id) ON DELETE RESTRICT; -ALTER TABLE ONLY open_project_tracker_data - ADD CONSTRAINT fk_rails_1987546e48 FOREIGN KEY (service_id) REFERENCES integrations(id) ON DELETE CASCADE; - ALTER TABLE ONLY gpg_signatures ADD CONSTRAINT fk_rails_19d4f1c6f9 FOREIGN KEY (gpg_key_subkey_id) REFERENCES gpg_key_subkeys(id) ON DELETE SET NULL; @@ -29595,6 +30743,9 @@ ALTER TABLE ONLY atlassian_identities ALTER TABLE ONLY serverless_domain_cluster ADD CONSTRAINT fk_rails_c09009dee1 FOREIGN KEY (pages_domain_id) REFERENCES pages_domains(id) ON DELETE CASCADE; +ALTER TABLE ONLY packages_npm_metadata + ADD CONSTRAINT fk_rails_c0e5fce6f3 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; + ALTER TABLE ONLY labels ADD CONSTRAINT fk_rails_c1ac5161d8 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -29898,9 +31049,6 @@ ALTER TABLE ONLY snippet_repositories ALTER TABLE ONLY elastic_reindexing_subtasks ADD CONSTRAINT fk_rails_f2cc190164 FOREIGN KEY (elastic_reindexing_task_id) REFERENCES elastic_reindexing_tasks(id) ON DELETE CASCADE; -ALTER TABLE ONLY ci_pipeline_chat_data - ADD CONSTRAINT fk_rails_f300456b63 FOREIGN KEY (chat_name_id) REFERENCES chat_names(id) ON DELETE CASCADE; - ALTER TABLE ONLY approval_project_rules_users ADD CONSTRAINT fk_rails_f365da8250 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; |