OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/db/migrate/20211104151329_default_noti...

21 lines
384 B

class DefaultNotificationSetting < ActiveRecord::Migration[6.1]
def up
NotificationSetting.delete_all
execute <<~SQL.squish
INSERT INTO
notification_settings
(user_id, watched, involved, mentioned)
SELECT
id, true, true, true
FROM
users
WHERE type = 'User'
SQL
end
def down
# No data to revert
end
end