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

20171122131600_add_new_project_guidelines_to_appearances.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cbcbb5d988a0ff054c56f9739a8368276d834267 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class AddNewProjectGuidelinesToAppearances < ActiveRecord::Migration[4.2]
  include Gitlab::Database::MigrationHelpers

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