1 $DBversion = 'XXX'; # will be replaced by the RM
2 if( CheckVersion( $DBversion ) ) {
3 $dbh->do( "ALTER TABLE `search_field` MODIFY COLUMN `type` enum('','string','date','number','boolean','sum','isbn','stdno','year') NOT NULL" );
4 $dbh->do( "UPDATE `search_field` SET type = 'year' WHERE name = 'date-of-publication'" );
5 SetVersion( $DBversion );
6 print "Upgrade to $DBversion done (Bug 14957 - Add 'year' type to improve sorting behaviour)\n";