debian-mirror-gitlab/db/migrate/20230129154126_add_widget_def_namespace_fk.rb
2023-04-23 21:23:45 +05:30

16 lines
411 B
Ruby

# frozen_string_literal: true
class AddWidgetDefNamespaceFk < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
def up
add_concurrent_foreign_key :work_item_widget_definitions, :work_item_types,
column: :work_item_type_id, on_delete: :cascade
end
def down
with_lock_retries do
remove_foreign_key :work_item_widget_definitions, column: :work_item_type_id
end
end
end