Skip to content

Commit

Permalink
feat: add audit history objects to new database version 11 (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-fletcher-aot authored Jan 9, 2024
1 parent 3a86521 commit eb596f3
Show file tree
Hide file tree
Showing 4 changed files with 4,788 additions and 1 deletion.
8 changes: 7 additions & 1 deletion database/mssql/scripts/utility/orbc-db-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,13 @@ function migrate_db_single {
# The stripping of the = signs causes problems with base64 decoding because
# the padding is represented by =. Bash base64 can still decode but it generates
# an error, and may not always be reliable.
export UPDATE_SCRIPT=$( base64 -w 0 <${SCRIPT_DIR}/versions/v_${nextver}_ddl.sql )

# Jan 8, 2024 - removed the addition of UPDATE_SCRIPT to the database during
# migration, since a very long SQL script was encountered at version 11 that overflowed
# the linux ARG_MAX command size limit. It was originally added for reference
# only, so is now no longer used. If in the future a REVERT_SCRIPT is encountered
# that breaks the ARG_MAX limit we will have to separate into multiple versions.
export UPDATE_SCRIPT="Refer to git repository"
export REVERT_SCRIPT=$( base64 -w 0 <${SCRIPT_DIR}/versions/revert/v_${nextver}_ddl_revert.sql )
sqlcmd -C -U ${1} -P "${2}" -S ${3} -d ${4} -b -i ${SCRIPT_DIR}/versions/v_${nextver}_ddl.sql
if (( $? > 0 )); then
Expand Down
Loading

0 comments on commit eb596f3

Please sign in to comment.