summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-12-12 12:12:42 +0100
committerRémy Coutable <remy@rymai.me>2017-12-12 12:12:42 +0100
commit3b860069956f0574459b4d4d622d8569740d5683 (patch)
treee7d2f61e21d76ab953978ddee647bfc1628f9d55 /db
parent2ef39a80410540995fe3f64bf38ae0f0adb9fc0f (diff)
downloadgitlab-ce-3b860069956f0574459b4d4d622d8569740d5683.tar.gz
Clears the current Appearance cache otherwise it breaks since new_project_guidelines_html would be missing41041-undefined-method-new_project_guidelines_html-unable-to-load-from-cache
Solves https://gitlab.com/gitlab-org/gitlab-ce/issues/41041. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'db')
-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