debian-mirror-gitlab/db/migrate/20210125105410_add_devops_adoption_segment_namespace_fk.rb
2021-03-11 19:13:27 +05:30

18 lines
443 B
Ruby

# frozen_string_literal: true
class AddDevopsAdoptionSegmentNamespaceFk < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_foreign_key :analytics_devops_adoption_segments, :namespaces, column: :namespace_id
end
def down
remove_foreign_key_if_exists :analytics_devops_adoption_segments, :namespaces, column: :namespace_id
end
end