@@ -, +, @@ --- installer/data/mysql/atomicupdate/bug_22521.perl | 16 ++++++++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_22521.perl --- a/installer/data/mysql/atomicupdate/bug_22521.perl +++ a/installer/data/mysql/atomicupdate/bug_22521.perl @@ -0,0 +1,16 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if ( CheckVersion($DBversion) ) { + + if ( column_exists( 'accountlines', 'accounttype' ) ) { + $dbh->do( + qq{ + ALTER TABLE `accountlines` + CHANGE COLUMN `accounttype` + `accounttype` varchar(16) DEFAULT NULL; + } + ); + } + + SetVersion($DBversion); + print "Upgrade to $DBversion done (Bug 22521 - Update accountlines.accounttype to varchar(16))\n"; +} --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -2678,7 +2678,7 @@ CREATE TABLE `accountlines` ( `date` date default NULL, `amount` decimal(28,6) default NULL, `description` LONGTEXT, - `accounttype` varchar(5) default NULL, + `accounttype` varchar(16) default NULL, `status` varchar(16) default NULL, `payment_type` varchar(80) default NULL, -- optional authorised value PAYMENT_TYPE `amountoutstanding` decimal(28,6) default NULL, --