summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-09-07 15:07:47 +1200
committerThong Kuah <tkuah@gitlab.com>2018-09-14 16:26:51 +1200
commitc9af170d9aeeb39dbb41a99c00402beb384da0e9 (patch)
tree53544844fd8ac75f0fc2f2d44595b01089fad874 /db/migrate
parent2e47e1f80e000fb717f89effef983bf22c9e2f4d (diff)
downloadgitlab-ce-c9af170d9aeeb39dbb41a99c00402beb384da0e9.tar.gz
Create a GKE cluster with legacy_abac disabled when the `:rbac_clusters` feature flag is enabled
Explicitly persist the legacy_abac value of the cluster_provider_gcp so that we can disable abac if the `:rbac_clusters` feature flag is enabled
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb b/db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb
new file mode 100644
index 00000000000..933047e32de
--- /dev/null
+++ b/db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddLegacyAbacToClusterProvidersGcp < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default(:cluster_providers_gcp, :legacy_abac, :boolean, default: true)
+ end
+
+ def down
+ remove_column(:cluster_providers_gcp, :legacy_abac)
+ end
+end