From 570fc0400e0b992f0d29ece416ab002f742a1399 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 1 Jun 2016 14:54:19 +0200 Subject: [PATCH] In updatedb get recent update_xx_tables and remove old versions --- bacula/updatedb/update_mysql_tables.in | 3 - .../updatedb/update_mysql_tables_12_to_13.in | 53 -------------- .../updatedb/update_mysql_tables_13_to_14.in | 37 ---------- bacula/updatedb/update_postgresql_tables.in | 2 +- .../update_postgresql_tables_12_to_13.in | 53 -------------- .../update_postgresql_tables_13_to_14.in | 38 ---------- bacula/updatedb/update_sqlite3_tables.in | 73 ++++++++++++++++--- 7 files changed, 63 insertions(+), 196 deletions(-) delete mode 100644 bacula/updatedb/update_mysql_tables_12_to_13.in delete mode 100644 bacula/updatedb/update_mysql_tables_13_to_14.in delete mode 100644 bacula/updatedb/update_postgresql_tables_12_to_13.in delete mode 100644 bacula/updatedb/update_postgresql_tables_13_to_14.in diff --git a/bacula/updatedb/update_mysql_tables.in b/bacula/updatedb/update_mysql_tables.in index 4ae0513679..08df0d88b3 100644 --- a/bacula/updatedb/update_mysql_tables.in +++ b/bacula/updatedb/update_mysql_tables.in @@ -143,7 +143,4 @@ END-OF-DATA fi fi - -END-OF-DATA - exit 0 diff --git a/bacula/updatedb/update_mysql_tables_12_to_13.in b/bacula/updatedb/update_mysql_tables_12_to_13.in deleted file mode 100644 index 2590e3d8b9..0000000000 --- a/bacula/updatedb/update_mysql_tables_12_to_13.in +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2000-2015 Kern Sibbald -# License: BSD 2-Clause; see file LICENSE-FOSS -# -# Shell script to update MySQL -# -echo " " -echo "This script will update a Bacula MySQL database from version 12 to 13" -echo " which is needed to convert from Bacula" -echo " " -bindir=@MYSQL_BINDIR@ -PATH="$bindir:$PATH" -db_name=${db_name:-@db_name@} - -mysql $* -D ${db_name} -e "select VersionId from Version\G" >/tmp/$$ -DBVERSION=`sed -n -e 's/^VersionId: \(.*\)$/\1/p' /tmp/$$` -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 "Error. Cannot upgrade this database." - echo " " - exit 1 -fi - -if mysql $* -f </tmp/$$ -DBVERSION=`sed -n -e 's/^VersionId: \(.*\)$/\1/p' /tmp/$$` -if [ $DBVERSION != 13 ] ; then - echo " " - echo "The existing database is version $DBVERSION !!" - echo "This script can only update an existing version 13 database to version 14." - echo "Error. Cannot upgrade this database." - echo " " - exit 1 -fi - -if mysql $* -f <