From: Josh Stompro Date: Thu, 28 Feb 2019 15:13:58 +0000 (-0600) Subject: LP#1768869 - Update make_release to add auditor table update X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=327ae761d1969aafb2c30d7fcd7fc0bcf53c5354;p=evergreen%2Fmasslnc.git 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 Signed-off-by: Galen Charlton --- 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 ""