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 f141c442d9790c7efd825591f54e434fd1cfee45..328cc65a5494cedc528f3e3802e6c94b9a53d66d 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