-INSERT INTO Status (JobStatus,JobStatusLong) VALUES
- ('C', 'Created, not yet running'),
- ('R', 'Running'),
- ('B', 'Blocked'),
- ('T', 'Completed successfully'),
- ('E', 'Terminated with errors'),
- ('e', 'Non-fatal error'),
- ('f', 'Fatal error'),
- ('D', 'Verify found differences'),
- ('A', 'Canceled by user'),
- ('F', 'Waiting for Client'),
- ('S', 'Waiting for Storage daemon'),
- ('m', 'Waiting for new media'),
- ('M', 'Waiting for media mount'),
- ('s', 'Waiting for storage resource'),
- ('j', 'Waiting for job resource'),
- ('c', 'Waiting for client resource'),
- ('d', 'Waiting on maximum jobs'),
- ('t', 'Waiting on start time'),
- ('p', 'Waiting on higher priority jobs'),
- ('i', 'Doing batch insert file records'),
- ('a', 'SD despooling attributes');
+INSERT INTO Status (JobStatus,JobStatusLong,Severity) VALUES
+ ('C', 'Created, not yet running',15),
+ ('R', 'Running',15),
+ ('B', 'Blocked',15),
+ ('T', 'Completed successfully',10),
+ ('E', 'Terminated with errors',25),
+ ('e', 'Non-fatal error',20),
+ ('f', 'Fatal error',100),
+ ('D', 'Verify found differences',15),
+ ('A', 'Canceled by user',90),
+ ('F', 'Waiting for Client',15),
+ ('S', 'Waiting for Storage daemon',15),
+ ('m', 'Waiting for new media',15),
+ ('M', 'Waiting for media mount',15),
+ ('s', 'Waiting for storage resource',15),
+ ('j', 'Waiting for job resource',15),
+ ('c', 'Waiting for client resource',15),
+ ('d', 'Waiting on maximum jobs',15),
+ ('t', 'Waiting on start time',15),
+ ('p', 'Waiting on higher priority jobs',15),
+ ('i', 'Doing batch insert file records',15),
+ ('a', 'SD despooling attributes',15);
+
+CREATE TABLE PathHierarchy
+(
+ PathId integer NOT NULL,
+ PPathId integer NOT NULL,
+ CONSTRAINT pathhierarchy_pkey PRIMARY KEY (PathId)
+);
+
+CREATE INDEX pathhierarchy_ppathid
+ ON PathHierarchy (PPathId);
+
+CREATE TABLE PathVisibility
+(
+ PathId integer NOT NULL,
+ JobId integer NOT NULL,
+ Size int8 DEFAULT 0,
+ Files int4 DEFAULT 0,
+ CONSTRAINT pathvisibility_pkey PRIMARY KEY (JobId, PathId)
+);
+CREATE INDEX pathvisibility_jobid
+ ON PathVisibility (JobId);