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

20200519101002_add_error_message_column_to_jira_imports.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 478b535805671880e59ee411129c575645c8e0da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

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

  DOWNTIME = false
  disable_ddl_transaction!

  def up
    unless column_exists?(:jira_imports, :error_message)
      add_column :jira_imports, :error_message, :text
    end

    add_text_limit :jira_imports, :error_message, 1000
  end

  def down
    return unless column_exists?(:jira_imports, :error_message)

    remove_column :jira_imports, :error_message
  end
end