diff options
Diffstat (limited to 'db/migrate/20181017001059_add_cluster_type_to_clusters.rb')
-rw-r--r-- | db/migrate/20181017001059_add_cluster_type_to_clusters.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20181017001059_add_cluster_type_to_clusters.rb b/db/migrate/20181017001059_add_cluster_type_to_clusters.rb new file mode 100644 index 00000000000..191e7eb4fb3 --- /dev/null +++ b/db/migrate/20181017001059_add_cluster_type_to_clusters.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddClusterTypeToClusters < ActiveRecord::Migration + 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 |