summaryrefslogtreecommitdiff
path: root/db
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
parentd78513cb6ccfe10976cc433e2b421c30d06d19be (diff)
downloadgitlab-ce-baafd8de26507ebd76177b5c65b5da921445ddc9.tar.gz
Enable Style/BarePercentLiterals
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160610201627_migrate_users_notification_level.rb4
-rw-r--r--db/migrate/20160831214543_migrate_project_features.rb4
2 files changed, 4 insertions, 4 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)
})
diff --git a/db/migrate/20160831214543_migrate_project_features.rb b/db/migrate/20160831214543_migrate_project_features.rb
index 79a5fb29d64..a2f2267773c 100644
--- a/db/migrate/20160831214543_migrate_project_features.rb
+++ b/db/migrate/20160831214543_migrate_project_features.rb
@@ -10,7 +10,7 @@ class MigrateProjectFeatures < ActiveRecord::Migration
def up
sql =
- %Q{
+ %{
INSERT INTO project_features(project_id, issues_access_level, merge_requests_access_level, wiki_access_level,
builds_access_level, snippets_access_level, created_at, updated_at)
SELECT
@@ -29,7 +29,7 @@ class MigrateProjectFeatures < ActiveRecord::Migration
end
def down
- sql = %Q{
+ sql = %{
UPDATE projects
SET
issues_enabled = COALESCE((SELECT CASE WHEN issues_access_level = 20 THEN true ELSE false END AS issues_enabled FROM project_features WHERE project_features.project_id = projects.id), true),