Fix AddRelativePositionToIssues migration

This commit is contained in:
Valery Sizov 2017-03-07 15:29:30 +02:00
parent 539a523553
commit 1497db75f5

View file

@ -21,11 +21,17 @@ class AddRelativePositionToIssues < ActiveRecord::Migration
#
# To disable transactions uncomment the following line and remove these
# comments:
# disable_ddl_transaction!
disable_ddl_transaction!
def change
def up
add_column :issues, :relative_position, :integer
add_concurrent_index :issues, :relative_position
end
def down
remove_column :issues, :relative_position
remove_index :issues, :relative_position if index_exists? :issues, :relative_position
end
end