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

20220105121325_add_route_namespace_reference.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 77bd0530b8a83b16930dd215d5408983e2babb93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

class AddRouteNamespaceReference < Gitlab::Database::Migration[1.0]
  enable_lock_retries!

  def up
    add_column :routes, :namespace_id, :bigint unless column_exists?(:routes, :namespace_id)
  end

  def down
    remove_column :routes, :namespace_id if column_exists?(:routes, :namespace_id)
  end
end