review: make use of migration helper
This commit is contained in:
parent
5417d3adea
commit
8220ea58ef
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue