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

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

  DOWNTIME = false

  def up
    add_column :project_mirror_data, :status, :string unless column_exists?(:project_mirror_data, :status) # rubocop:disable Migration/AddLimitToStringColumns
    add_column :project_mirror_data, :jid, :string unless column_exists?(:project_mirror_data, :jid) # rubocop:disable Migration/AddLimitToStringColumns
    add_column :project_mirror_data, :last_error, :text unless column_exists?(:project_mirror_data, :last_error)
  end

  def down
    # db/migrate/20180502122856_create_project_mirror_data.rb will remove the table
  end
end