2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-31 00:06:56 -04:00
|
|
|
class ActingUserNull < ActiveRecord::Migration[4.2]
|
2013-09-12 14:58:20 -04:00
|
|
|
def up
|
2017-07-27 21:20:09 -04:00
|
|
|
change_column :user_histories, :acting_user_id, :integer, null: true
|
2013-09-12 14:58:20 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
execute "DELETE FROM user_histories WHERE acting_user_id IS NULL"
|
2017-07-27 21:20:09 -04:00
|
|
|
change_column :user_histories, :acting_user_id, :integer, null: false
|
2013-09-12 14:58:20 -04:00
|
|
|
end
|
|
|
|
end
|