@@ -, +, @@ --- .../data/mysql/atomicupdate/bug_28813.perl | 17 +++++++++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_28813.perl --- a/installer/data/mysql/atomicupdate/bug_28813.perl +++ a/installer/data/mysql/atomicupdate/bug_28813.perl @@ -0,0 +1,17 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + if ( column_exists('message_queue', 'delivery_note') ) { + $dbh->do(q{ + ALTER TABLE message_queue CHANGE COLUMN delivery_note failure_code MEDIUMTEXT; + }); + } + + if( !column_exists( 'message_queue', 'failure_code' ) ) { + $dbh->do(q{ + ALTER TABLE message_queue ADD failure_code mediumtext AFTER content_type + }); + } + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 28813, "Update delivery_note to failure_code in message_queue"); +} --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -3619,7 +3619,7 @@ CREATE TABLE `message_queue` ( `from_address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, `reply_address` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, `content_type` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `delivery_note` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `failure_code` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`message_id`), KEY `borrowernumber` (`borrowernumber`), KEY `message_transport_type` (`message_transport_type`), --