]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix missing JobHisto fields in make_mysql_tables
authorEric Bollengier <eric@baculasystems.com>
Fri, 24 Mar 2023 06:50:39 +0000 (07:50 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:01 +0000 (13:57 +0200)
Manual workaround:

  ALTER TABLE JobHisto
      ADD COLUMN RealStartTime DATETIME,
      ADD COLUMN isVirtualFull     TINYINT    default 0,
      ADD COLUMN CompressRatio     float      default 0,
      ADD COLUMN Rate              float      default 0,
      ADD COLUMN LastReadStorageId Integer    default 0,
      ADD COLUMN LastReadDevice    blob,
      ADD COLUMN WriteStorageId    integer    default 0,
      ADD COLUMN WriteDevice       blob,
      ADD COLUMN Encrypted         int        default 0;

bacula/src/cats/make_mysql_tables.in

index b96c3f8d780ecae342d635342f264b0c69d8547c..9f20e74eaeea47888fb0dde7bc31a2d704f01980 100644 (file)
@@ -348,6 +348,7 @@ CREATE TABLE JobHisto (
    StartTime DATETIME,
    EndTime DATETIME,
    RealEndTime DATETIME,
+   RealStartTime DATETIME,                           -- Time of the job for Virtual Full
    JobTDate BIGINT UNSIGNED DEFAULT 0,
    VolSessionId INTEGER UNSIGNED DEFAULT 0,
    VolSessionTime INTEGER UNSIGNED DEFAULT 0,
@@ -366,6 +367,15 @@ CREATE TABLE JobHisto (
    Reviewed TINYINT DEFAULT 0,
    Comment BLOB,
    FileTable CHAR(20) 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    blob,                   -- Name of the last Read Device
+   WriteStorageId    integer    default 0,   -- Id of the Storage used to Write
+   WriteDevice       blob,                   -- Name of the Write Device
+   StatusInfo        blob,                   -- Info to determine the error status
+   Encrypted         int        default 0,   -- 0 n/a, 1 no, 2 fd side, 4 sd side, 6 both
    INDEX (JobId),
    INDEX (StartTime),
    INDEX (JobTDate)