diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-06-09 22:33:31 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-06-10 17:49:30 +0300 |
commit | 39ead205de72461e86db07525922f2fab5fff2a9 (patch) | |
tree | 5336487bad3b89b5db461788aba9eb7d4b9c3b0f /db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb | |
parent | 8f6d43e0fea3ce62ec2e8e211755e557f19c51fd (diff) |
Remove notification level fild from users, improve migrations and specs
Diffstat (limited to 'db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb')
-rw-r--r-- | db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb b/db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb new file mode 100644 index 00000000000..259abb08e47 --- /dev/null +++ b/db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb @@ -0,0 +1,11 @@ +class RemoveNotificationSettingNotNullConstraints < ActiveRecord::Migration + def up + change_column :notification_settings, :source_type, :string, null: true + change_column :notification_settings, :source_id, :integer, null: true + end + + def down + change_column :notification_settings, :source_type, :string, null: false + change_column :notification_settings, :source_id, :integer, null: false + end +end |