From 821b8e7a0f90b1720a5d0cbdeb230de614ba8621 Mon Sep 17 00:00:00 2001 From: Josh Stompro Date: Thu, 28 Feb 2019 09:13:58 -0600 Subject: [PATCH] LP#1768869 - Update make_release to add auditor table update The auditor.update_auditors() function needs to be called to update tables that are being auditied with schema changes made to those tables. This adds a call to that funcation at the end of the upgrade scripts. The function seems to not take that long to run, so it may be ok to run it more than necessary. Or it can be removed by release manager if they know that no schema changes were made. Signed-off-by: Josh Stompro --- build/tools/make_release | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/tools/make_release b/build/tools/make_release index c3fd2ed505..1b7b5e1c3d 100755 --- a/build/tools/make_release +++ b/build/tools/make_release @@ -259,6 +259,11 @@ if [ "$PREV_BRANCH" != "PACKAGE" ]; then cat Open-ILS/src/sql/Pg/upgrade/$NUM.* 2>/dev/null | grep -v '^\s*\(BEGIN\|COMMIT\);\s*$' >> $UPGRADE_FILE done; echo "COMMIT;" >> $UPGRADE_FILE + #Add call to auditor.update_auditors() to keep auditor tables up to date + echo "" >> $UPGRADE_FILE + echo "-- Update auditor tables to catch changes to source tables." >> $UPGRADE_FILE + echo "-- Can be removed/skipped if there were no schema changes." >> $UPGRADE_FILE + echo "SELECT auditor.update_auditors();" >> $UPGRADE_FILE MAYBE_DUPES=`grep -oP 'CREATE (OR REPLACE )?FUNCTION +\K[^ ]*(?= *\()' $UPGRADE_FILE | sort | grep -P '^(.*)\n\1$' | sort -u` if [ -n "$MAYBE_DUPES" ]; then echo "" -- 2.11.0