review: make use of migration helper

This commit is contained in:
sebastiencarceles 2023-02-07 14:34:52 +01:00
parent 5417d3adea
commit 8220ea58ef

View file

@ -1,7 +1,13 @@
class AddExternalIdIndexToChamps < ActiveRecord::Migration[6.1]
include Database::MigrationHelpers
disable_ddl_transaction!
def change
add_index :champs, :external_id, algorithm: :concurrently
def up
add_concurrent_index :champs, :external_id
end
def down
remove_index :champs, column: :external_id
end
end