20140906030139_set_events_count_default.rb 309 B

1234567891011
  1. class SetEventsCountDefault < ActiveRecord::Migration
  2. def up
  3. change_column_default(:agents, :events_count, 0)
  4. change_column_null(:agents, :events_count, false, 0)
  5. end
  6. def down
  7. change_column_null(:agents, :events_count, true)
  8. change_column_default(:agents, :events_count, nil)
  9. end
  10. end