summaryrefslogtreecommitdiff
path: root/db/migrate/gpg_keys_limits_to_mysql.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/gpg_keys_limits_to_mysql.rb')
-rw-r--r--db/migrate/gpg_keys_limits_to_mysql.rb15
1 files changed, 15 insertions, 0 deletions
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