]> 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 18335d9c687101592d35f098d45fe628d1b61444..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@}
 
@@ -36,7 +36,7 @@ CREATE UNIQUE INDEX path_name_idx on Path (Path);
 -- In general, these will cause very significant performance
 -- problems in other areas.  A better approch is to carefully check
 -- that all your memory configuation parameters are
--- suitable for the size of your installation.  If you backup
+-- suitable for the size of your installation. If you backup
 -- millions of files, you need to adapt the database memory
 -- configuration parameters concerning sorting, joining and global
 -- memory.  By default, sort and join parameters are very small
@@ -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,15 +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);
 
@@ -443,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