1BEGIN;
2
3--
4-- We drop and recreate the stats table which was not used yet.
5--
6DROP TABLE DeviceStats;
7CREATE TABLE DeviceStats (
8   DeviceId INTEGER UNSIGNED REFERENCES Device DEFAULT 0,
9   SampleTime DATETIME NOT NULL,
10   ReadTime BIGINT UNSIGNED DEFAULT 0,
11   WriteTime BIGINT UNSIGNED DEFAULT 0,
12   ReadBytes BIGINT UNSIGNED DEFAULT 0,
13   WriteBytes BIGINT UNSIGNED DEFAULT 0,
14   SpoolSize BIGINT UNSIGNED DEFAULT 0,
15   NumWaiting INTEGER DEFAULT 0,
16   NumWriters INTEGER DEFAULT 0,
17   MediaId INTEGER UNSIGNED REFERENCES Media DEFAULT 0,
18   VolCatBytes BIGINT UNSIGNED DEFAULT 0,
19   VolCatFiles BIGINT UNSIGNED DEFAULT 0,
20   VolCatBlocks BIGINT UNSIGNED DEFAULT 0
21);
22
23--
24-- We drop and recreate the stats table which was not used yet.
25--
26DROP TABLE JobStats;
27CREATE TABLE JobStats (
28   DeviceId INTEGER UNSIGNED REFERENCES Device DEFAULT 0,
29   SampleTime DATETIME NOT NULL,
30   JobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
31   JobFiles INTEGER UNSIGNED DEFAULT 0,
32   JobBytes BIGINT UNSIGNED DEFAULT 0
33);
34
35CREATE TABLE TapeAlerts (
36   DeviceId INTEGER UNSIGNED REFERENCES Device DEFAULT 0,
37   SampleTime DATETIME NOT NULL,
38   AlertFlags BIGINT UNSIGNED DEFAULT 0
39);
40
41DROP TABLE CDImages;
42
43UPDATE Version SET VersionId = 2003;
44COMMIT;
45