summaryrefslogtreecommitdiff
path: root/db/migrate/20230307091216_add_status_reporter_id_and_id_index_to_abuse_reports.rb
blob: cfd077368c81f9c284c385adbc23c9237e1d8ac3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class AddStatusReporterIdAndIdIndexToAbuseReports < Gitlab::Database::Migration[2.1]
  INDEX_NAME = 'index_abuse_reports_on_status_reporter_id_and_id'

  disable_ddl_transaction!

  def up
    add_concurrent_index :abuse_reports, [:status, :reporter_id, :id], name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name :abuse_reports, INDEX_NAME
  end
end