summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-12-12 12:48:11 +0000
committerDouwe Maan <douwe@gitlab.com>2017-12-12 12:48:11 +0000
commit2750d7e6606e91f608b9e379980e24f3a632cc5a (patch)
treee7d2f61e21d76ab953978ddee647bfc1628f9d55
parent2ef39a80410540995fe3f64bf38ae0f0adb9fc0f (diff)
parent3b860069956f0574459b4d4d622d8569740d5683 (diff)
downloadgitlab-ce-2750d7e6606e91f608b9e379980e24f3a632cc5a.tar.gz
Merge branch '41041-undefined-method-new_project_guidelines_html-unable-to-load-from-cache' into 'master'
Resolve "undefined method `new_project_guidelines_html', unable to load from cache" Closes #41041 See merge request gitlab-org/gitlab-ce!15878
-rw-r--r--db/migrate/20171122131600_add_new_project_guidelines_to_appearances.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/db/migrate/20171122131600_add_new_project_guidelines_to_appearances.rb b/db/migrate/20171122131600_add_new_project_guidelines_to_appearances.rb
index f141c442d97..328cc65a549 100644
--- a/db/migrate/20171122131600_add_new_project_guidelines_to_appearances.rb
+++ b/db/migrate/20171122131600_add_new_project_guidelines_to_appearances.rb
@@ -4,6 +4,12 @@ class AddNewProjectGuidelinesToAppearances < ActiveRecord::Migration
DOWNTIME = false
def change
+ # Clears the current Appearance cache otherwise it breaks since
+ # new_project_guidelines_html would be missing. See
+ # https://gitlab.com/gitlab-org/gitlab-ce/issues/41041
+ # We're not using Appearance#flush_redis_cache on purpose here.
+ Rails.cache.delete('current_appearance')
+
change_table :appearances do |t|
t.text :new_project_guidelines
t.text :new_project_guidelines_html