]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/make_postgresql_tables.in
Split messages line by line before sending it to syslog() fix #3325
[bacula/bacula] / bacula / src / cats / make_postgresql_tables.in
index 4fb674524740177b369e3820636bec6a6003ed3b..cb8d58dd6d5ec362ea4d8f9fe7be7dc5a22088b4 100644 (file)
@@ -6,7 +6,7 @@
 #   You won't get any support for performance issue if you changed the default
 #   schema.
 #
-bindir=@SQL_BINDIR@
+bindir=@POSTGRESQL_BINDIR@
 PATH="$bindir:$PATH"
 db_name=${db_name:-@db_name@}
 
@@ -53,6 +53,7 @@ CREATE TABLE File
     JobId            integer     not null,
     PathId           integer     not null,
     FilenameId       integer     not null,
+    DeltaSeq         smallint    not null  default 0,
     MarkId           integer     not null  default 0,
     LStat            text        not null,
     Md5              text        not null,
@@ -78,16 +79,16 @@ CREATE INDEX file_jobid_idx on File (JobId);
 CREATE TABLE RestoreObject (
    RestoreObjectId SERIAL NOT NULL,
    ObjectName TEXT NOT NULL,
-   RestoreObject TEXT NOT NULL,
+   RestoreObject BYTEA NOT NULL,
    PluginName TEXT NOT NULL,
    ObjectLength INTEGER DEFAULT 0,
    ObjectFullLength INTEGER DEFAULT 0,
    ObjectIndex INTEGER DEFAULT 0,
    ObjectType INTEGER DEFAULT 0,
-   FileIndex INTEGER UNSIGNED DEFAULT 0,
-   JobId INTEGER UNSIGNED,
+   FileIndex INTEGER DEFAULT 0,
+   JobId INTEGER,
    ObjectCompression INTEGER DEFAULT 0,
-   PRIMARY KEY(RestoreObjectId),
+   PRIMARY KEY(RestoreObjectId)
    );
 CREATE INDEX restore_jobid_idx on RestoreObject(JobId);
 
@@ -444,7 +445,7 @@ INSERT INTO Status (JobStatus,JobStatusLong,Severity) VALUES
 INSERT INTO Status (JobStatus,JobStatusLong,Severity) VALUES
    ('i', 'Doing batch insert file records',15);
 
-INSERT INTO Version (VersionId) VALUES (12);
+INSERT INTO Version (VersionId) VALUES (@BDB_VERSION@);
 
 -- Make sure we have appropriate permissions