From 3d2b4011dc2b6e69bba6a9aada8aa28aea90fcb0 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Thu, 14 Apr 2022 11:51:30 -0400 Subject: [PATCH] LP1965797: Add Acq Lineitem Detail Audit Table Add SQL to create an audit table for acq.lineitem_detail in the base schema creation. The table is not added during a database upgrade. The release notes include instructions on creating the new table. Signed-off-by: Jason Stephenson Signed-off-by: Josh Stompro Signed-off-by: Galen Charlton --- Open-ILS/src/sql/Pg/201.acq.audit-functions.sql | 5 +++++ .../Acquisitions/lineitem_detail_auditor.adoc | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/lineitem_detail_auditor.adoc diff --git a/Open-ILS/src/sql/Pg/201.acq.audit-functions.sql b/Open-ILS/src/sql/Pg/201.acq.audit-functions.sql index c9d17b6ce7..f107852a40 100644 --- a/Open-ILS/src/sql/Pg/201.acq.audit-functions.sql +++ b/Open-ILS/src/sql/Pg/201.acq.audit-functions.sql @@ -105,4 +105,9 @@ SELECT acq.create_acq_auditor ( 'acq', 'lineitem' ); CREATE INDEX acq_lineitem_hist_id_idx ON acq.acq_lineitem_history( id ); CREATE INDEX acq_lineitem_history_queued_record_idx ON acq.acq_lineitem_history (queued_record); +SELECT acq.create_acq_auditor ( 'acq', 'lineitem_detail' ); +CREATE INDEX acq_lineitem_detail_hist_id_idx ON acq.acq_lineitem_detail_history( id ); +CREATE INDEX acq_lineitem_detail_hist_lineitem_idx ON acq.acq_lineitem_detail_history( lineitem ); +CREATE INDEX acq_lineitem_detail_hist_fund_debit_idx ON acq.acq_lineitem_detail_history( fund_debit ); + COMMIT; diff --git a/docs/RELEASE_NOTES_NEXT/Acquisitions/lineitem_detail_auditor.adoc b/docs/RELEASE_NOTES_NEXT/Acquisitions/lineitem_detail_auditor.adoc new file mode 100644 index 0000000000..6e091649ba --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/Acquisitions/lineitem_detail_auditor.adoc @@ -0,0 +1,15 @@ +== Lineitem Detail Audit Table == + +The default schema has added an audit table for the +`acq.lineitem_detail` table. The audit table is NOT created during +database upgrade. If you wish to add the audit table to your +Evergreen installation, you can run the following SQL in your +database: + +[source, sql] +---- +SELECT acq.create_acq_auditor ( 'acq', 'lineitem_detail' ); +CREATE INDEX acq_lineitem_detail_hist_id_idx ON acq.acq_lineitem_detail_history( id ); +CREATE INDEX acq_lineitem_detail_hist_lineitem_idx ON acq.acq_lineitem_detail_history( lineitem ); +CREATE INDEX acq_lineitem_detail_hist_fund_debit_idx ON acq.acq_lineitem_detail_history( fund_debit ); +---- -- 2.11.0