]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/drop_postgresql_tables.in
- Fix a few problems with the MySQL table create in 1.37.
[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 if $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 Devices;
23 drop table Storage;
24 drop table MediaType;
25 END-OF-DATA
26 then
27    echo "Deletion of Bacula PostgreSQL tables succeeded."
28 else
29    echo "Deletion of Bacula PostgreSQL tables failed."
30 fi
31 exit 0