]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/update_postgresql_tables.in
Add %D option to edit_job_code, simplify callbacks on director side
[bacula/bacula] / bacula / src / cats / update_postgresql_tables.in
index cbc51850d322b512b0bf1b1981f467f17ab8f338..d737bcf35a3fd27f79c3dd34a01ae9273763481a 100644 (file)
@@ -1,23 +1,22 @@
 #!/bin/sh
 #
-# Shell script to update PostgreSQL tables from version 12 to 13
+# Shell script to update PostgreSQL tables from version 12 to 14
 #  or Bacula Community version 5.0.x to 5.2.x
 #
 echo " "
-echo "This script will update a Bacula PostgreSQL database from version 12 to 13"
-echo " which is needed to convert from Bacula Enterprise version 2.6.x to 4.0.x"
-echo " or Bacula Community version 5.0.x to 5.2.x"
+echo "This script will update a Bacula PostgreSQL database from version 12 to 14"
+echo " which is needed to convert from Bacula Community version 5.0.x to 5.2.x"
 echo " "
 
 bindir=@POSTGRESQL_BINDIR@
 PATH="$bindir:$PATH"
 db_name=@db_name@
 
-DBVERSION=`psql ${db_name} -t --pset format=unaligned -c "select VersionId from Version"`
+DBVERSION=`psql -d ${db_name} -t --pset format=unaligned -c "select VersionId from Version" $*`
 if [ $DBVERSION != 12 ] ; then
    echo " "
    echo "The existing database is version $DBVERSION !!"
-   echo "This script can only update an existing version 12 database to version 13."
+   echo "This script can only update an existing version 12 database to version 14."
    echo "Error. Cannot upgrade this database."
    echo " "
    exit 1