summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-11-16 18:41:19 +0900
committerShinya Maeda <shinya@gitlab.com>2017-11-22 16:09:10 +0900
commit98bb78a4bd61ebd9b1e3c812d6ddf8fedb993573 (patch)
tree6bae9e52d0bde2d87043faefd26bd63a334df384 /db
parent6369db0196ec7b6e288b16382c95243424a59b62 (diff)
downloadgitlab-ce-98bb78a4bd61ebd9b1e3c812d6ddf8fedb993573.tar.gz
Add environment_scope to cluster table
Diffstat (limited to 'db')
-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