From 419bdd9329bd1e0efa0c896831b012f9f912c61b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 11 Jun 2010 22:39:57 +0200 Subject: [PATCH] Add new upgrade script from DB vers 12 to 13 --- bacula/src/cats/update_mysql_tables.in | 66 ++++++---------- bacula/src/cats/update_postgresql_tables.in | 86 ++++++--------------- bacula/src/cats/update_sqlite3_tables.in | 73 ++++++----------- 3 files changed, 70 insertions(+), 155 deletions(-) diff --git a/bacula/src/cats/update_mysql_tables.in b/bacula/src/cats/update_mysql_tables.in index b2f6270e31..22db77c3f4 100644 --- a/bacula/src/cats/update_mysql_tables.in +++ b/bacula/src/cats/update_mysql_tables.in @@ -1,10 +1,12 @@ #!/bin/sh # -# Shell script to update MySQL Community version 3.0.x to 5.0.x +# Shell script to update MySQL Enterprise version 2.6.x to 4.0.x +# or Bacula Community version 5.0.x to 5.2.x # echo " " -echo "This script will update a Bacula MySQL database from version 11 to 12" -echo " which is needed to convert from Bacula Community version 3.0.x to 5.0.x" +echo "This script will update a Bacula MySQL database from version 12 to 13" +echo " which is needed to convert from Bacula Enterprise version 2.6.x to 6.0.x" +echo " or Bacula Community version 5.0.x to 5.2.x" echo " " bindir=@SQL_BINDIR@ PATH="$bindir:$PATH" @@ -12,10 +14,10 @@ db_name=@db_name@ mysql ${db_name} -e "select VersionId from Version\G" >/tmp/$$ DBVERSION=`sed -n -e 's/^VersionId: \(.*\)$/\1/p' /tmp/$$` -if [ $DBVERSION != 11 ] ; then +if [ $DBVERSION != 12 ] ; then echo " " echo "The existing database is version $DBVERSION !!" - echo "This script can only update an existing version 11 database to version 12." + echo "This script can only update an existing version 12 database to version 13." echo "Error. Cannot upgrade this database." echo " " exit 1 @@ -24,48 +26,24 @@ fi if mysql $* -f <