From 56ca6e49fbcee3a73ec477b8569e8b873f7401a2 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 14 Apr 2020 10:48:32 -0400 Subject: [PATCH] LP1858448 Upgrade instructions WIP Signed-off-by: Bill Erickson Signed-off-by: Jason Stephenson --- .../Administration/aged-money.adoc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/RELEASE_NOTES_NEXT/Administration/aged-money.adoc b/docs/RELEASE_NOTES_NEXT/Administration/aged-money.adoc index f6d736f99d..82bc38a6c2 100644 --- a/docs/RELEASE_NOTES_NEXT/Administration/aged-money.adoc +++ b/docs/RELEASE_NOTES_NEXT/Administration/aged-money.adoc @@ -19,3 +19,24 @@ Aged Payment Additional Fields The aged payment table now has accepting_usr, cash_drawer, and billing columns to improve reporting of aged money. +Manual Data Migration of Aged Money ++++++++++++++++++++++++++++++++++++ + +For users that wish to age money along with circulations (global flag +'history.money.age_with_circs' is set to true), it's necessary to manaully +age money for circulations which have already been aged. This can be +done directly in the database with SQL: + +NOTE: This SQL can take a very long time to run on large databases, so +it may be necessary to process aged circulations in batches instead +of all at once. + +[source,sql] +------------------------------------------------------------------------- +SELECT money.age_billings_and_payments_for_xact(circ.id) +FROM action.aged_circulation circ +-- limit to aged circs with billings +JOIN money.billing mb ON mb.xact = circ.id; +------------------------------------------------------------------------- + + -- 2.11.0