clarion/db/migrate/20141010142514_change_event...

11 lines
266 B
Ruby
Raw Normal View History

class ChangeEventStateDefaults < ActiveRecord::Migration[4.2]
2014-10-10 19:10:34 +03:00
def up
execute 'UPDATE events SET state = 0'
change_column :events, :state, :integer, null: false, default: 0
end
def down
change_column :events, :state, :integer, null: true
end
end