summaryrefslogtreecommitdiff
path: root/db/post_migrate/20181022173835_enqueue_populate_cluster_kubernetes_namespace.rb
blob: f80a2aa6eaced3c55262ab2af68a043e212ea248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

class EnqueuePopulateClusterKubernetesNamespace < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false
  MIGRATION = 'PopulateClusterKubernetesNamespaceTable'.freeze

  disable_ddl_transaction!

  def up
    BackgroundMigrationWorker.perform_async(MIGRATION)
  end

  def down
    Clusters::KubernetesNamespace.delete_all
  end
end