Commit 81079ae3 authored by Yannis Roussos's avatar Yannis Roussos

Merge branch 'mk/fix-bg-migration-temporary-class' into 'master'

Fix background migration temporary class definition

See merge request gitlab-org/gitlab!42413
parents f91ea8e2 d6c181c3
...@@ -11,10 +11,12 @@ module Gitlab ...@@ -11,10 +11,12 @@ module Gitlab
class SetNullPackageFilesFileStoreToLocalValue class SetNullPackageFilesFileStoreToLocalValue
LOCAL_STORE = 1 # equal to ObjectStorage::Store::LOCAL LOCAL_STORE = 1 # equal to ObjectStorage::Store::LOCAL
module Packages
# Temporary AR class for package files # Temporary AR class for package files
class PackageFile < ActiveRecord::Base class PackageFile < ActiveRecord::Base
self.table_name = 'packages_package_files' self.table_name = 'packages_package_files'
end end
end
def perform(start_id, stop_id) def perform(start_id, stop_id)
Packages::PackageFile.where(file_store: nil, id: start_id..stop_id).update_all(file_store: LOCAL_STORE) Packages::PackageFile.where(file_store: nil, id: start_id..stop_id).update_all(file_store: LOCAL_STORE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment