blob: d0d89bd5027cac0c570b971e90d36716ca6f8e5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: true
class AddForeignKeyAddOnPurchaseIdOnSubscriptionUserAddOnAssignments < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
def up
add_concurrent_foreign_key :subscription_user_add_on_assignments, :subscription_add_on_purchases,
column: :add_on_purchase_id, on_delete: :cascade
end
def down
with_lock_retries do
remove_foreign_key :subscription_user_add_on_assignments, column: :add_on_purchase_id
end
end
end
|