From: Kern Sibbald Date: Tue, 12 May 2020 08:15:13 +0000 (+0200) Subject: BEE Backport bacula/src/cats/drop_postgresql_tables.in X-Git-Tag: Release-11.3.2~1698 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4aaeee52fe0de20c3579a4495254fbd7d7aa0c8;p=thirdparty%2Fbacula.git BEE Backport bacula/src/cats/drop_postgresql_tables.in This commit is the result of the squash of the following main commits: Author: Kern Sibbald Date: Wed Jan 15 21:09:31 2020 +0100 Use if exists on dropping all postgresql tables --- diff --git a/bacula/src/cats/drop_postgresql_tables.in b/bacula/src/cats/drop_postgresql_tables.in index 80c3bef151..f33db1270b 100644 --- a/bacula/src/cats/drop_postgresql_tables.in +++ b/bacula/src/cats/drop_postgresql_tables.in @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2000-2015 Kern Sibbald +# Copyright (C) 2000-2020 Kern Sibbald # License: BSD 2-Clause; see file LICENSE-FOSS # # shell script to delete Bacula tables for PostgreSQL @@ -9,9 +9,11 @@ bindir=@POSTGRESQL_BINDIR@ db_name=@db_name@ $bindir/psql -f - -d ${db_name} $* </dev/null 2>/dev/null +drop table if exists Events; drop table if exists unsavedfiles; drop table if exists basefiles; drop table if exists jobmedia; +drop table if exists filemedia; drop table if exists file; drop table if exists job; drop table if exists jobhisto; @@ -20,7 +22,6 @@ drop table if exists client; drop table if exists pool; drop table if exists fileset; drop table if exists path; -drop table if exists filename; drop table if exists counters; drop table if exists version; drop table if exists CDImages;