BigW Consortium Gitlab

20170525130758_add_foreign_key_to_group_variables.rb 338 Bytes
Newer Older
Shinya Maeda committed
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