Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-24 00:06:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-24 00:06:17 +0300
commit11faf8ae72dcdbaff31f97410a3a9319324438fd (patch)
tree2dc680f52ef8b2355c9097dfd1bbeb5ba899df3c /lib/gitlab/background_migration
parent7f0a4a64d0bc59b184ae3ee578adb6ebd3c48bf7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r--lib/gitlab/background_migration/legacy_upload_mover.rb1
-rw-r--r--lib/gitlab/background_migration/legacy_uploads_migrator.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/legacy_upload_mover.rb b/lib/gitlab/background_migration/legacy_upload_mover.rb
index c9e47f210be..1879a6c5427 100644
--- a/lib/gitlab/background_migration/legacy_upload_mover.rb
+++ b/lib/gitlab/background_migration/legacy_upload_mover.rb
@@ -18,6 +18,7 @@ module Gitlab
def execute
return unless upload
+ return unless upload.model_type == 'Note'
if !project
# if we don't have models associated with the upload we can not move it
diff --git a/lib/gitlab/background_migration/legacy_uploads_migrator.rb b/lib/gitlab/background_migration/legacy_uploads_migrator.rb
index a9d38a27e0c..f7cadb9b00d 100644
--- a/lib/gitlab/background_migration/legacy_uploads_migrator.rb
+++ b/lib/gitlab/background_migration/legacy_uploads_migrator.rb
@@ -14,7 +14,7 @@ module Gitlab
include Database::MigrationHelpers
def perform(start_id, end_id)
- Upload.where(id: start_id..end_id, uploader: 'AttachmentUploader').find_each do |upload|
+ Upload.where(id: start_id..end_id, uploader: 'AttachmentUploader', model_type: 'Note').find_each do |upload|
LegacyUploadMover.new(upload).execute
end
end