]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/make_sqlite_tables.in
Use the command line utility dropdb instead of the psql command
[bacula/bacula] / bacula / src / cats / make_sqlite_tables.in
index 2275f4659c8ed2ad0d37971c98d66c4b0a239c32..93279ef901d72e94d1e9696a4da09a941512c61d 100644 (file)
@@ -115,6 +115,10 @@ CREATE TABLE Media (
    MaxVolJobs INTEGER UNSIGNED DEFAULT 0,
    MaxVolFiles INTEGER UNSIGNED DEFAULT 0,
    MaxVolBytes BIGINT UNSIGNED DEFAULT 0,
+   InChanger TINYINT DEFAULT 0,
+   MediaAddressing TINYINT DEFAULT 0,
+   VolReadTime BIGINT UNSIGNED DEFAULT 0,
+   VolWriteTime BIGINT UNSIGNED DEFAULT 0,
    PRIMARY KEY(MediaId)
    );
 
@@ -137,6 +141,9 @@ CREATE TABLE Pool (
    Recycle TINYINT DEFAULT 0,
    PoolType VARCHAR(20) NOT NULL,
    LabelFormat VARCHAR(128) NOT NULL,
+   Enabled TINYINT DEFAULT 1,
+   ScratchPoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
+   RecyclePoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
    UNIQUE (Name),
    PRIMARY KEY (PoolId)
    );
@@ -155,6 +162,7 @@ CREATE TABLE Client (
 
 CREATE TABLE BaseFiles (
    BaseId INTEGER UNSIGNED AUTOINCREMENT,
+   BaseJobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
    JobId INTEGER UNSIGNED REFERENCES Job NOT NULL,
    FileId INTEGER UNSIGNED REFERENCES File NOT NULL,
    FileIndex INTEGER UNSIGNED,
@@ -184,11 +192,10 @@ CREATE TABLE Version (
    );
 
 -- Initialize Version           
-INSERT INTO Version (VersionId) VALUES (6);
+INSERT INTO Version (VersionId) VALUES (7);
 
 CREATE TABLE Counters (
    Counter TEXT NOT NULL,     
-   PoolId INTEGER UNSIGNED REFERENCES Pool DEFAULT 0,
    MinValue INTEGER DEFAULT 0, 
    MaxValue INTEGER DEFAULT 0,
    CurrentValue INTEGER DEFAULT 0,