From 40b78ea2b6f5f0ef730c2cd811911be3449562e6 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 7 Apr 2021 15:09:18 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- ...irror_data_on_next_execution_and_retry_count.rb | 30 ++++++++++++++++++++++ db/schema_migrations/20210401134455 | 1 + db/structure.sql | 2 -- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20210401134455_remove_index_mirror_data_on_next_execution_and_retry_count.rb create mode 100644 db/schema_migrations/20210401134455 (limited to 'db') diff --git a/db/migrate/20210401134455_remove_index_mirror_data_on_next_execution_and_retry_count.rb b/db/migrate/20210401134455_remove_index_mirror_data_on_next_execution_and_retry_count.rb new file mode 100644 index 00000000000..ee59e72e398 --- /dev/null +++ b/db/migrate/20210401134455_remove_index_mirror_data_on_next_execution_and_retry_count.rb @@ -0,0 +1,30 @@ +# 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 RemoveIndexMirrorDataOnNextExecutionAndRetryCount < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + DOWNTIME = false + + INDEX_NAME = 'index_mirror_data_on_next_execution_and_retry_count' + + def up + remove_concurrent_index( + :project_mirror_data, + %i[next_execution_timestamp retry_count], + name: INDEX_NAME + ) + end + + def down + add_concurrent_index( + :project_mirror_data, + %i[next_execution_timestamp retry_count], + name: INDEX_NAME + ) + end +end diff --git a/db/schema_migrations/20210401134455 b/db/schema_migrations/20210401134455 new file mode 100644 index 00000000000..20a348695e7 --- /dev/null +++ b/db/schema_migrations/20210401134455 @@ -0,0 +1 @@ +3420d83bf8a1f44e69960849efa25525883f17a2776ae3ce28db855cd550ca8e \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 16b69a4370e..e8a434471e9 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -23140,8 +23140,6 @@ CREATE INDEX index_milestones_on_title_trigram ON milestones USING gin (title gi CREATE INDEX index_mirror_data_non_scheduled_or_started ON project_mirror_data USING btree (next_execution_timestamp, retry_count) WHERE ((status)::text <> ALL ('{scheduled,started}'::text[])); -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); -- cgit v1.2.1