);
ALTER TABLE filename ALTER COLUMN name SET STATISTICS 1000;
-CREATE INDEX filename_name_idx on filename (name);
+CREATE UNIQUE INDEX filename_name_idx on filename (name);
CREATE TABLE path
(
);
ALTER TABLE path ALTER COLUMN path SET STATISTICS 1000;
-CREATE INDEX path_name_idx on path (path);
+CREATE UNIQUE INDEX path_name_idx on path (path);
CREATE TABLE file
(
- fileid serial not null,
+ fileid bigserial not null,
fileindex integer not null default 0,
jobid integer not null,
pathid integer not null,
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,
CREATE INDEX job_name_idx on job (name);
-- Create a table like Job for long term statistics
-CREATE TABLE JobHistory (LIKE Job);
+CREATE TABLE JobHisto (LIKE Job);
+CREATE INDEX jobhisto_idx ON jobhisto ( starttime );
+
CREATE TABLE Location (
LocationId serial not null,
'Error','Busy','Used','Cleaning','Scratch')),
enabled smallint default 1,
recycle smallint default 0,
+ ActionOnPurge smallint default 0,
volretention bigint default 0,
voluseduration bigint default 0,
maxvoljobs integer default 0,
maxvolbytes bigint default 0,
autoprune smallint default 0,
recycle smallint default 0,
+ ActionOnPurge smallint default 0,
pooltype text
check (pooltype in ('Backup','Copy','Cloned','Archive','Migration','Scratch')),
labeltype integer default 0,
(
baseid serial not null,
jobid integer not null,
- fileid integer not null,
+ fileid bigint not null,
fileindex integer ,
basejobid integer ,
primary key (baseid)
INSERT INTO Status (JobStatus,JobStatusLong) VALUES
('i', 'Doing batch insert file records');
-INSERT INTO Version (VersionId) VALUES (10);
+INSERT INTO Version (VersionId) VALUES (11);
-- Make sure we have appropriate permissions