@@ -, +, @@ --- installer/data/mysql/atomicupdate/bug31503.pl | 16 ++++++++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug31503.pl --- a/installer/data/mysql/atomicupdate/bug31503.pl +++ a/installer/data/mysql/atomicupdate/bug31503.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => 31503, + description => "Change patron_consent.type", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ALTER TABLE `patron_consent` MODIFY `type` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'consent type, could be custom type'} + ); + + say $out "Changed column 'patron_consent.type'"; + }, +}; --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -4636,7 +4636,7 @@ DROP TABLE IF EXISTS `patron_consent`; CREATE TABLE `patron_consent` ( `id` int(11) NOT NULL AUTO_INCREMENT, `borrowernumber` int(11) NOT NULL, - `type` enum('GDPR_PROCESSING') DEFAULT NULL COMMENT 'allows for future extension', + `type` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'consent type, could be custom type', `given_on` datetime DEFAULT NULL, `refused_on` datetime DEFAULT NULL, PRIMARY KEY (`id`), --