3 # shell script to delete Bacula tables for MySQL
5 # Bacula® - The Network Backup Solution
7 # Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
9 # The main author of Bacula is Kern Sibbald, with contributions from many
10 # others, a complete list can be found in the file AUTHORS.
12 # You may use this file and others of this release according to the
13 # license defined in the LICENSE file, which includes the Affero General
14 # Public License, v3.0 ("AGPLv3") and some additional permissions and
15 # terms pursuant to its AGPLv3 Section 7.
17 # Bacula® is a registered trademark of Kern Sibbald.
23 if $bindir/mysql $* <<END-OF-DATA
25 DROP TABLE IF EXISTS Filename;
26 DROP TABLE IF EXISTS Path;
27 DROP TABLE IF EXISTS LongName;
28 DROP TABLE IF EXISTS Device;
29 DROP TABLE IF EXISTS Storage;
30 DROP TABLE IF EXISTS MediaType;
31 DROP TABLE IF EXISTS File;
32 DROP TABLE IF EXISTS Client;
33 DROP TABLE IF EXISTS Job;
34 DROP TABLE IF EXISTS JobHisto;
35 DROP TABLE IF EXISTS Media;
36 DROP TABLE IF EXISTS JobMedia;
37 DROP TABLE IF EXISTS Pool;
38 DROP TABLE IF EXISTS MultiVolume;
39 DROP TABLE IF EXISTS FileSave;
40 DROP TABLE IF EXISTS FileSet;
41 DROP TABLE IF EXISTS Version;
42 DROP TABLE IF EXISTS Counters;
43 DROP TABLE IF EXISTS BaseFiles;
44 DROP TABLE IF EXISTS UnsavedFiles;
45 DROP TABLE IF EXISTS CDImages;
46 DROP TABLE IF EXISTS Status;
47 DROP TABLE IF EXISTS MAC;
48 DROP TABLE IF EXISTS Log;
49 DROP TABLE IF EXISTS Location;
50 DROP TABLE IF EXISTS LocationLog;
51 DROP TABLE IF EXISTS PathVisibility;
52 DROP TABLE IF EXISTS PathHierarchy;
53 DROP TABLE IF EXISTS RestoreObject;
56 echo "Deletion of ${db_name} MySQL tables succeeded."
58 echo "Deletion of ${db_name} MySQL tables failed."