debian-mirror-gitlab/db/migrate/20230210160037_add_batch_foreign_key_to_bulk_import_export_uploads.rb
2023-05-27 22:25:52 +05:30

16 lines
403 B
Ruby

# frozen_string_literal: true
class AddBatchForeignKeyToBulkImportExportUploads < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
def up
add_concurrent_foreign_key :bulk_import_export_uploads, :bulk_import_export_batches, column: :batch_id
end
def down
with_lock_retries do
remove_foreign_key_if_exists :bulk_import_export_uploads, column: :batch_id
end
end
end