2019-04-28 11:56:16 +03:00
|
|
|
class ChangeEventStateDefaults < ActiveRecord::Migration[4.2]
|
2014-10-10 19:10:34 +03:00
|
|
|
def up
|
2019-04-28 21:10:54 +03:00
|
|
|
execute "UPDATE events SET state = 0"
|
2014-10-10 19:10:34 +03:00
|
|
|
change_column :events, :state, :integer, null: false, default: 0
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
change_column :events, :state, :integer, null: true
|
|
|
|
end
|
|
|
|
end
|