diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-11-16 18:41:19 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-11-22 16:09:10 +0900 |
commit | 98bb78a4bd61ebd9b1e3c812d6ddf8fedb993573 (patch) | |
tree | 6bae9e52d0bde2d87043faefd26bd63a334df384 | |
parent | 6369db0196ec7b6e288b16382c95243424a59b62 (diff) | |
download | gitlab-ce-98bb78a4bd61ebd9b1e3c812d6ddf8fedb993573.tar.gz |
Add environment_scope to cluster table
-rw-r--r-- | db/migrate/20171116135628_add_environment_scope_to_clusters.rb | 15 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20171116135628_add_environment_scope_to_clusters.rb b/db/migrate/20171116135628_add_environment_scope_to_clusters.rb new file mode 100644 index 00000000000..cce757095dd --- /dev/null +++ b/db/migrate/20171116135628_add_environment_scope_to_clusters.rb @@ -0,0 +1,15 @@ +class AddEnvironmentScopeToClusters < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default(:clusters, :environment_scope, :string, default: '*') + end + + def down + remove_column(:clusters, :environment_scope) + end +end diff --git a/db/schema.rb b/db/schema.rb index a82270390f1..bca8b96b2c1 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -523,6 +523,7 @@ ActiveRecord::Schema.define(version: 20171121144800) do t.datetime_with_timezone "updated_at", null: false t.boolean "enabled", default: true t.string "name", null: false + t.string "environment_scope", default: "*", null: false end add_index "clusters", ["enabled"], name: "index_clusters_on_enabled", using: :btree |