summaryrefslogtreecommitdiff
path: root/db/migrate/20160610201627_migrate_users_notification_level.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-21 18:47:39 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-23 09:31:57 -0600
commitbaafd8de26507ebd76177b5c65b5da921445ddc9 (patch)
treee42fa7a49b6615dbf4e2c8a65077de399bec01b8 /db/migrate/20160610201627_migrate_users_notification_level.rb
parentd78513cb6ccfe10976cc433e2b421c30d06d19be (diff)
downloadgitlab-ce-baafd8de26507ebd76177b5c65b5da921445ddc9.tar.gz
Enable Style/BarePercentLiterals
Diffstat (limited to 'db/migrate/20160610201627_migrate_users_notification_level.rb')
-rw-r--r--db/migrate/20160610201627_migrate_users_notification_level.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20160610201627_migrate_users_notification_level.rb b/db/migrate/20160610201627_migrate_users_notification_level.rb
index 760b766828e..798e315102e 100644
--- a/db/migrate/20160610201627_migrate_users_notification_level.rb
+++ b/db/migrate/20160610201627_migrate_users_notification_level.rb
@@ -3,7 +3,7 @@ class MigrateUsersNotificationLevel < ActiveRecord::Migration
# creating a new record on notification settings table
def up
- execute(%Q{
+ execute(%{
INSERT INTO notification_settings
(user_id, level, created_at, updated_at)
(SELECT id, notification_level, created_at, updated_at FROM users WHERE notification_level != 1)
@@ -13,7 +13,7 @@ class MigrateUsersNotificationLevel < ActiveRecord::Migration
# Migrates from notification settings back to user notification_level
# If no value is found the default level of 1 will be used
def down
- execute(%Q{
+ execute(%{
UPDATE users u SET
notification_level = COALESCE((SELECT level FROM notification_settings WHERE user_id = u.id AND source_type IS NULL), 1)
})