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

20200420092011_add_profile_image_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: bab3e21e2856278516ff33776f8e1d066696f27f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

class AddProfileImageGuidelinesToAppearances < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_column :appearances, :profile_image_guidelines, :text, null: true
    add_column :appearances, :profile_image_guidelines_html, :text, null: true # rubocop:disable Migration/AddLimitToTextColumns

    add_text_limit :appearances, :profile_image_guidelines, 4096, constraint_name: 'appearances_profile_image_guidelines'
  end

  def down
    remove_column :appearances, :profile_image_guidelines
    remove_column :appearances, :profile_image_guidelines_html
  end
end