Wishlist
Evergreen 3.2
When a circulation is aged, any billings and payments linked to the transaction remain in the active billing and payment tables. While this data may be useful for reporting, it has limited value to the application, because detailed transaction data on aged circulations is never displayed in the staff client. Similarly, the link between billings/payments and patrons is severed when the circ is aged, so the data is never included in any patron displays.
I propose we move billings and payments to "aged" tables to keep the active billing and payment tables from growing unbounded. What's more, we should support a purge-after date for the aged billing/payment data so it may be fully deleted after a configurable age.
For simplicity sake, I also propose we avoid duplicating the full money.payment table hierarchy and do something like this instead:
create table money.aged_payment as select * from money.payment_view where ... ;
With this, we retain payment type information, but not all of the per-payment-type details.
I have some interest in data cleanup prior to upgrading to 3.1, so I put together a patch to implement the above for feedback, minus the purge-interval setting. May revisit that later via another LP.
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ berick/ lp1793802- aged-billing- payment
Similar to aged_circulation, the new tables are created with indexes and NULL constraints, but no foreign key refs.
Includes pgtap tests and release notes.