summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-13 21:09:38 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-13 21:09:38 +0000
commit232e0a31f1e5d5b3a788dfc3dba8f8d41df36bf9 (patch)
treea2b11b9a805ef1165d8730934ba4a4f801f31870 /db
parent00fa950a34b1c94617110b150b8b2517d5241249 (diff)
downloadgitlab-ce-232e0a31f1e5d5b3a788dfc3dba8f8d41df36bf9.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200310145304_add_runtime_created_to_ci_job_variables.rb19
-rw-r--r--db/schema.rb1
2 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20200310145304_add_runtime_created_to_ci_job_variables.rb b/db/migrate/20200310145304_add_runtime_created_to_ci_job_variables.rb
new file mode 100644
index 00000000000..d5ec8854bfa
--- /dev/null
+++ b/db/migrate/20200310145304_add_runtime_created_to_ci_job_variables.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddRuntimeCreatedToCiJobVariables < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ DEFAULT_SOURCE = 0 # Equvalent to Ci::JobVariable.internal_source
+
+ def up
+ add_column_with_default(:ci_job_variables, :source, :integer, limit: 2, default: DEFAULT_SOURCE, allow_null: false)
+ end
+
+ def down
+ remove_column(:ci_job_variables, :source)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index f57b0638e05..741bb2b9262 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -780,6 +780,7 @@ ActiveRecord::Schema.define(version: 2020_03_12_163407) do
t.string "encrypted_value_iv"
t.bigint "job_id", null: false
t.integer "variable_type", limit: 2, default: 1, null: false
+ t.integer "source", limit: 2, default: 0, null: false
t.index ["job_id"], name: "index_ci_job_variables_on_job_id"
t.index ["key", "job_id"], name: "index_ci_job_variables_on_key_and_job_id", unique: true
end