debian-mirror-gitlab/db/migrate/20230129154126_add_widget_def_namespace_fk.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
411 B
Ruby
Raw Normal View History

2023-04-23 21:23:45 +05:30
# 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