blob: 1978ea8915390ac6a76e6ccdc49d143e2ce53a7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class ConvertClosedToStateInMilestone < ActiveRecord::Migration
def up
Milestone.transaction do
Milestone.where(closed: true).update_all(state: :closed)
Milestone.where(closed: false).update_all(state: :active)
end
end
def down
Milestone.transaction do
Milestone.where(state: :closed).update_all(closed: true)
end
end
end
|