Clears the current Appearance cache otherwise it breaks since new_project_guidelines_html would be missing

Solves https://gitlab.com/gitlab-org/gitlab-ce/issues/41041.

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2017-12-12 12:12:42 +01:00
parent 2ef39a8041
commit 3b86006995
No known key found for this signature in database
GPG Key ID: 46DF07E5CD9E96AB
1 changed files with 6 additions and 0 deletions

View File

@ -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