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:
authorKamil Trzciński <ayufan@ayufan.eu>2017-11-23 13:39:06 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2017-11-23 13:39:06 +0300
commitaaf156eb4a22c325c43979e126bc6254c7bf9019 (patch)
treefd1c3815e8098095f617f5e19912c4df72aa665c
parent3e558d8dbdbf39a0241b1e72ee494362624ace38 (diff)
parent98bb78a4bd61ebd9b1e3c812d6ddf8fedb993573 (diff)
Merge branch 'feature/sm/40147-add-environment_scope-to-cluster-table' into 'master'
Add environment_scope to cluster table See merge request gitlab-org/gitlab-ce!15419
-rw-r--r--db/migrate/20171116135628_add_environment_scope_to_clusters.rb15
-rw-r--r--db/schema.rb1
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