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

20181017001059_add_cluster_type_to_clusters.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d032afe1a43a49e17b773364ff2b29557a265592 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

class AddClusterTypeToClusters < ActiveRecord::Migration[4.2]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false
  PROJECT_CLUSTER_TYPE = 3

  disable_ddl_transaction!

  def up
    add_column_with_default(:clusters, :cluster_type, :smallint, default: PROJECT_CLUSTER_TYPE)
  end

  def down
    remove_column(:clusters, :cluster_type)
  end
end