]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/drop_postgresql_tables.in
kes Apply patch supplied in bug #656 to pass priority field
[bacula/bacula] / bacula / src / cats / drop_postgresql_tables.in
index 93fe437f733aa973220991896e5a64681284b600..ab5f59a1375eb6780221f214fd162ac4546d19ac 100644 (file)
@@ -4,7 +4,7 @@
 
 bindir=@SQL_BINDIR@
 
 
 bindir=@SQL_BINDIR@
 
-if $bindir/psql -f - -d bacula $* <<END-OF-DATA
+$bindir/psql -f - -d bacula $* <<END-OF-DATA
 drop table unsavedfiles;
 drop table basefiles;
 drop table jobmedia;
 drop table unsavedfiles;
 drop table basefiles;
 drop table jobmedia;
@@ -19,13 +19,20 @@ drop table filename;
 drop table counters;
 drop table version;
 drop table CDImages;
 drop table counters;
 drop table version;
 drop table CDImages;
-drop table Devices;
+drop table Device;
 drop table Storage;
 drop table MediaType;
 drop table Storage;
 drop table MediaType;
+drop table Status;
+drop table MAC;
+drop table log;
+drop table Location;
+drop table locationlog;
 END-OF-DATA
 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
 then
    echo "Deletion of Bacula PostgreSQL tables succeeded."
 else
    echo "Deletion of Bacula PostgreSQL tables failed."
 fi
-exit 0
+exit $pstat