2016-06-09 08:39:16 -04:00
|
|
|
# rubocop:disable all
|
2013-03-04 09:51:00 -05:00
|
|
|
class ConvertBlockedToState < ActiveRecord::Migration
|
|
|
|
def up
|
|
|
|
User.transaction do
|
|
|
|
User.where(blocked: true).update_all(state: :blocked)
|
|
|
|
User.where(blocked: false).update_all(state: :active)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
User.transaction do
|
2013-03-05 05:29:44 -05:00
|
|
|
User.where(state: :blocked).update_all(blocked: :true)
|
2013-03-04 09:51:00 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|