OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/db/migrate/016_remove_task_position.rb

17 lines
466 B

class RemoveTaskPosition < ActiveRecord::Migration
def self.up
ActiveRecord::Base.transaction do
# this intentionally loads tasks as stories so we can issue
# remove_from_list, which does more than just nilling the
# position
Story.find(:all, :conditions => "id <> root_id and not position is null").each do |t|
t.remove_from_list
end
end
end
def self.down
raise ActiveRecord::IrreversibleMigration
end
end