docbrown/db/migrate/20200324170819_add_welcome_notifications_to_users.rb
Vaidehi Joshi c12cea9b02
Allow users to opt-out of welcome notifications (#6852) [deploy]
* Update some test descriptions in notifications_spec

The descriptions of these tests didn't actually match the test's assertions!

* Add welcome_notifications column to users table

Also ensures that welcome_notifications cannot be set to `nil`.

* Show an opt-out message for Welcome broadcast notifications

* Add opt-out link to notifications + welcome notification box to settings

* Allow welcome notification subscription to be updated

* Add tests for unsubscribed to welcome notification users

Also refactor generator specs a bit.

* Fix up paths, copy, tests

Use rails path helpers instead of hardcoding paths. Improve copy in a few locations.
2020-03-26 11:26:19 -07:00

5 lines
175 B
Ruby

class AddWelcomeNotificationsToUsers < ActiveRecord::Migration[5.2]
def change
add_column :users, :welcome_notifications, :boolean, default: true, null: false
end
end