diff options
Diffstat (limited to 'db/post_migrate/20191002031332_schedule_pages_metadata_migration.rb')
-rw-r--r-- | db/post_migrate/20191002031332_schedule_pages_metadata_migration.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/db/post_migrate/20191002031332_schedule_pages_metadata_migration.rb b/db/post_migrate/20191002031332_schedule_pages_metadata_migration.rb deleted file mode 100644 index 0cd24da50d0..00000000000 --- a/db/post_migrate/20191002031332_schedule_pages_metadata_migration.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class SchedulePagesMetadataMigration < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - BATCH_SIZE = 10_000 - MIGRATION = 'MigratePagesMetadata' - - disable_ddl_transaction! - - class Project < ActiveRecord::Base - include ::EachBatch - - self.table_name = 'projects' - end - - def up - say "Scheduling `#{MIGRATION}` jobs" - - # At the time of writing there are ~10_669_292 records to be inserted for GitLab.com, - # batches of 10_000 with delay interval of 2 minutes gives us an estimate of close to 36 hours. - queue_background_migration_jobs_by_range_at_intervals(Project, MIGRATION, 2.minutes, batch_size: BATCH_SIZE) - end - - def down - # no-op - end -end |