blob: 1ea89609926ef045507ec94a7b34537388ba2f4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: true
class AddAuthorIndexToDesignManagementVersions < Gitlab::Database::Migration[1.0]
TABLE = :design_management_versions
INDEX_NAME = 'index_design_management_versions_on_author_id'
disable_ddl_transaction!
def up
add_concurrent_index TABLE, :author_id, where: 'author_id IS NOT NULL', name: INDEX_NAME
end
def down
remove_concurrent_index TABLE, :author_id, name: INDEX_NAME
end
end
|