#!/bin/sh
#
# Drop Bacula tables -- works for whatever is configured,
-# MySQL or SQLite
+# MySQL, SQLite, Ingres, or PostgreSQL
#
-if test xsqlite = x@DB_NAME@ ; then
- source ./drop_sqlite_tables
+if test xsqlite3 = x@DB_TYPE@ ; then
+ @scriptdir@/drop_@DB_TYPE@_tables $*
+ echo "Dropped SQLite tables"
else
- source ./drop_mysql_tables
+ if test xmysql = x@DB_TYPE@ ; then
+ echo "Making MySQL tables"
+ @scriptdir@/drop_mysql_tables $*
+ echo "Dropped MySQL tables"
+ elif test xingres = x@DB_TYPE@ ; then
+ echo "Dropping Ingres tables"
+ @scriptdir@/drop_ingres_tables $*
+ echo "Dropped Ingres tables"
+ else
+ # hardcoded database name - should be a parameter
+ @scriptdir@/drop_postgresql_tables $*
+ echo "Dropped PostgreSQL tables"
+ fi
fi