summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 21:09:22 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 21:09:22 +0000
commit27d314277bfe7fffec215efa9b1833a23bb82940 (patch)
tree898c606409718e70579beea62174624f84e28629 /db
parent6b9d3a4e8351e662c4586b24bb152de78ae9e3bf (diff)
downloadgitlab-ce-27d314277bfe7fffec215efa9b1833a23bb82940.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200122161638_add_deploy_token_type_to_deploy_tokens.rb17
-rw-r--r--db/schema.rb1
2 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20200122161638_add_deploy_token_type_to_deploy_tokens.rb b/db/migrate/20200122161638_add_deploy_token_type_to_deploy_tokens.rb
new file mode 100644
index 00000000000..e0cf18caf9c
--- /dev/null
+++ b/db/migrate/20200122161638_add_deploy_token_type_to_deploy_tokens.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddDeployTokenTypeToDeployTokens < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ DOWNTIME = false
+
+ def up
+ add_column_with_default :deploy_tokens, :deploy_token_type, :integer, default: 2, limit: 2, allow_null: false # rubocop: disable Migration/AddColumnWithDefault
+ end
+
+ def down
+ remove_column :deploy_tokens, :deploy_token_type
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index cb27967e69c..80e7af66fb9 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1358,6 +1358,7 @@ ActiveRecord::Schema.define(version: 2020_01_27_090233) do
t.string "token"
t.string "username"
t.string "token_encrypted", limit: 255
+ t.integer "deploy_token_type", limit: 2, default: 2, null: false
t.index ["token", "expires_at", "id"], name: "index_deploy_tokens_on_token_and_expires_at_and_id", where: "(revoked IS FALSE)"
t.index ["token"], name: "index_deploy_tokens_on_token", unique: true
t.index ["token_encrypted"], name: "index_deploy_tokens_on_token_encrypted", unique: true