[Koha] painful upgrade from 2.25 to 3.0.1: incomplete tables

ghenry ghenry at cmi.univ-mrs.fr
Fri Mar 20 02:03:16 NZDT 2009


Frederic Demians wrote:
> 
>> the reason is that the zebraqueue table isn't as expected:
>> CREATE TABLE `zebraqueue` (
>> `id` int(11) NOT NULL auto_increment,
>> `biblio_auth_number` int(11) NOT NULL default '0',
>> `operation` char(20) NOT NULL default '',
>> `server` char(20) NOT NULL default '',
>> `done` int(11) NOT NULL default '0',
>> `time` timestamp NOT NULL default CURRENT_TIMESTAMP,
>> PRIMARY KEY (`id`),
>> KEY `zebraqueue_lookup` (`server`, `biblio_auth_number`, `operation`,
>> `done`)
>> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>>
>>
>> but my actual table looks like:
>> CREATE TABLE `zebraqueue` (
>> `id` int(11) NOT NULL AUTO_INCREMENT,
>> `biblio_auth_number` int(11) NOT NULL DEFAULT '0',
>> `operation` char(20) NOT NULL DEFAULT '',
>> `server` char(20) NOT NULL DEFAULT '',
>> PRIMARY KEY (`id`)
>> ) ENGINE=InnoDB AUTO_INCREMENT=9555 DEFAULT CHARSET=utf8;
> 
> In kohastructure.sql, you get:
> 
> CREATE TABLE `zebraqueue` (
>  `id` int(11) NOT NULL auto_increment,
>  `biblio_auth_number` int(11) NOT NULL default '0',
>  `operation` char(20) NOT NULL default '',
>  `server` char(20) NOT NULL default '',
>  `done` int(11) NOT NULL default '0',
>  `time` timestamp NOT NULL default CURRENT_TIMESTAMP,
>  PRIMARY KEY  (`id`),
>  KEY `zebraqueue_lookup` (`server`, `biblio_auth_number`, `operation`, 
> `done`)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
> 
> 
> In update22to30.pl, you get:
> 
> zebraqueue    => "(
>                    `id` int NOT NULL auto_increment,
>                    `biblio_auth_number` int(11) NOT NULL default '0',
>                    `operation` char(20) NOT NULL default '',
>                    `server` char(20) NOT NULL default '',
>                    PRIMARY KEY  (`id`)
>                ) ENGINE=InnoDB DEFAULT CHARSET=utf8 
> COLLATE=utf8_general_ci AUTO_INCREMENT=1",
>      );
> IMHO, update22to30.pl should be updated itself.
> 

but done and time are still missing here!?

> But updatedatabase.pl does also tables upgrades depending on 
> kohaversion.pl Koha version. So after an upgrade from 2 to 3 version. 
> updatedatabase.pl will update required tables. For example zebraqueue:
> 
> ALTER TABLE `zebraqueue`
>                    ADD `done` INT NOT NULL DEFAULT '0',
>                    ADD `time` TIMESTAMP NOT NULL DEFAULT 
> CURRENT_TIMESTAMP ;
> 
> 
do you suggest that i have to execute this script (updatedatabase.pl) 
after running update22to30.pl ? or instead of?
what's the correct way?

thanks for your reply,

gerard




More information about the Koha mailing list