diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-11-16 18:41:19 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-11-17 17:56:31 +0900 |
commit | 30416821da6025010fcf6e58d0da19d3972bf39b (patch) | |
tree | 4d28297d7679a6181b9d8e5017b850cb5c01ea3c | |
parent | 10c216dabb44605d5e8711a0158e3087289e8889 (diff) | |
download | gitlab-ce-feature/sm/40147-add-environment_scope-to-cluster-table.tar.gz |
Add environment_scope to cluster tablefeature/sm/40147-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 | 3 |
2 files changed, 17 insertions, 1 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 37e08d453c8..aff114873d7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20171106180641) do +ActiveRecord::Schema.define(version: 20171116135628) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -514,6 +514,7 @@ ActiveRecord::Schema.define(version: 20171106180641) 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 |