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