]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/drop_postgresql_tables.in
Tweak Windows tray monitor build
[bacula/bacula] / bacula / src / cats / drop_postgresql_tables.in
index 93fe437f733aa973220991896e5a64681284b600..9f4e312e1c9628724674726fcba0be099905498e 100644 (file)
@@ -3,13 +3,15 @@
 # shell script to delete Bacula tables for PostgreSQL
 
 bindir=@SQL_BINDIR@
+db_name=@db_name@
 
-if $bindir/psql -f - -d bacula $* <<END-OF-DATA
+$bindir/psql -f - -d ${db_name} $* <<END-OF-DATA
 drop table unsavedfiles;
 drop table basefiles;
 drop table jobmedia;
 drop table file;
 drop table job;
+drop table jobhisto;
 drop table media;
 drop table client;
 drop table pool;
@@ -19,13 +21,23 @@ drop table filename;
 drop table counters;
 drop table version;
 drop table CDImages;
-drop table Devices;
+drop table Device;
 drop table Storage;
 drop table MediaType;
+drop table Status;
+drop table MAC;
+drop table log;
+drop table Location;
+drop table locationlog;
+drop table PathVisibility;
+drop table PathHierarchy;
+drop table RestoreObject;
 END-OF-DATA
+pstat=$?
+if test $pstat = 0; 
 then
    echo "Deletion of Bacula PostgreSQL tables succeeded."
 else
    echo "Deletion of Bacula PostgreSQL tables failed."
 fi
-exit 0
+exit $pstat