diff options
author | Nick Thomas <nick@gitlab.com> | 2017-05-02 10:17:48 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-05-03 15:27:45 +0100 |
commit | 1a168dc7a587182dc6bd39f543198ada21f87437 (patch) | |
tree | ad6d36154bd5a7403e4a0e43e9bc6285198de6c5 /db/migrate/markdown_cache_limits_to_mysql.rb | |
parent | 6201f4c2b59748f14c4899af7077aee1cf751f04 (diff) | |
download | gitlab-ce-1a168dc7a587182dc6bd39f543198ada21f87437.tar.gz |
Fix caching large snippet HTML content on MySQL databases
Diffstat (limited to 'db/migrate/markdown_cache_limits_to_mysql.rb')
-rw-r--r-- | db/migrate/markdown_cache_limits_to_mysql.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/markdown_cache_limits_to_mysql.rb b/db/migrate/markdown_cache_limits_to_mysql.rb new file mode 100644 index 00000000000..f6686db3dc0 --- /dev/null +++ b/db/migrate/markdown_cache_limits_to_mysql.rb @@ -0,0 +1,13 @@ +class MarkdownCacheLimitsToMysql < ActiveRecord::Migration + DOWNTIME = false + + def up + return unless Gitlab::Database.mysql? + + change_column :snippets, :content_html, :text, limit: 2147483647 + end + + def down + # no-op + end +end |