]> 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 f7cf26dda89872c3df94cf2baf637cad1ab14108..ab5f59a1375eb6780221f214fd162ac4546d19ac 100644 (file)
@@ -4,8 +4,7 @@
 
 bindir=@SQL_BINDIR@
 
 
 bindir=@SQL_BINDIR@
 
-if $bindir/psql $* -f - <<END-OF-DATA
-\c bacula
+$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,10 +18,21 @@ drop table path;
 drop table filename;
 drop table counters;
 drop table version;
 drop table filename;
 drop table counters;
 drop table version;
+drop table CDImages;
+drop table Device;
+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