debian-mirror-gitlab/db/migrate/20220203074916_add_topics_lower_name_index.rb
2022-05-07 20:08:51 +05:30

15 lines
328 B
Ruby

# frozen_string_literal: true
class AddTopicsLowerNameIndex < Gitlab::Database::Migration[1.0]
INDEX_NAME = 'index_topics_on_lower_name'
disable_ddl_transaction!
def up
add_concurrent_index :topics, 'lower(name)', name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :topics, INDEX_NAME
end
end