diff options
author | Andreas Brandl <abrandl@gitlab.com> | 2018-05-21 21:16:46 +0300 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2018-05-22 16:43:17 +0300 |
commit | d8d30f8cb88d5ce2431d84e3acb015bbe33548a7 (patch) | |
tree | 615fbb0672607367c4ac429ad678a113ada99664 /db | |
parent | ff5f3560928124de3c081feb8914d77f635c05c2 (diff) |
Increase text limit for GPG keys (mysql only).
Closes #46530.
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180521171529_increase_mysql_text_limit_for_gpg_keys.rb | 2 | ||||
-rw-r--r-- | db/migrate/gpg_keys_limits_to_mysql.rb | 15 | ||||
-rw-r--r-- | db/schema.rb | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/db/migrate/20180521171529_increase_mysql_text_limit_for_gpg_keys.rb b/db/migrate/20180521171529_increase_mysql_text_limit_for_gpg_keys.rb new file mode 100644 index 00000000000..df84898003f --- /dev/null +++ b/db/migrate/20180521171529_increase_mysql_text_limit_for_gpg_keys.rb @@ -0,0 +1,2 @@ +# rubocop:disable all +require_relative 'gpg_keys_limits_to_mysql' diff --git a/db/migrate/gpg_keys_limits_to_mysql.rb b/db/migrate/gpg_keys_limits_to_mysql.rb new file mode 100644 index 00000000000..780340d0564 --- /dev/null +++ b/db/migrate/gpg_keys_limits_to_mysql.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index c2e97f93160..37d336b9928 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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" |