class CreateAccountingInvoiceCharges < ActiveRecord::Migration[6.0]
  def change
    create_table :accounting_invoice_charges do |t|
      t.references :invoice, null: false,
        foreign_key: { to_table: :accounting_invoices }
      t.references :transaction, null: false, index: { unique: true },
        foreign_key: { to_table: :accounting_transactions }

      t.timestamps
    end
  end
end
