From 27d314277bfe7fffec215efa9b1833a23bb82940 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 29 Jan 2020 21:09:22 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- ...0122161638_add_deploy_token_type_to_deploy_tokens.rb | 17 +++++++++++++++++ db/schema.rb | 1 + 2 files changed, 18 insertions(+) create mode 100644 db/migrate/20200122161638_add_deploy_token_type_to_deploy_tokens.rb (limited to 'db') 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 -- cgit v1.2.3