Merge branch 'ab-46530-mediumtext-for-gpg-keys' into 'master'
Increase text limit for GPG keys (mysql only). Closes #46530 See merge request gitlab-org/gitlab-ce!19069
This commit is contained in:
commit
45ec7d15dd
5 changed files with 25 additions and 1 deletions
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Increase text limit for GPG keys (mysql only).
|
||||
merge_request: 19069
|
||||
author:
|
||||
type: other
|
|
@ -0,0 +1,2 @@
|
|||
# rubocop:disable all
|
||||
require_relative 'gpg_keys_limits_to_mysql'
|
15
db/migrate/gpg_keys_limits_to_mysql.rb
Normal file
15
db/migrate/gpg_keys_limits_to_mysql.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class IncreaseMysqlTextLimitForGpgKeys < ActiveRecord::Migration
|
||||
|
||||
# Set this constant to true if this migration requires downtime.
|
||||
DOWNTIME = false
|
||||
|
||||
def up
|
||||
return unless Gitlab::Database.mysql?
|
||||
|
||||
change_column :gpg_keys, :key, :text, limit: 16.megabytes - 1
|
||||
end
|
||||
|
||||
def down
|
||||
# no-op
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20180517082340) do
|
||||
ActiveRecord::Schema.define(version: 20180521171529) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
|
@ -2,6 +2,7 @@ require Rails.root.join('db/migrate/limits_to_mysql')
|
|||
require Rails.root.join('db/migrate/markdown_cache_limits_to_mysql')
|
||||
require Rails.root.join('db/migrate/merge_request_diff_file_limits_to_mysql')
|
||||
require Rails.root.join('db/migrate/limits_ci_build_trace_chunks_raw_data_for_mysql')
|
||||
require Rails.root.join('db/migrate/gpg_keys_limits_to_mysql')
|
||||
|
||||
desc "GitLab | Add limits to strings in mysql database"
|
||||
task add_limits_mysql: :environment do
|
||||
|
@ -10,4 +11,5 @@ task add_limits_mysql: :environment do
|
|||
MarkdownCacheLimitsToMysql.new.up
|
||||
MergeRequestDiffFileLimitsToMysql.new.up
|
||||
LimitsCiBuildTraceChunksRawDataForMysql.new.up
|
||||
IncreaseMysqlTextLimitForGpgKeys.new.up
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue