From 1c6336715a4b455f5d446b83a3d63fc148880414 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 5 Sep 2007 19:57:37 +0000 Subject: [PATCH] ebl Add a patch to add a Product column to Version table git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5463 91ce42f0-d328-0410-95d8-f526ca767f89 --- .../testing/add_product_name_in_version.patch | 782 ++++++++++++++++++ .../add_product_name_in_version.readme | 17 + 2 files changed, 799 insertions(+) create mode 100644 bacula/patches/testing/add_product_name_in_version.patch create mode 100644 bacula/patches/testing/add_product_name_in_version.readme diff --git a/bacula/patches/testing/add_product_name_in_version.patch b/bacula/patches/testing/add_product_name_in_version.patch new file mode 100644 index 0000000000..e13886a095 --- /dev/null +++ b/bacula/patches/testing/add_product_name_in_version.patch @@ -0,0 +1,782 @@ +Index: src/cats/sql.c +=================================================================== +--- src/cats/sql.c (révision 5461) ++++ src/cats/sql.c (copie de travail) +@@ -111,7 +111,8 @@ + /* Check that the tables correspond to the version we want */ + bool check_tables_version(JCR *jcr, B_DB *mdb) + { +- const char *query = "SELECT VersionId FROM Version"; ++ const char *query = "SELECT VersionId FROM Version " ++ " WHERE Product = 'bacula'"; + + bacula_db_version = 0; + if (!db_sql_query(mdb, query, int_handler, (void *)&bacula_db_version)) { +Index: src/cats/update_postgresql_tables.in +=================================================================== +--- src/cats/update_postgresql_tables.in (révision 5461) ++++ src/cats/update_postgresql_tables.in (copie de travail) +@@ -1,10 +1,10 @@ + #!/bin/sh + # +-# Shell script to update PostgreSQL tables from version 1.38 to 2.0.0 or higher ++# Shell script to update PostgreSQL tables from version 2.2 to 3 or higher + # + echo " " +-echo "This script will update a Bacula PostgreSQL database from version 9 to 10" +-echo " which is needed to convert from Bacula version 1.38.x to 2.0.0 or higher" ++echo "This script will update a Bacula PostgreSQL database from version 10 to 11" ++echo " which is needed to convert from Bacula version 2.2 to 3 or higher" + echo "Depending on the size of your database," + echo "this script may take several minutes to run." + echo " " +@@ -13,65 +13,10 @@ + + if $bindir/psql -f - -d ${db_name} $* < + +This patch add a column to the Version table of the catalog. +For example, bweb and brestore are using private tables, and +it is useful to store the schema version in the same table. + +Product | Version +---------+--------- +bacula | 10 +bweb | 2 +brestore | 3 + +instead of + +Version +------- + 10 -- 2.39.5