Project

General

Profile

Download (311 Bytes) Statistics
| Branch: | Tag: | Revision:
class ChangeUserTimezoneEmptyToNil < ActiveRecord::Migration[4.2]
class FakeUser < ApplicationRecord
self.table_name = 'users'
end

def up
FakeUser.where(:timezone => '').update_all(:timezone => nil)
end

def down
# no action: we don't know which data should be '' and which nil
end
end
(395-395/406)