]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/make_mysql_tables.in
Use the command line utility dropdb instead of the psql command
[bacula/bacula] / bacula / src / cats / make_mysql_tables.in
index 2f49e348214f399a92b9ba5d48aaa2b0966b2803..991c894fba518bd1341e36215180ecefeb698682 100644 (file)
@@ -114,8 +114,10 @@ CREATE TABLE Media (
    MaxVolJobs INTEGER UNSIGNED NOT NULL DEFAULT 0,
    MaxVolFiles INTEGER UNSIGNED NOT NULL DEFAULT 0,
    MaxVolBytes BIGINT UNSIGNED NOT NULL DEFAULT 0,
-   Drive INTEGER NOT NULL DEFAULT 0,
    InChanger TINYINT NOT NULL DEFAULT 0,
+   MediaAddressing TINYINT NOT NULL DEFAULT 0,
+   VolReadTime BIGINT UNSIGNED NOT NULL DEFAULT 0,
+   VolWriteTime BIGINT UNSIGNED NOT NULL DEFAULT 0,
    PRIMARY KEY(MediaId),
    INDEX (PoolId)
    );
@@ -135,8 +137,11 @@ CREATE TABLE Pool (
    MaxVolBytes BIGINT UNSIGNED NOT NULL,
    AutoPrune TINYINT DEFAULT 0,
    Recycle TINYINT DEFAULT 0,
-   PoolType ENUM('Backup', 'Copy', 'Cloned', 'Archive', 'Migration') NOT NULL,
+   PoolType ENUM('Backup', 'Copy', 'Cloned', 'Archive', 'Migration', 'Scratch') NOT NULL,
    LabelFormat TINYBLOB,
+   Enabled TINYINT DEFAULT 1,
+   ScratchPoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool,
+   RecyclePoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool,
    UNIQUE (Name(128)),
    PRIMARY KEY (PoolId)
    );
@@ -155,6 +160,7 @@ CREATE TABLE Client (
 
 CREATE TABLE BaseFiles (
    BaseId INTEGER UNSIGNED AUTO_INCREMENT,
+   BaseJobId INTEGER UNSIGNED NOT NULL REFERENCES Job,
    JobId INTEGER UNSIGNED NOT NULL REFERENCES Job,
    FileId INTEGER UNSIGNED NOT NULL REFERENCES File,
    FileIndex INTEGER UNSIGNED,