diff options
Diffstat (limited to 'db/post_migrate/20200409211607_migrate_legacy_attachments.rb')
-rw-r--r-- | db/post_migrate/20200409211607_migrate_legacy_attachments.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/db/post_migrate/20200409211607_migrate_legacy_attachments.rb b/db/post_migrate/20200409211607_migrate_legacy_attachments.rb deleted file mode 100644 index fb4a996d3b7..00000000000 --- a/db/post_migrate/20200409211607_migrate_legacy_attachments.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class MigrateLegacyAttachments < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - disable_ddl_transaction! - - DOWNTIME = false - - MIGRATION = 'LegacyUploadsMigrator' - BATCH_SIZE = 5000 - INTERVAL = 5.minutes.to_i - - class Upload < ActiveRecord::Base - self.table_name = 'uploads' - - include ::EachBatch - end - - def up - queue_background_migration_jobs_by_range_at_intervals(Upload.where(uploader: 'AttachmentUploader', model_type: 'Note'), - MIGRATION, - INTERVAL, - batch_size: BATCH_SIZE) - end - - def down - # no-op - end -end |