summaryrefslogtreecommitdiff
path: root/db/post_migrate/20230218145930_add_index_users_on_updated_at.rb
blob: 229c3e1babd37550eca525fd49ad0bbc9ef85f51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

class AddIndexUsersOnUpdatedAt < Gitlab::Database::Migration[2.1]
  TABLE_NAME = 'users'
  INDEX_NAME = 'index_users_on_updated_at'

  disable_ddl_transaction!

  def up
    add_concurrent_index TABLE_NAME, :updated_at, name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
  end
end