]> git.evergreen-ils.org Git - Evergreen.git/commit
Auditor Function Overhaul
authorThomas Berezansky <tsbere@mvlc.org>
Mon, 21 Nov 2011 16:18:49 +0000 (11:18 -0500)
committerMike Rylander <mrylander@gmail.com>
Tue, 20 Mar 2012 17:43:51 +0000 (13:43 -0400)
commit7ca2c02e3e7e08c8b067be0707670616c1bf183f
tree374ca42c6856962a4f1429fda6fb353da3f17ffc
parent60ae1d172c4abaee2744a36596dcb6ccf31a777e
Auditor Function Overhaul

Alter create_auditor_history to include two new columns:
    audit_user - To refer to the user who made this change
    audit_ws - To refer to the workstation they were logged into

Alter create_auditor_func to include the new columns, as well as make it
stop assuming that the auditor table and the table it is based on use the
same column ordering. In additon, make it use OR REPLACE so it can be run
again later.

Alter create_auditor_lifecycle similarly to create_auditor_func, sans the
OR REPLACE functionality.

Add five new functions:

set_audit_info - To set the user and workstation IDs
get_audit_info - Used by the auditor functions to retrieve said IDs
clear_audit_info - To remove the stored IDs for whatever reason
fix_columns - To add/remove/update columns that have changed since any
    auditors were initially created
update_auditors - To run a full pass of dropping all lifecycle views,
    update for all column changes, re-create the auditor functions, and
    re-create the auditor lifecycle views.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/900.audit-functions.sql