* feat: add the two new models users_setting and users_notification_setting * feat: add the settings and notification_settings table to the schema * feat: add the user and notification models * feat: add the user_id foreign key to the model * chore: sneaky indent * feat: add some fields from the profile attributes * Revert "feat: add some fields from the profile attributes" This reverts commit 376828746ded063a243505d317140fa5339227cf. * chore: add some profile field attributes * chore: remove language_settings * chore: update indent * chore: remove language_settings * feat: changes to the tables * chore: remove validation in favor of the foreign keys * chore: add default for editor version * Address PR review suggestions * setting_spec.rb needs to be fixed; need help * Working on PR review comments * Continue with addressing PR review comments * Remove normalize_config_values method; pass correct values from forms * Address Travis failures * revert some unnecessary changes in spec file Co-authored-by: Arit Amana <msarit@gmail.com>
24 lines
1.3 KiB
Ruby
24 lines
1.3 KiB
Ruby
class CreateUsersNotificationSettings < ActiveRecord::Migration[6.0]
|
|
def change
|
|
create_table :users_notification_settings do |t|
|
|
t.references :user, foreign_key: true, null: false
|
|
t.boolean "email_badge_notifications", default: true, null: false
|
|
t.boolean "email_comment_notifications", default: true, null: false
|
|
t.boolean "email_community_mod_newsletter", default: false, null: false
|
|
t.boolean "email_connect_messages", default: true, null: false
|
|
t.boolean "email_digest_periodic", default: false, null: false
|
|
t.boolean "email_follower_notifications", default: true, null: false
|
|
t.boolean "email_membership_newsletter", default: false, null: false
|
|
t.boolean "email_mention_notifications", default: true, null: false
|
|
t.boolean "email_newsletter", default: false, null: false
|
|
t.boolean "email_tag_mod_newsletter", default: false, null: false
|
|
t.boolean "email_unread_notifications", default: true, null: false
|
|
t.boolean "mobile_comment_notifications", default: true, null: false
|
|
t.boolean "mod_roundrobin_notifications", default: true, null: false
|
|
t.boolean "reaction_notifications", default: true, null: false
|
|
t.boolean "welcome_notifications", default: true, null: false
|
|
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|