parent
61aa35204e
commit
314271f2b4
@ -1,4 +1,4 @@ |
||||
class RemoveTaskPosition < ActiveRecord::Migration |
||||
class OrderTasksUsingTree < ActiveRecord::Migration |
||||
def self.up |
||||
last_task = {} |
||||
ActiveRecord::Base.transaction do |
@ -0,0 +1,13 @@ |
||||
class RemoveTaskPosition < ActiveRecord::Migration |
||||
def self.up |
||||
ActiveRecord::Base.transaction do |
||||
Task.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 |
Loading…
Reference in new issue