]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/drop_bacula_tables.in
Eliminate bsd_queue conflict with winnt.h
[bacula/bacula] / bacula / src / cats / drop_bacula_tables.in
index 658d290940ce1706ca350b6498f167bc67b23732..4ff69a54f10dba93ac2b3ef13dd8c4f3718d191b 100755 (executable)
@@ -1,10 +1,19 @@
 #!/bin/sh
 #
 #  Drop Bacula tables -- works for whatever is configured,
-#    MySQL or SQLite
+#    MySQL, SQLite, or PostgreSQL
 #
 if test xsqlite = x@DB_NAME@ ; then
-  source ./drop_sqlite_tables
+  @scriptdir@/drop_sqlite_tables
+  echo "Dropped SQLite tables"
 else
-  source ./drop_mysql_tables
+  if test xmysql = x@DB_NAME@ ; then 
+    echo "Making MySQL tables"
+    @scriptdir@/drop_mysql_tables $*
+    echo "Dropped MySQL tables"
+  else
+    # hardcoded database name - should be a parameter
+    @scriptdir@/drop_postgresql_tables bacula
+    echo "Dropped PostgreSQL tables"
+  fi
 fi