]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix org#2588 About incorrect Object/ObjectId type in update_postgresql_tables
authorEric Bollengier <eric@baculasystems.com>
Wed, 6 Jan 2021 14:29:40 +0000 (15:29 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:58 +0000 (09:02 +0100)
The Object/ObjectId field has the type serial when the schema is upgraded with
update_postgresql_tables while it has the type bigserial when the DB is created
with make_postgresql_tables.

To fix manually the problem, it is possible to exectute the following SQL command:

ALTER TABLE Object ALTER ObjectId TYPE BIGINT;

bacula/src/cats/update_postgresql_tables.in

index 73aede30621d7172bc7d9741cba2137ec20b5ef9..7d61000fa11012101a7afc0b358556de6f014894 100644 (file)
@@ -516,7 +516,7 @@ CREATE TABLE TagObject
 
 CREATE TABLE Object
 (
-   ObjectId     serial   not null,
+   ObjectId     bigserial   not null,
 
    JobId        integer  not null,
    Path         text     not null,