LP1858448 Upgrade instructions WIP
authorBill Erickson <berickxx@gmail.com>
Tue, 14 Apr 2020 14:48:32 +0000 (10:48 -0400)
committerJason Stephenson <jason@sigio.com>
Tue, 28 Apr 2020 18:29:35 +0000 (14:29 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jason Stephenson <jason@sigio.com>

docs/RELEASE_NOTES_NEXT/Administration/aged-money.adoc

index f6d736f..82bc38a 100644 (file)
@@ -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;
+-------------------------------------------------------------------------
+
+