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:
authorMayra Cabrera <mcabrera@gitlab.com>2019-04-02 09:54:54 +0300
committerKamil TrzciƄski <ayufan@ayufan.eu>2019-04-02 09:54:54 +0300
commit6473f6976124f047a56f9d004e3d0746ab493b29 (patch)
treea4d157a4a436d1a0151651b17ac4e9790b124ef7 /db/migrate/20190325165127_add_managed_to_cluster.rb
parentc44b9e9e5b79c4012a0fea8743fc058a444234d0 (diff)
Add new field to Clusters table
Adds boolean field 'managed' to clusters table. This new column will be used to distinguish those clusters that are automatically managed by gitlab. Needed for https://gitlab.com/gitlab-org/gitlab-ce/issues/56557
Diffstat (limited to 'db/migrate/20190325165127_add_managed_to_cluster.rb')
-rw-r--r--db/migrate/20190325165127_add_managed_to_cluster.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20190325165127_add_managed_to_cluster.rb b/db/migrate/20190325165127_add_managed_to_cluster.rb
new file mode 100644
index 00000000000..e960df9d502
--- /dev/null
+++ b/db/migrate/20190325165127_add_managed_to_cluster.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddManagedToCluster < ActiveRecord::Migration[5.0]
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ DOWNTIME = false
+
+ def up
+ add_column_with_default(:clusters, :managed, :boolean, default: true)
+ end
+
+ def down
+ remove_column(:clusters, :managed)
+ end
+end