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:21:27 +0000 (22:21 -0400)
commit34337bda97bb667dd06b3c90c539e60b58530ebe
tree31ba9395224aec04c191dec95baedf04acbf5fcf
parent5db238d962d56cbbfd2cb172e617dd58d73c2107
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]