summaryrefslogtreecommitdiff
path: root/db/post_migrate/20220324032250_migrate_shimo_confluence_service_category.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20220324032250_migrate_shimo_confluence_service_category.rb')
-rw-r--r--db/post_migrate/20220324032250_migrate_shimo_confluence_service_category.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/db/post_migrate/20220324032250_migrate_shimo_confluence_service_category.rb b/db/post_migrate/20220324032250_migrate_shimo_confluence_service_category.rb
new file mode 100644
index 00000000000..d341cc50874
--- /dev/null
+++ b/db/post_migrate/20220324032250_migrate_shimo_confluence_service_category.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class MigrateShimoConfluenceServiceCategory < Gitlab::Database::Migration[1.0]
+ MIGRATION = 'MigrateShimoConfluenceIntegrationCategory'
+ DELAY_INTERVAL = 2.minutes
+ BATCH_SIZE = 10_000
+
+ disable_ddl_transaction!
+
+ def up
+ queue_background_migration_jobs_by_range_at_intervals(
+ define_batchable_model('integrations').where(type_new: %w[Integrations::Confluence Integrations::Shimo]),
+ MIGRATION,
+ DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ track_jobs: true)
+ end
+
+ def down
+ end
+end