2013-02-18 15:54:30 +01:00
|
|
|
class ConvertClosedToStateInMilestone < ActiveRecord::Migration
|
|
|
|
def up
|
|
|
|
Milestone.transaction do
|
2013-02-27 09:53:36 +01:00
|
|
|
Milestone.where(closed: true).update_all(state: :closed)
|
|
|
|
Milestone.where(closed: false).update_all(state: :active)
|
2013-02-18 15:54:30 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
Milestone.transaction do
|
2013-02-27 09:53:36 +01:00
|
|
|
Milestone.where(state: :closed).update_all(closed: true)
|
2013-02-18 15:54:30 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|