Skip to content

Commit

Permalink
update_bareos_tables: fix missing psql call in scripts
Browse files Browse the repository at this point in the history
(cherry picked from commit 9423b98)
  • Loading branch information
pstorz authored and arogge committed Feb 3, 2020
1 parent 225f927 commit 58ba8d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/cats/update_bareos_tables.in
Expand Up @@ -168,15 +168,15 @@ do
retval=$?
;;
postgresql)
PGOPTIONS='--client-min-messages=warning' -f ${temp_sql_schema} -d ${db_name} $*
PGOPTIONS='--client-min-messages=warning' psql -f ${temp_sql_schema} -d ${db_name} $*
retval=$?
if [ $retval -eq 0 ] && [ ${end_version} -eq 2192 ]; then
PGSQLVERSION=`PGOPTIONS='--client-min-messages=warning' -d template1 -c 'SELECT version()' $* 2>/dev/null | \
PGSQLVERSION=`PGOPTIONS='--client-min-messages=warning' psql -d template1 -c 'SELECT version()' $* 2>/dev/null | \
awk '/PostgreSQL/ { print $2 }' | \
cut -d '.' -f 1,2`
case ${PGSQLVERSION} in
10.*|11.*|12.*)
PGOPTIONS='--client-min-messages=warning' -d ${db_name} -c 'ALTER SEQUENCE basefiles_baseid_seq AS BIGINT'
PGOPTIONS='--client-min-messages=warning' psql -d ${db_name} -c 'ALTER SEQUENCE basefiles_baseid_seq AS BIGINT'
result=$?
if [ $result -ne 0 ]; then
echo "WARNING: Failed to update sequence basefiles_baseid_seq"
Expand Down

0 comments on commit 58ba8d0

Please sign in to comment.