diff options
Diffstat (limited to 'db/migrate/20201202161021_remove_redundant_index_on_merge_request_context_commit_diff_files.rb')
-rw-r--r-- | db/migrate/20201202161021_remove_redundant_index_on_merge_request_context_commit_diff_files.rb | 17 |
1 files changed, 17 insertions, 0 deletions
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 new file mode 100644 index 00000000000..a9c0a079955 --- /dev/null +++ b/db/migrate/20201202161021_remove_redundant_index_on_merge_request_context_commit_diff_files.rb @@ -0,0 +1,17 @@ +# 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 |