summaryrefslogtreecommitdiff
path: root/db/migrate/20230210160037_add_batch_foreign_key_to_bulk_import_export_uploads.rb
blob: de0286f27edde57120f6f9f23832641b0ad1de33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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