#!/bin/sh
#
# Shell script to update PostgreSQL tables
#
echo " "
echo "Depending on the size of your database,"
echo "this script may take several minutes to run."
echo " "
bindir=@SQL_BINDIR@

if $bindir/psql $* -f - <<END-OF-DATA
\c bacula

DELETE FROM Version;
INSERT INTO Version (VersionId) VALUES (7);

END-OF-DATA
then
   echo "Update of Bacula PostgreSQL tables succeeded."
else
   echo "Update of Bacula PostgreSQL tables failed."
fi
exit 0
