# shell script to create Bacula MySQL tables
#
bindir=@SQL_BINDIR@
+db_name=@db_name@
if $bindir/mysql $* -f <<END-OF-DATA
-USE bacula;
+USE ${db_name};
--
-- Note, we use BLOB rather than TEXT because in MySQL,
-- BLOBs are identical to TEXT except that BLOB is case
INDEX (Name(128))
);
+-- Create a table like Job for long term statistics
+CREATE TABLE JobStat (LIKE Job);
CREATE TABLE Location (
LocationId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
('c', 'Waiting for client resource'),
('d', 'Waiting on maximum jobs'),
('t', 'Waiting on start time'),
- ('p', 'Waiting on higher priority jobs');
+ ('p', 'Waiting on higher priority jobs'),
+ ('i', 'Doing batch insert file records'),
+ ('a', 'SD despooling attributes');
CREATE TABLE Version (
VersionId INTEGER UNSIGNED NOT NULL