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

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

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_concurrent_foreign_key :ci_group_variables, :namespaces, column: :group_id
  end

  def down
    remove_foreign_key :ci_group_variables, column: :group_id
  end
end