]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Add Worm/UseWorm to MySQL and adapt SQLite
authorEric Bollengier <eric@baculasystems.com>
Mon, 3 Oct 2022 08:24:25 +0000 (10:24 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:59 +0000 (13:56 +0200)
bacula/src/cats/drop_mysql_tables.in
bacula/src/cats/make_sqlite3_tables.in

index 9b7c59f4bcfde9fc3976b59a090c1bb91fb5d19b..9d8b0aee5a4ce500cee2e5d191a88d0c0337d203 100644 (file)
@@ -10,6 +10,9 @@ db_name=@db_name@
 
 if $bindir/mysql $* <<END-OF-DATA
 USE ${db_name};
+drop TABLE IF EXISTS MalwareMD5;
+drop TABLE IF EXISTS MalwareSHA256;
+drop TABLE IF EXISTS FileEvents;
 DROP TABLE IF EXISTS MetaEmail;
 DROP TABLE IF EXISTS MetaAttachment;
 DROP TABLE IF EXISTS TagJob;
index f128456baf3be611c0c1ed248be8ff0f050784b7..381e48e4576d798d5c3badb952822dbfa7b74779 100644 (file)
@@ -277,6 +277,7 @@ CREATE TABLE JobHisto (
    StartTime DATETIME DEFAULT 0,
    EndTime DATETIME DEFAULT 0,
    RealEndTime DATETIME DEFAULT 0,
+   RealStartTime     DATETIME DEFAULT 0,
    JobTDate BIGINT UNSIGNED DEFAULT 0,
    VolSessionId INTEGER UNSIGNED DEFAULT 0,
    VolSessionTime INTEGER UNSIGNED DEFAULT 0,
@@ -294,7 +295,16 @@ CREATE TABLE JobHisto (
    HasCache TINYINT DEFAULT 0,
    Reviewed TINYINT DEFAULT 0,
    Comment TEXT,
-   FileTable TEXT DEFAULT 'File'
+   FileTable TEXT DEFAULT 'File',
+   isVirtualFull     TINYINT     default 0,   -- Result of a VirtualFull?
+   CompressRatio     float       default 0,   -- Compression Ratio
+   Rate              float       default 0,   -- Job Rate B/s
+   LastReadStorageId integer     default 0,   -- Id of the last Storage used to Read
+   LastReadDevice    text        default '',  -- Name of the last Read Device
+   WriteStorageId    integer     default 0,   -- Id of the Storage used to Write
+   WriteDevice       text        default '',  -- Name of the Write Device
+   StatusInfo        text        default '',  -- Info to determine the error status
+   Encrypted         int         default 0,   -- 0 no, 1 fd side, 2 sd side, 3 both
    );
 CREATE INDEX inx61 ON JobHisto (StartTime);
 
@@ -415,6 +425,8 @@ CREATE TABLE Media (
    ScratchPoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
    RecyclePoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
    Comment TEXT,
+   Worm TINYINT DEFAULT 0,
+   UseWorm TINYINT DEFAULT 0,
    PRIMARY KEY(MediaId)
    );