Bug 24807: Add database update script
[koha.git] / installer / data / mysql / atomicupdate / bug_24807-add-year-search-field-type.perl
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";
7 }