diff options
Diffstat (limited to 'db/post_migrate/20181105201455_steal_fill_store_upload.rb')
-rw-r--r-- | db/post_migrate/20181105201455_steal_fill_store_upload.rb | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/db/post_migrate/20181105201455_steal_fill_store_upload.rb b/db/post_migrate/20181105201455_steal_fill_store_upload.rb deleted file mode 100644 index a31a4eab472..00000000000 --- a/db/post_migrate/20181105201455_steal_fill_store_upload.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class StealFillStoreUpload < ActiveRecord::Migration[4.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - BATCH_SIZE = 10_000 - - disable_ddl_transaction! - - class Upload < ActiveRecord::Base - include EachBatch - - self.table_name = 'uploads' - self.inheritance_column = :_type_disabled # Disable STI - end - - def up - Gitlab::BackgroundMigration.steal('FillStoreUpload') - - Upload.where(store: nil).each_batch(of: BATCH_SIZE) do |batch| - range = batch.pluck('MIN(id)', 'MAX(id)').first - - Gitlab::BackgroundMigration::FillStoreUpload.new.perform(*range) - end - end - - def down - # noop - end -end |