[CWB] CQPweb: v 3.1.0 now usable, I think

Markus Killer markus.killer at uzh.ch
Tue Jan 21 09:12:03 CET 2014


(2) - I'm running the script on an exact copy of the working 3.0.16 database (imported sql dump)

If I apply the

> alter table saved_dbs drop primary key;
> alter table saved_dbs add key `dbname` (`dbname`);

I get this:

mki at ubuntu:/var/www/cqp-web-beta/bin$ sudo php upgrade-database.php
Database version is now at < 3.1.0. Database will now be upgraded to 3.1.0...
A mySQL query did not run successfully!

Original query:

alter table mysql_processes add primary key (`dbname`)



Error # 1068: Multiple primary key defined


----------------------------------------
> From: a.hardie at lancaster.ac.uk
> To: m.killer at outlook.com; cwb at sslmit.unibo.it
> Date: Tue, 21 Jan 2014 07:52:49 +0000
> Subject: Re: [CWB] CQPweb: v 3.1.0 now usable, I think
>
> (1) Ach, that's a bug introduced by the previous bug fix! Changed & fixed in 508.
>
> (2) This occurs, I think, because you are running the script on a half-upgraded database, so some of the changes it is trying to make have already been made.
>
> Run this SQL command manually:
>
> describe saved_dbs;
>
> and look at the key status of the column "dbname". If it says "PRI", then you need to revert the DB by running the following:
>
> alter table saved_dbs drop primary key;
> alter table saved_dbs add key `dbname` (`dbname`);
>
> If that's the only thing that was "halfway", it will fix the problem. If other things were half-and-half, you'll get stuck at a later point in the script next time you run it.
>
> One (slightly dangerous) way round that is to hack library.inc.php to comment out lines 222 and 223. Then, the script will trundle on even if one of the earlier commands does not run. That change would need to be reverted ASAP afterwards of course!
>
> Andrew. 		 	   		  


More information about the CWB mailing list