Commit 1497db75 authored by Valery Sizov's avatar Valery Sizov

Fix AddRelativePositionToIssues migration

parent 539a5235
...@@ -21,11 +21,17 @@ class AddRelativePositionToIssues < ActiveRecord::Migration ...@@ -21,11 +21,17 @@ class AddRelativePositionToIssues < ActiveRecord::Migration
# #
# To disable transactions uncomment the following line and remove these # To disable transactions uncomment the following line and remove these
# comments: # comments:
# disable_ddl_transaction! disable_ddl_transaction!
def change def up
add_column :issues, :relative_position, :integer add_column :issues, :relative_position, :integer
add_concurrent_index :issues, :relative_position add_concurrent_index :issues, :relative_position
end end
def down
remove_column :issues, :relative_position
remove_index :issues, :relative_position if index_exists? :issues, :relative_position
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment