diff options
-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 |