Fund debits created by lineitem_details (copies) now track which invoice
entry last touched the fund debit. With this, it's possible to say with
certainty which invoice a fund_debit "belongs" to, which is particularly
useful for reporting fund summary information on an invoice.
Note this has no affect fund_debit's linked to invoice_item's, since
they already link to the fund debits.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
--- /dev/null
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+ALTER TABLE acq.fund_debit
+ ADD COLUMN invoice_entry INTEGER
+ REFERENCES acq.invoice_entry (id)
+ ON DELETE SET NULL;
+
+COMMIT;