Fix AddRelativePositionToIssues migration
This commit is contained in:
parent
539a523553
commit
1497db75f5
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue