#!/bin/bash
#
# shell script to delete Bacula tables for test database

bindir=~kern/mysql/bin

if $bindir/mysql <<END-OF-DATA
USE baculatest;
DROP TABLE IF EXISTS Filename;
DROP TABLE IF EXISTS Path;
DROP TABLE IF EXISTS LongName;
DROP TABLE IF EXISTS File;
DROP TABLE IF EXISTS Client;
DROP TABLE IF EXISTS Job;
DROP TABLE IF EXISTS Media;
DROP TABLE IF EXISTS JobMedia;
DROP TABLE IF EXISTS Pool;
DROP TABLE IF EXISTS MultiVolume;
DROP TABLE IF EXISTS FileSet;
END-OF-DATA
then
   echo "Deletion of Baculatest tables succeeded."
else
   echo "Deletion of Baculatest tables failed."
fi
exit 0
