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/20230807035953_add_index_to_abuse_reports_on_user_id_status_and_category.rb')
-rw-r--r--db/migrate/20230807035953_add_index_to_abuse_reports_on_user_id_status_and_category.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20230807035953_add_index_to_abuse_reports_on_user_id_status_and_category.rb b/db/migrate/20230807035953_add_index_to_abuse_reports_on_user_id_status_and_category.rb
new file mode 100644
index 00000000000..583a5471145
--- /dev/null
+++ b/db/migrate/20230807035953_add_index_to_abuse_reports_on_user_id_status_and_category.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddIndexToAbuseReportsOnUserIdStatusAndCategory < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'idx_abuse_reports_user_id_status_and_category'
+
+ def up
+ add_concurrent_index :abuse_reports, [:user_id, :status, :category], name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :abuse_reports, INDEX_NAME
+ end
+end