]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/drop_ingres_tables.in
Fix bug in bvfs_update function, should work much better now
[bacula/bacula] / bacula / src / cats / drop_ingres_tables.in
1 #!/bin/sh
2 #
3 # shell script to delete Bacula tables for PostgreSQL
4
5 bindir=@SQL_BINDIR@
6 db_name=@db_name@
7 db_user=@db_user@
8
9 sql -u${db_user} ${db_name} $* <<END-OF-DATA
10 drop table unsavedfiles;
11 drop table basefiles;
12 drop table jobmedia;
13 drop table file;
14 drop table job;
15 drop table jobhisto;
16 drop table media;
17 drop table client;
18 drop table pool;
19 drop table fileset;
20 drop table path;
21 drop table filename;
22 drop table counters;
23 drop table version;
24 drop table CDImages;
25 drop table Device;
26 drop table Storage;
27 drop table MediaType;
28 drop table Status;
29 drop table MAC;
30 drop table log;
31 drop table Location;
32 drop table locationlog;
33 END-OF-DATA
34 pstat=$?
35 if test $pstat = 0; 
36 then
37    echo "Deletion of Bacula Ingres tables succeeded."
38 else
39    echo "Deletion of Bacula Ingres tables failed."
40 fi
41 exit $pstat