summaryrefslogtreecommitdiff
path: root/db/migrate
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/migrate
parent6369db0196ec7b6e288b16382c95243424a59b62 (diff)
downloadgitlab-ce-98bb78a4bd61ebd9b1e3c812d6ddf8fedb993573.tar.gz
Add environment_scope to cluster table
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20171116135628_add_environment_scope_to_clusters.rb15
1 files changed, 15 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