Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2017-05-02 12:17:48 +0300
committerNick Thomas <nick@gitlab.com>2017-05-03 17:27:45 +0300
commit1a168dc7a587182dc6bd39f543198ada21f87437 (patch)
treead6d36154bd5a7403e4a0e43e9bc6285198de6c5 /db
parent6201f4c2b59748f14c4899af7077aee1cf751f04 (diff)
Fix caching large snippet HTML content on MySQL databases
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170502091007_markdown_cache_limits_to_mysql.rb2
-rw-r--r--db/migrate/markdown_cache_limits_to_mysql.rb13
-rw-r--r--db/schema.rb2
3 files changed, 16 insertions, 1 deletions
diff --git a/db/migrate/20170502091007_markdown_cache_limits_to_mysql.rb b/db/migrate/20170502091007_markdown_cache_limits_to_mysql.rb
new file mode 100644
index 00000000000..008a94d8334
--- /dev/null
+++ b/db/migrate/20170502091007_markdown_cache_limits_to_mysql.rb
@@ -0,0 +1,2 @@
+# rubocop:disable all
+require_relative 'markdown_cache_limits_to_mysql'
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
diff --git a/db/schema.rb b/db/schema.rb
index be6684f3a6b..01c0f00c924 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: 20170426181740) do
+ActiveRecord::Schema.define(version: 20170502091007) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"