]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/drop_postgresql_tables.in
Replace explicit checks for "/" with calls to IsPathSeparator, strchr with first_path...
[bacula/bacula] / bacula / src / cats / drop_postgresql_tables.in
1 #!/bin/sh
2 #
3 # shell script to delete Bacula tables for PostgreSQL
4
5 bindir=@SQL_BINDIR@
6
7 $bindir/psql -f - -d bacula $* <<END-OF-DATA
8 drop table unsavedfiles;
9 drop table basefiles;
10 drop table jobmedia;
11 drop table file;
12 drop table job;
13 drop table media;
14 drop table client;
15 drop table pool;
16 drop table fileset;
17 drop table path;
18 drop table filename;
19 drop table counters;
20 drop table version;
21 drop table CDImages;
22 drop table Device;
23 drop table Storage;
24 drop table MediaType;
25 drop table Status;
26 drop table MAC;
27 drop table log;
28 drop table Location;
29 drop table locationlog;
30 END-OF-DATA
31 pstat=$?
32 if test $pstat = 0; 
33 then
34    echo "Deletion of Bacula PostgreSQL tables succeeded."
35 else
36    echo "Deletion of Bacula PostgreSQL tables failed."
37 fi
38 exit $pstat