summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2018-05-21 20:16:46 +0200
committerAndreas Brandl <abrandl@gitlab.com>2018-05-22 15:43:17 +0200
commitd8d30f8cb88d5ce2431d84e3acb015bbe33548a7 (patch)
tree615fbb0672607367c4ac429ad678a113ada99664 /db
parentff5f3560928124de3c081feb8914d77f635c05c2 (diff)
downloadgitlab-ce-d8d30f8cb88d5ce2431d84e3acb015bbe33548a7.tar.gz
Increase text limit for GPG keys (mysql only).ab-46530-mediumtext-for-gpg-keys
Closes #46530.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180521171529_increase_mysql_text_limit_for_gpg_keys.rb2
-rw-r--r--db/migrate/gpg_keys_limits_to_mysql.rb15
-rw-r--r--db/schema.rb2
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"