BigW Consortium Gitlab

20160610140403_remove_notification_setting_not_null_constraints.rb 417 Bytes
Newer Older
1 2 3 4
class RemoveNotificationSettingNotNullConstraints < ActiveRecord::Migration
  def up
    change_column :notification_settings, :source_type, :string, null: true
    change_column :notification_settings, :source_id, :integer, null: true
5 6 7 8 9
  end

  def down
    change_column :notification_settings, :source_type, :string, null: false
    change_column :notification_settings, :source_id, :integer, null: false
10 11
  end
end