From: Kern Sibbald Date: Sat, 10 Apr 2010 20:51:49 +0000 (+0200) Subject: Add Ingres RestoreObject SQL changes X-Git-Tag: Release-7.0.0~1957 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1da997e71138fa90bec07b474e6c361ad0ac7862;p=bacula%2Fbacula Add Ingres RestoreObject SQL changes --- diff --git a/bacula/src/cats/drop_ingres_tables.in b/bacula/src/cats/drop_ingres_tables.in index 4a0bd512ea..da68087c7d 100755 --- a/bacula/src/cats/drop_ingres_tables.in +++ b/bacula/src/cats/drop_ingres_tables.in @@ -30,6 +30,7 @@ DROP TABLE unsavedfiles; DROP TABLE CDImages ; DROP TABLE PathHierarchy; DROP TABLE PathVisibility; +DROP TABLE RestoreObject; DROP TABLE version; DROP TABLE Status; DROP SEQUENCE filename_seq; @@ -49,6 +50,7 @@ DROP SEQUENCE client_seq; DROP SEQUENCE Log_seq; DROP SEQUENCE LocationLog_seq; DROP SEQUENCE basefiles_seq; +DROP SEQUENCE RestoreObject_seq; \g END-OF-DATA pstat=$? diff --git a/bacula/src/cats/make_ingres_tables.in b/bacula/src/cats/make_ingres_tables.in index e58caa05f7..a04baf8e51 100755 --- a/bacula/src/cats/make_ingres_tables.in +++ b/bacula/src/cats/make_ingres_tables.in @@ -66,36 +66,54 @@ CREATE INDEX file_jobid_idx on file(jobid); -- CREATE INDEX file_pathid_idx on file(pathid); -- CREATE INDEX file_filenameid_idx on file(filenameid); +-- +-- ***FIXME*** this needs to be corrected and turned on +--CREATE TABLE RestoreObject ( +-- RestoreObjectId INTEGER NOT NULL DEFAULT RestoreObject_seq.nextval, +-- Fname TEXT NOT NULL, +-- Path TEXT NOT NULL, +-- RestoreObject TEXT NOT NULL, +-- PluginName TEXT NOT NULL, +-- ObjectIndex INTEGER DEFAULT 0, +-- ObjectType INTEGER DEFAULT 0, +-- FileIndex INTEGER UNSIGNED DEFAULT 0, +-- JobId INTEGER UNSIGNED, +-- PRIMARY KEY(RestoreObjectId), +-- ); +--CREATE INDEX restore_jobid_idx on file(JobId); +-- + + CREATE SEQUENCE Job_seq; CREATE TABLE Job ( - JobId integer not null default Job_seq.nextval, - Job varchar(256) not null, - Name varchar(256) not null, - Type char(1) not null, - Level char(1) not null, - ClientId integer default 0, - JobStatus char(1) not null, - SchedTime timestamp without time zone, - StartTime timestamp without time zone, - EndTime timestamp without time zone, + JobId integer not null default Job_seq.nextval, + Job varchar(256) not null, + Name varchar(256) not null, + Type char(1) not null, + Level char(1) not null, + ClientId integer default 0, + JobStatus char(1) not null, + SchedTime timestamp without time zone, + StartTime timestamp without time zone, + EndTime timestamp without time zone, RealEndTime timestamp without time zone, - JobTDate bigint default 0, - VolSessionId integer default 0, - volSessionTime integer default 0, - JobFiles integer default 0, - JobBytes bigint default 0, - ReadBytes bigint default 0, - JobErrors integer default 0, - JobMissingFiles integer default 0, - PoolId integer default 0, - FilesetId integer default 0, - PriorJobid integer default 0, - PurgedFiles smallint default 0, - HasBase smallint default 0, - HasCache smallint default 0, - Reviewed smallint default 0, - Comment varchar(256), + JobTDate bigint default 0, + VolSessionId integer default 0, + volSessionTime integer default 0, + JobFiles integer default 0, + JobBytes bigint default 0, + ReadBytes bigint default 0, + JobErrors integer default 0, + JobMissingFiles integer default 0, + PoolId integer default 0, + FilesetId integer default 0, + PriorJobid integer default 0, + PurgedFiles smallint default 0, + HasBase smallint default 0, + HasCache smallint default 0, + Reviewed smallint default 0, + Comment varchar(256), primary key (jobid) ); @@ -105,33 +123,33 @@ CREATE INDEX job_name_idx on job (name); CREATE SEQUENCE JobHisto_seq; CREATE TABLE JobHisto ( - JobId integer not null default JobHisto_seq.nextval, - Job varchar(256) not null, - Name varchar(256) not null, - Type char(1) not null, - Level char(1) not null, - ClientId integer default 0, - JobStatus char(1) not null, - SchedTime timestamp without time zone, - StartTime timestamp without time zone, - EndTime timestamp without time zone, + JobId integer not null default JobHisto_seq.nextval, + Job varchar(256) not null, + Name varchar(256) not null, + Type char(1) not null, + Level char(1) not null, + ClientId integer default 0, + JobStatus char(1) not null, + SchedTime timestamp without time zone, + StartTime timestamp without time zone, + EndTime timestamp without time zone, RealEndTime timestamp without time zone, - JobTDate bigint default 0, - VolSessionId integer default 0, - volSessionTime integer default 0, - JobFiles integer default 0, - JobBytes bigint default 0, - ReadBytes bigint default 0, - JobErrors integer default 0, - JobMissingFiles integer default 0, - PoolId integer default 0, - FilesetId integer default 0, - PriorJobid integer default 0, - PurgedFiles smallint default 0, - HasBase smallint default 0, - HasCache smallint default 0, - Reviewed smallint default 0, - Comment varchar(256), + JobTDate bigint default 0, + VolSessionId integer default 0, + volSessionTime integer default 0, + JobFiles integer default 0, + JobBytes bigint default 0, + ReadBytes bigint default 0, + JobErrors integer default 0, + JobMissingFiles integer default 0, + PoolId integer default 0, + FilesetId integer default 0, + PriorJobid integer default 0, + PurgedFiles smallint default 0, + HasBase smallint default 0, + HasCache smallint default 0, + Reviewed smallint default 0, + Comment varchar(256), primary key (jobid) ); @@ -205,7 +223,7 @@ CREATE TABLE media 'Error','Busy','Used','Cleaning','Scratch')), enabled smallint default 1, recycle smallint default 0, - ActionOnPurge smallint default 0, + ActionOnPurge smallint default 0, volretention bigint default 0, voluseduration bigint default 0, maxvoljobs integer default 0, @@ -283,7 +301,7 @@ CREATE TABLE pool maxvolbytes bigint default 0, autoprune smallint default 0, recycle smallint default 0, - ActionOnPurge smallint default 0, + ActionOnPurge smallint default 0, pooltype varchar(256) check (pooltype in ('Backup','Copy','Cloned','Archive','Migration','Scratch')), labeltype integer default 0, @@ -388,7 +406,7 @@ CREATE TABLE PathHierarchy ); CREATE INDEX pathhierarchy_ppathid - ON PathHierarchy (PPathId); + ON PathHierarchy (PPathId); CREATE TABLE PathVisibility ( @@ -399,7 +417,7 @@ CREATE TABLE PathVisibility CONSTRAINT pathvisibility_pkey PRIMARY KEY (JobId, PathId) ); CREATE INDEX pathvisibility_jobid - ON PathVisibility (JobId); + ON PathVisibility (JobId); CREATE TABLE version (