debian-mirror-gitlab/db/post_migrate/20230218145940_add_index_namespaces_on_updated_at.rb
2023-05-27 22:25:52 +05:30

17 lines
370 B
Ruby

# frozen_string_literal: true
class AddIndexNamespacesOnUpdatedAt < Gitlab::Database::Migration[2.1]
TABLE_NAME = 'namespaces'
INDEX_NAME = 'index_namespaces_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