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

20230113201308_backfill_namespace_ldap_settings.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 28a600c459f8483320f1ab9d1f9ef01e0aed3d04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# frozen_string_literal: true

class BackfillNamespaceLdapSettings < Gitlab::Database::Migration[2.1]
  restrict_gitlab_migration gitlab_schema: :gitlab_main
  disable_ddl_transaction!

  DOWNTIME = false
  MIGRATION = 'BackfillNamespaceLdapSettings'
  TABLE_NAME = 'namespaces'
  PRIMARY_KEY = :id
  INTERVAL = 2.minutes

  def up
    queue_batched_background_migration(
      MIGRATION,
      TABLE_NAME,
      PRIMARY_KEY,
      job_interval: INTERVAL
    )
  end

  def down
    delete_batched_background_migration(
      MIGRATION,
      TABLE_NAME,
      PRIMARY_KEY,
      []
    )
  end
end