#!/bin/sh
#
#  Drop Bacula tables -- works for whatever is configured,
#    MySQL, SQLite, or PostgreSQL
#
if test xsqlite = xsqlite -o xsqlite3 = xsqlite ; then
  /usr/local/libexec/bacula/drop_sqlite_tables $*
  echo "Dropped SQLite tables"
else
  if test xmysql = xsqlite ; then 
    echo "Making MySQL tables"
    /usr/local/libexec/bacula/drop_mysql_tables $*
    echo "Dropped MySQL tables"
  else
    # hardcoded database name - should be a parameter
    /usr/local/libexec/bacula/drop_postgresql_tables $*
    echo "Dropped PostgreSQL tables"
  fi
fi
