]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/updatedb/update_sqlite3_tables_11_to_12.in
Add helper for ini files
[bacula/bacula] / bacula / updatedb / update_sqlite3_tables_11_to_12.in
index c839e2ee35a366c63329b609f6226c77205e1832..632913b5e98a74717b8132242465f6e14e3727e9 100644 (file)
@@ -1,19 +1,18 @@
 #!/bin/sh
 #
-# Shell script to update MySQL tables from Bacula Community version 3.0.x to 5.0.0
+# Shell script to update SQLite3 tables from Bacula Community version 3.0.x to 5.0.0
 #
 echo " "
-echo "This script will update a Bacula MySQL database from version 11 to 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 +24,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;