#!/bin/sh
#
# shell script to delete Bacula tables for PostgreSQL

bindir=@SQL_BINDIR@

if $bindir/psql $* -f - <<END-OF-DATA
\c bacula
drop table unsavedfiles;
drop table basefiles;
drop table jobmedia;
drop table file;
drop table job;
drop table media;
drop table client;
drop table pool;
drop table fileset;
drop table path;
drop table filename;
drop table counters;
drop table version;
END-OF-DATA
then
   echo "Deletion of Bacula PostgreSQL tables succeeded."
else
   echo "Deletion of Bacula PostgreSQL tables failed."
fi
exit 0
