[CWB] [CQPweb r1236] SQL error when updating DB

Hardie, Andrew a.hardie at lancaster.ac.uk
Mon Jun 10 06:40:41 CEST 2019


Sorry, I wrote this without the code in front of me.

You basically want to delete the SQL statemetns that have run successfully before re-runnign the upgrade script.

So, that’s everything from

/* before implementing qmode as an SQL enum type, check that all existing values are valid. */

to

/* now, on to this version's more generic changes. */

Then KEEP

                    $sql = array(


but delete all lines after that up to and including alter table `query_history` drop key `corpus`

best

Andrew.



From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of Scott Sadowsky
Sent: 07 June 2019 18:17
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
Subject: Re: [CWB] [CQPweb r1236] SQL error when updating DB

Deleting that code gives me various syntax errors, likely because after deletion a section now begins out of nowhere with 'alter table `query_history` drop key `user`'.

Should the deletions not continue past ‘alter table `query_history` drop key `corpus`’?,

Best,
Scott



On Fri, Jun 7, 2019 at 7:01 AM Hardie, Andrew <a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>> wrote:
Delete the line

‘alter table `query_history` drop key `corpus`’,

and everything before it right back to the bit that asks “Do you wish to continue running the uipgrade now?”

from upgrade-database.php

Then run again.

This happened because your original DB setup was between 3.2.36 and 3.2.37

best

Andrew.

From: cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> <cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it>> On Behalf Of Scott Sadowsky
Sent: 07 June 2019 11:36
To: Open source development of the Corpus WorkBench <CWB at liste.sslmit.unibo.it<mailto:CWB at liste.sslmit.unibo.it>>
Subject: [CWB] [CQPweb r1236] SQL error when updating DB

Sorry for the flood of messages, folks! When I update to r1236 and try to update the DB, I get the following error:

Current DB version is 3.2.36 ; target version is 3.2.37 .  About to upgrade....
===========================================================================
Please note, some of the operations in this upgrade are time-consuming
(especially if your installation has a long history).
It is recommended that you run this upgrade in a quiet period, and
(ideally) with CQPweb in "switched-off" mode if it is accessible to
users other than you.
===========================================================================
Do you wish to continue running the uipgrade now?
Enter [Y]es or [N]:y
An SQL query did not run successfully!
Original query:
alter table `query_history` drop key `corpus`
/* from User: ??? | Function: upgrade_3_2_36() | 2019-Jun-07 07:35 */
Error # 1091: Can't DROP 'corpus'; check that column/key exists


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20190610/234d26f2/attachment-0001.html>


More information about the CWB mailing list