From: Eric Bollengier Date: Mon, 11 Jan 2010 18:46:54 +0000 (+0100) Subject: Add Job.Reviewed field X-Git-Tag: Release-7.0.0~2394 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ac2f2b4330c458ff97d96c6c6a8602f0ad8dcaa7;p=bacula%2Fbacula Add Job.Reviewed field --- diff --git a/bacula/src/cats/make_mysql_tables.in b/bacula/src/cats/make_mysql_tables.in index 6e0747e2b6..37a10d235b 100644 --- a/bacula/src/cats/make_mysql_tables.in +++ b/bacula/src/cats/make_mysql_tables.in @@ -116,6 +116,7 @@ CREATE TABLE Job ( PurgedFiles TINYINT DEFAULT 0, HasBase TINYINT DEFAULT 0, HasCache TINYINT DEFAULT 0, + Reviewed TINYINT DEFAULT 0, Comment BLOB, PRIMARY KEY(JobId), INDEX (Name(128)) @@ -148,6 +149,7 @@ CREATE TABLE JobHisto ( PurgedFiles TINYINT DEFAULT 0, HasBase TINYINT DEFAULT 0, HasCache TINYINT DEFAULT 0, + Reviewed TINYINT DEFAULT 0, Comment BLOB, INDEX (StartTime) ); diff --git a/bacula/src/cats/make_postgresql_tables.in b/bacula/src/cats/make_postgresql_tables.in index 45a81847c8..a713c06a4d 100644 --- a/bacula/src/cats/make_postgresql_tables.in +++ b/bacula/src/cats/make_postgresql_tables.in @@ -87,6 +87,7 @@ CREATE TABLE Job PurgedFiles smallint default 0, HasBase smallint default 0, HasCache smallint default 0, + Reviewed smallint default 0, Comment text, primary key (jobid) ); diff --git a/bacula/src/cats/make_sqlite3_tables.in b/bacula/src/cats/make_sqlite3_tables.in index f2c9afd4e2..48e1c3c761 100644 --- a/bacula/src/cats/make_sqlite3_tables.in +++ b/bacula/src/cats/make_sqlite3_tables.in @@ -75,6 +75,7 @@ CREATE TABLE Job ( PurgedFiles TINYINT DEFAULT 0, HasBase TINYINT DEFAULT 0, HasCache TINYINT DEFAULT 0, + Reviewed TINYINT DEFAULT 0, Comment TEXT, PRIMARY KEY(JobId) ); diff --git a/bacula/src/cats/sql_cmds.c b/bacula/src/cats/sql_cmds.c index e3bb580fe0..85ab546a1e 100644 --- a/bacula/src/cats/sql_cmds.c +++ b/bacula/src/cats/sql_cmds.c @@ -57,13 +57,13 @@ const char *fill_jobhisto = "SchedTime, StartTime, EndTime, RealEndTime, JobTDate, " "VolSessionId, VolSessionTime, JobFiles, JobBytes, ReadBytes, " "JobErrors, JobMissingFiles, PoolId, FileSetId, PriorJobId, " - "PurgedFiles, HasBase, Comment ) " + "PurgedFiles, HasBase, Reviewed, Comment ) " "SELECT " "JobId, Job, Name, Type, Level, ClientId, JobStatus, " "SchedTime, StartTime, EndTime, RealEndTime, JobTDate, " "VolSessionId, VolSessionTime, JobFiles, JobBytes, ReadBytes, " "JobErrors, JobMissingFiles, PoolId, FileSetId, PriorJobId, " - "PurgedFiles, HasBase, Comment " + "PurgedFiles, HasBase, Reviewed, Comment " "FROM Job " "WHERE JobStatus IN ('T','W','f','A','E') " "AND JobId NOT IN (SELECT JobId FROM JobHisto) " diff --git a/bacula/src/cats/update_mysql_tables.in b/bacula/src/cats/update_mysql_tables.in index 6a13cb2cac..2f8534798d 100644 --- a/bacula/src/cats/update_mysql_tables.in +++ b/bacula/src/cats/update_mysql_tables.in @@ -18,9 +18,11 @@ USE ${db_name}; ALTER TABLE JobMedia DROP Stripe ; ALTER TABLE JobMedia DROP Copy ; ALTER TABLE Job ADD COLUMN HasCache tinyint default 0 after HasBase; -ALTER TABLE Job ADD Comment BLOB AFTER HasCache; +ALTER TABLE Job ADD COLUMN Reviewed tinyint default 0 after HasCache; +ALTER TABLE Job ADD COLUMN Comment BLOB AFTER Reviewed; ALTER TABLE JobHisto ADD COLUMN HasCache tinyint default 0 after HasBase; -ALTER TABLE JobHisto ADD Comment BLOB AFTER HasCache; +ALTER TABLE JobHisto ADD COLUMN Reviewed tinyint default 0 after HasCache; +ALTER TABLE JobHisto ADD COLUMN Comment BLOB AFTER Reviewed; ALTER TABLE Status ADD COLUMN Severity int; UPDATE Status SET Severity = 15; diff --git a/bacula/src/cats/update_postgresql_tables.in b/bacula/src/cats/update_postgresql_tables.in index 67f21b32f6..fbffa8314e 100644 --- a/bacula/src/cats/update_postgresql_tables.in +++ b/bacula/src/cats/update_postgresql_tables.in @@ -16,9 +16,11 @@ if psql -f - -d ${db_name} $* <