From: Eric Bollengier Date: Wed, 2 Dec 2020 14:47:17 +0000 (+0100) Subject: Fix update_mysql_tables for UNSIGNED Ids X-Git-Tag: Release-11.3.2~814 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec0764ef9ea53667bd1ffeba1a8f42a6e3d11866;p=thirdparty%2Fbacula.git Fix update_mysql_tables for UNSIGNED Ids --- diff --git a/bacula/src/cats/update_mysql_tables.in b/bacula/src/cats/update_mysql_tables.in index ef8915a5c..c3703c398 100644 --- a/bacula/src/cats/update_mysql_tables.in +++ b/bacula/src/cats/update_mysql_tables.in @@ -505,6 +505,13 @@ ALTER TABLE Object ADD ObjectCategory TINYBLOB NOT NULL; create index object_type_idx on Object (ObjectCategory(255)); INSERT INTO Events (EventsCode, EventsType, EventsTime, EventsDaemon, EventsSource, EventsRef, EventsText) VALUES ('DU0001', 'catalog_update', NOW(), '*SHELL*', 'update_bacula_tables', 'pid$$', 'Catalog schema was updated to 1023'); + +ALTER TABLE TagJob MODIFY JobId INTEGER UNSIGNED; +ALTER TABLE TagClient MODIFY ClientId INTEGER UNSIGNED; +ALTER TABLE TagObject MODIFY ObjectId INTEGER UNSIGNED; +ALTER TABLE Object MODIFY JobId INTEGER UNSIGNED; +ALTER TABLE Snapshot MODIFY ClientId INTEGER UNSIGNED DEFAULT 0; +ALTER TABLE TagMedia MODIFY MediaId INTEGER UNSIGNED; UPDATE Version SET VersionId=1023; END-OF-DATA then