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

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

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

  DOWNTIME = false

  def up
    return unless column_exists?(:services, :instance)

    undo_rename_column_concurrently :services, :template, :instance
  end

  def down
    # This migration should not be rolled back because it
    # removes a column that got added in migrations that
    # have been reverted in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24857
  end
end