diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-04-02 09:54:54 +0300 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2019-04-02 09:54:54 +0300 |
commit | 6473f6976124f047a56f9d004e3d0746ab493b29 (patch) | |
tree | a4d157a4a436d1a0151651b17ac4e9790b124ef7 /db/migrate | |
parent | c44b9e9e5b79c4012a0fea8743fc058a444234d0 (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')
-rw-r--r-- | db/migrate/20190325165127_add_managed_to_cluster.rb | 17 |
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 |