diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-07 15:09:18 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-07 15:09:18 +0000 |
commit | 40b78ea2b6f5f0ef730c2cd811911be3449562e6 (patch) | |
tree | 4298f7f47855273b4e5f0c6791bed283b0c51003 /db | |
parent | 6d5f18a3c1007e810b141b9ba671fd85a3e83e7f (diff) | |
download | gitlab-ce-40b78ea2b6f5f0ef730c2cd811911be3449562e6.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20210401134455_remove_index_mirror_data_on_next_execution_and_retry_count.rb | 30 | ||||
-rw-r--r-- | db/schema_migrations/20210401134455 | 1 | ||||
-rw-r--r-- | db/structure.sql | 2 |
3 files changed, 31 insertions, 2 deletions
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); |