]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP 1450561: Restore org. unit settings history limit function and trigger
authorJason Stephenson <jstephenson@mvlc.org>
Fri, 1 May 2015 19:33:05 +0000 (15:33 -0400)
committerBen Shum <bshum@biblio.org>
Wed, 19 Aug 2015 02:23:41 +0000 (22:23 -0400)
commit7fa6cb7b161f4947fd4819df6e829696a19046b1
tree5315673cdebfaa6868c30dbeadd519d7ab155fe8
parent06cb65dbef8f82ecb6d0ad4143bfd2c464eeffde
LP 1450561: Restore org. unit settings history limit function and trigger

The evergreen.limit_oustl function and the limit_log_oustl trigger on
config.org_unit_setting_type_log were missed in the upgrade scripts
when these were added to the base schema.  This commit adds them and a
pgtap test to check that they exist after.

This commit also alters the body of the limit_oustl function to take into
account of the org unit when deleting entries from the log table.  This
change allows multiple consortium members to have their own five history
entries.  The original code only kept the last five entries of any given
setting across the whole installation.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/t/lp1450561-limit_oustl.pg [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.lmit_logs_oust-create.sql [new file with mode: 0644]