diff --git a/installer/data/mysql/atomicupdate/bug_7201.pl b/installer/data/mysql/atomicupdate/bug_7201.pl index 5df49de4fb..5e030823a8 100755 --- a/installer/data/mysql/atomicupdate/bug_7201.pl +++ b/installer/data/mysql/atomicupdate/bug_7201.pl @@ -8,9 +8,10 @@ return { my ($dbh, $out) = @$args{qw(dbh out)}; if( !column_exists( 'statistics', 'categorycode' ) ) { - $dbh->do( - "ALTER TABLE statistics ADD COLUMN categorycode varchar(10) AFTER ccode" - ); + $dbh->do(q{ + ALTER TABLE statistics + ADD COLUMN categorycode varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from the borrowers table, links transaction to a specific borrower category' + }); } }, }; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 27760125e0..ce0c4eacc5 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4937,7 +4937,7 @@ CREATE TABLE `statistics` ( `location` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'authorized value for the shelving location for this item (MARC21 952$c)', `borrowernumber` int(11) DEFAULT NULL COMMENT 'foreign key from the borrowers table, links transaction to a specific borrower', `ccode` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from the items table, links transaction to a specific collection code', - `categorycode` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from the borrowers table, links transaction to a specific borrower category',, + `categorycode` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from the borrowers table, links transaction to a specific borrower category', KEY `timeidx` (`datetime`), KEY `branch_idx` (`branch`), KEY `type_idx` (`type`),