From: Eric Bollengier Date: Thu, 6 Oct 2022 07:58:31 +0000 (+0200) Subject: Convert MySQL TinyBlob to BLOB for some Object table members X-Git-Tag: Beta-15.0.0~418 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40eaec61d74a216f8c5be58d232b3022f54a81de;p=thirdparty%2Fbacula.git Convert MySQL TinyBlob to BLOB for some Object table members --- diff --git a/bacula/src/cats/make_mysql_tables.in b/bacula/src/cats/make_mysql_tables.in index f7ef85775..3c4f04e81 100644 --- a/bacula/src/cats/make_mysql_tables.in +++ b/bacula/src/cats/make_mysql_tables.in @@ -163,12 +163,12 @@ CREATE TABLE Object PluginName BLOB NOT NULL, FileIndex integer not null default 0, - ObjectCategory TINYBLOB NOT NULL, - ObjectType TINYBLOB NOT NULL, - ObjectName TINYBLOB NOT NULL, - ObjectSource TINYBLOB NOT NULL, - ObjectUUID TINYBLOB NOT NULL, - ObjectSize bigint NOT NULL, + ObjectCategory BLOB NOT NULL, + ObjectType BLOB NOT NULL, + ObjectName BLOB NOT NULL, + ObjectSource BLOB NOT NULL, + ObjectUUID BLOB NOT NULL, + ObjectSize bigint NOT NULL, ObjectStatus BINARY(1) NOT NULL DEFAULT 'U', ObjectCount INTEGER UNSIGNED NOT NULL DEFAULT 1, primary key (ObjectId) diff --git a/bacula/src/cats/update_mysql_tables.in b/bacula/src/cats/update_mysql_tables.in index 8482bc306..d422d7a54 100644 --- a/bacula/src/cats/update_mysql_tables.in +++ b/bacula/src/cats/update_mysql_tables.in @@ -710,7 +710,12 @@ ALTER TABLE Media MODIFY COLUMN UseWorm TINYINT DEFAULT 0; ALTER TABLE Object - ADD COLUMN FileIndex integer not null default 0; + ADD COLUMN FileIndex integer not null default 0, + MODIFY COLUMN ObjectSource BLOB, + MODIFY COLUMN ObjectName BLOB, + MODIFY COLUMN ObjectType BLOB; + MODIFY COLUMN ObjectCategory BLOB; + MODIFY COLUMN ObjectUUID BLOB; ALTER TABLE Job ADD COLUMN RealStartTime DATETIME, diff --git a/bacula/updatedb/update_mysql_tables_1025_to_1026.in b/bacula/updatedb/update_mysql_tables_1025_to_1026.in index f57efe61a..6ca606263 100644 --- a/bacula/updatedb/update_mysql_tables_1025_to_1026.in +++ b/bacula/updatedb/update_mysql_tables_1025_to_1026.in @@ -82,7 +82,12 @@ ALTER TABLE Media MODIFY COLUMN UseWorm TINYINT DEFAULT 0; ALTER TABLE Object - ADD COLUMN FileIndex integer not null default 0; + ADD COLUMN FileIndex integer not null default 0, + MODIFY COLUMN ObjectSource BLOB, + MODIFY COLUMN ObjectName BLOB, + MODIFY COLUMN ObjectType BLOB; + MODIFY COLUMN ObjectCategory BLOB; + MODIFY COLUMN ObjectUUID BLOB; ALTER TABLE Job ADD COLUMN RealStartTime DATETIME,