Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20210727113447_backfill_integrations_type_new.rb')
-rw-r--r--db/post_migrate/20210727113447_backfill_integrations_type_new.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/db/post_migrate/20210727113447_backfill_integrations_type_new.rb b/db/post_migrate/20210727113447_backfill_integrations_type_new.rb
new file mode 100644
index 00000000000..8544c236fd7
--- /dev/null
+++ b/db/post_migrate/20210727113447_backfill_integrations_type_new.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class BackfillIntegrationsTypeNew < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ MIGRATION = 'BackfillIntegrationsTypeNew'
+ INTERVAL = 2.minutes
+
+ def up
+ queue_batched_background_migration(
+ MIGRATION,
+ :integrations,
+ :id,
+ job_interval: INTERVAL
+ )
+ end
+
+ def down
+ Gitlab::Database::BackgroundMigration::BatchedMigration
+ .for_configuration(MIGRATION, :integrations, :id, [])
+ .delete_all
+ end
+end