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