From 656ce4f0e6982e68c9c41dbff6bb89ef703cad80 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 15 Dec 2020 11:58:10 +0100 Subject: [PATCH] Fix update_sqlite3_tables to upgrade from 9.6 to 11.0 --- bacula/src/cats/update_sqlite3_tables.in | 202 ++++++++++++++++++++--- 1 file changed, 179 insertions(+), 23 deletions(-) diff --git a/bacula/src/cats/update_sqlite3_tables.in b/bacula/src/cats/update_sqlite3_tables.in index 41fefefb9..34641cc28 100644 --- a/bacula/src/cats/update_sqlite3_tables.in +++ b/bacula/src/cats/update_sqlite3_tables.in @@ -3,12 +3,12 @@ # Copyright (C) 2000-2020 Kern Sibbald # License: BSD 2-Clause; see file LICENSE-FOSS # -# Shell script to update SQLite3 tables from Bacula Enterprise version from 4.0.x to 12.4.x +# Shell script to update SQLite3 tables from Bacula # echo " " -echo "This script will update a Bacula SQLite3 database from version 12-14,1021 to 1022" +echo "This script will update a Bacula SQLite3 database from version 12-16 to 1022" echo " which is needed to convert from Bacula Enterprise version 4.0.x to 12.4.x" -echo " or Bacula Community version 5.0.x, 5.2.x, 6.0.x to 10.0.x" +echo " or Bacula Community version 5.0.x, 5.2.x, 6.0.x to 11.0.x" echo " " bindir=@SQLITE_BINDIR@ @@ -21,10 +21,10 @@ SELECT VersionId FROM Version LIMIT 1; END ` if [ "$DBVERSION" -ne 1022 ] ; then - if [ "$DBVERSION" -lt 12 -o "$DBVERSION" -gt 14 ] ; then + if [ "$DBVERSION" -lt 12 -o "$DBVERSION" -gt 16 ] ; then echo " " echo "The existing database is version $DBVERSION !!" - echo "This script can only update an existing version 12, 13, 14 or 1014-1021 database to version 1022." + echo "This script can only update an existing version 12-16 database to version 1022." echo "Error. Cannot upgrade this database." echo " " exit 1 @@ -85,18 +85,84 @@ fi if [ "$DBVERSION" = 1014 ] ; then sqlite3 $* ${db_name}.db <