]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/updatedb/update_sqlite3_tables_11_to_12.in
Try to fix bug #2349 multiple recycle messages
[bacula/bacula] / bacula / updatedb / update_sqlite3_tables_11_to_12.in
index 64919cb6f78e470a2f4c8c232a77e87f2e47fe17..6479a5bdf09e4b6624628d9bac1d3f404a4147ee 100644 (file)
@@ -1,5 +1,8 @@
 #!/bin/sh
 #
+# Copyright (C) 2000-2015 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
 # Shell script to update SQLite3 tables from Bacula Community version 3.0.x to 5.0.0
 #
 echo " "
@@ -7,13 +10,12 @@ echo "This script will update a Bacula SQLite3 database from version 11 to 12"
 echo " which is needed to convert from Bacula Community version 3.0.x to 5.0.x"
 echo " "
 
-bindir=@SQL_BINDIR@
+bindir=@SQLITE_BINDIR@
 PATH="$bindir:$PATH"
 cd @working_dir@
-sqlite=@DB_TYPE@
 db_name=@db_name@
 
-DBV=`${sqlite} ${db_name} $sbin/regress.db <<END
+DBV=`${sqlite} ${db_name}.db <<END
 select VersionId from Version;
 END`
 if [ $DBVERSION != 11 ] ; then
@@ -25,8 +27,7 @@ if [ $DBVERSION != 11 ] ; then
    exit 1
 fi
 
-
-${sqlite} $* ${db_name}.db <<END-OF-DATA
+sqlite3 $* ${db_name}.db <<END-OF-DATA
 BEGIN;
 ALTER TABLE Job ADD COLUMN HasCache TINYINT DEFAULT 0;
 ALTER TABLE Job ADD COLUMN Reviewed TINYINT DEFAULT 0;