summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-06-21 17:30:12 +0000
committerLin Jen-Shin <godfat@godfat.org>2017-06-21 17:30:12 +0000
commitd9ad56f3c5a7fc5e682ec96731b0578719934122 (patch)
treea89935f89800564ccf457e389f44758c75ba5382 /db
parent3f11829fe09cabd94df8879673f1d15f49ee9b9f (diff)
downloadgitlab-ce-d9ad56f3c5a7fc5e682ec96731b0578719934122.tar.gz
Add environment_scope column to ci_variables table
This is merely to make CE and EE more compatible. See the EE merge request at: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2112
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170612150426_add_environment_scope_to_ci_variables.rb15
-rw-r--r--db/schema.rb1
2 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20170612150426_add_environment_scope_to_ci_variables.rb b/db/migrate/20170612150426_add_environment_scope_to_ci_variables.rb
new file mode 100644
index 00000000000..17fe062d8d5
--- /dev/null
+++ b/db/migrate/20170612150426_add_environment_scope_to_ci_variables.rb
@@ -0,0 +1,15 @@
+class AddEnvironmentScopeToCiVariables < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default(:ci_variables, :environment_scope, :string, default: '*')
+ end
+
+ def down
+ remove_column(:ci_variables, :environment_scope)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 028556bdccf..006122bc7c7 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -374,6 +374,7 @@ ActiveRecord::Schema.define(version: 20170621102400) do
t.string "encrypted_value_iv"
t.integer "project_id", null: false
t.boolean "protected", default: false, null: false
+ t.string "environment_scope", default: "*", null: false
end
add_index "ci_variables", ["project_id"], name: "index_ci_variables_on_project_id", using: :btree