summaryrefslogtreecommitdiff
path: root/db/post_migrate
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-11 15:06:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-11 15:06:42 +0000
commit7071f9bf3e131a7a668922ee450da529f1866b6f (patch)
tree590371b44d47d428f2826b600d7fab4f10520051 /db/post_migrate
parent16bd8409bcb61d2331227d1df539c40683b6bda3 (diff)
downloadgitlab-ce-7071f9bf3e131a7a668922ee450da529f1866b6f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20191105140942_add_indices_to_abuse_reports.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/post_migrate/20191105140942_add_indices_to_abuse_reports.rb b/db/post_migrate/20191105140942_add_indices_to_abuse_reports.rb
new file mode 100644
index 00000000000..2b2d04e8ccc
--- /dev/null
+++ b/db/post_migrate/20191105140942_add_indices_to_abuse_reports.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddIndicesToAbuseReports < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :abuse_reports, :user_id
+ end
+
+ def down
+ remove_concurrent_index :abuse_reports, :user_id
+ end
+end