summaryrefslogtreecommitdiff
path: root/lib/gitlab/database
diff options
context:
space:
mode:
author🙈 jacopo beschi 🙉 <intrip@gmail.com>2018-01-11 16:34:01 +0000
committerRobert Speicher <robert@gitlab.com>2018-01-11 16:34:01 +0000
commit729f05f0e3c4835c91e20ccd1ddb630eb7ef4379 (patch)
tree3d543c84930ce20b7c91d48295bf3e106c788cde /lib/gitlab/database
parentca8394e8e4931c85b5f2a2bde1951bcb9419e220 (diff)
downloadgitlab-ce-729f05f0e3c4835c91e20ccd1ddb630eb7ef4379.tar.gz
Adds Rubocop rule for line break around conditionals
Diffstat (limited to 'lib/gitlab/database')
-rw-r--r--lib/gitlab/database/migration_helpers.rb1
-rw-r--r--lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/database/migration_helpers.rb b/lib/gitlab/database/migration_helpers.rb
index 7b35c24d153..592a1956ceb 100644
--- a/lib/gitlab/database/migration_helpers.rb
+++ b/lib/gitlab/database/migration_helpers.rb
@@ -512,6 +512,7 @@ module Gitlab
batch_size: 10_000,
interval: 10.minutes
)
+
unless relation.model < EachBatch
raise TypeError, 'The relation must include the EachBatch module'
end
diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb
index d32616862f0..979225dd216 100644
--- a/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb
+++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_projects.rb
@@ -26,6 +26,7 @@ module Gitlab
move_repository(project, old_full_path, new_full_path)
move_repository(project, "#{old_full_path}.wiki", "#{new_full_path}.wiki")
end
+
move_uploads(old_full_path, new_full_path) unless project.hashed_storage?(:attachments)
move_pages(old_full_path, new_full_path)
end