Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20200914104642_modify_merge_request_api_index.rb')
-rw-r--r--db/migrate/20200914104642_modify_merge_request_api_index.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20200914104642_modify_merge_request_api_index.rb b/db/migrate/20200914104642_modify_merge_request_api_index.rb
new file mode 100644
index 00000000000..c21404a10c2
--- /dev/null
+++ b/db/migrate/20200914104642_modify_merge_request_api_index.rb
@@ -0,0 +1,20 @@
+# 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