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

20210412142223_add_user_index_on_spam_logs.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0a12f0f1a87f4b671931c19739e5740c7e2607f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

class AddUserIndexOnSpamLogs < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  disable_ddl_transaction!

  INDEX_NAME = 'index_spam_logs_on_user_id'

  def up
    add_concurrent_index :spam_logs, :user_id, name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name :spam_logs, INDEX_NAME
  end
end