提交 321e580e 编写于 作者: S Shinya Maeda

Rename FillFileStoreUpload to FillStoreUpload

上级 26b3816d
......@@ -28,10 +28,11 @@ class FillFileStore < ActiveRecord::Migration
class Upload < ActiveRecord::Base
include EachBatch
self.table_name = 'uploads'
self.inheritance_column = :_type_disabled # Disable STI
BATCH_SIZE = 10_000
def self.params_for_background_migration
yield self.where(store: nil), 'FillFileStoreUpload', 5.minutes, BATCH_SIZE
yield self.where(store: nil), 'FillStoreUpload', 5.minutes, BATCH_SIZE
end
end
......
......@@ -4,14 +4,14 @@
module Gitlab
module BackgroundMigration
class FillFileStoreUpload
class FillStoreUpload
class Upload < ActiveRecord::Base
self.table_name = 'uploads'
self.inheritance_column = :_type_disabled
end
def perform(start_id, stop_id)
Gitlab::BackgroundMigration::FillFileStoreUpload::Upload
Gitlab::BackgroundMigration::FillStoreUpload::Upload
.where('store is NULL')
.where(id: (start_id..stop_id))
.update_all(store: 1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册