[CWB] Error updating cqpweb

Jörg Knappen j.knappen at mx.uni-saarland.de
Fri Jan 10 16:59:43 CET 2020


Hallo Andrew, 

this is rather strange. I examined my production instance of cqpweb
3.20.31 and when my files are consistent (what I sincerely hope! at
least, it worked for a full year for us) than the following is the case:


Upgrading the database from an older installation (as we did for the
production instance) does not add the column sttr_1kw to the table
corpus_info (verfied from looking at the database AND looking at the
upgrade-database.php from that version) 

BUT 

Building the database from scratch (as I did in my test instance)
already has the column sttr_1kw to the table corpus_info (verified from
looking at the database AND looking into sql-definitions.inc.php at that
version). 

All other changes in the database are not affected by this difference. 

Deleting the line causing the error resulted in a smooth upgrade on my
test instance. 

Greetings from Saarbrücken, 

Jörg Knappen 

Am 2020-01-09 21:42, schrieb Hardie, Andrew:

>> 

> This error message indicates that you were already upgraded past the 3.2.31 point (partly or wholly). You can check this by looking at the commands inn upgrade-database.php lines 750 to 796, comparing them to your existing sql database, and seeing how many of them have already taken effect. 
> 
> If you delete the lines for database changes that have already happened, the rest of script should run correctly. 
> 
> BTW upgrade-database shouldn't normally require sudo. 
> 
> best 
> 
> Andrew 
> 
> From: Jörg Knappen <j.knappen at mx.uni-saarland.de> 
> Sent: 09 January 2020 20:26
> To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
> Cc: Hardie, Andrew <a.hardie at lancaster.ac.uk>
> Subject: Re: [CWB] Error updating cqpweb 
> 
> OK, that was too risky. I restored the old version of cqpweb on my test server and tried an update within the 3.2-latest branch, leading to the following error: 
> 
> sudo php upgrade-database.php
> Current DB version is 3.2.31 ; target version is 3.2.40 . About to upgrade.... 
> 
> An SQL query did not run successfully!
> Original query: 
> 
> alter table `corpus_info` add column `sttr_1kw` float DEFAULT 0.0 after `size_bytes_freq` 
> /* from User: ??? | Function: upgrade_3_2_31() | 2020-Jan-09 21:21 */
> Error # 1060: Duplicate column name 'sttr_1kw' 
> 
> Greetings from Saarbrücken, 
> 
> Jörg Knappen 
> 
> Am 2020-01-07 22:00, schrieb Hardie, Andrew: 
> 
> 1406 was a commit to the trunk. The trunk is still thoroughly broken until v3.3.0 is finished! The 3.2 branch works. 
> 
> Andrew.
> 
> -------------------------
> 
> From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> on behalf of Jörg Knappen <j.knappen at mx.uni-saarland.de>
> Sent: Tuesday, 7 January 2020, 5:03 pm
> To: cwb at sslmit.unibo.it
> Subject: [CWB] Error updating cqpweb

> I tried to update our cqpweb installation to the most recent developer
> version (revision 1406) and got the following error:
> 
> sudo php bin/upgrade-database.php
> PHP Parse error:  syntax error, unexpected ']', expecting '-' or
> identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)
> in /data2/htdocs/cqpweb/bin/upgrade-database.php on line 321
> 
> Trying to run it without database upgrade produced a similar runtime
> error from a different code location:
> 
> [Tue Jan 07 17:47:08.603359 2020] [php7:emerg] [pid 2503] [client
> xxx.yyy.zzz.aaa:49958] PHP Parse error:  syntax error, unexpected ''
> (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or
> variable (T_VARIABLE) or number (T_NUM_STRING) in
> /data2/htdocs/cqpweb/lib/sql-lib.php on line 2128
> 
> --Jörg Knappen
> 
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&amp;data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7C31f839722e0d424c711508d793938773%7C9c9bcd11977a4e9ca9a0bc734090164a%7C1%7C1%7C637140134170197160&amp;sdata=LHgMxQmA3xxLLPI0OUMik1mys8zcPZr646YFbflo8xE%3D&amp;reserved=0 [1] 
> 
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://liste.sslmit.unibo.it/mailman/listinfo/cwb [1]

_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://liste.sslmit.unibo.it/mailman/listinfo/cwb 

 

Links:
------
[1]
https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&amp;data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7Cfcb9b9b702f746ff143a08d795421ac3%7C9c9bcd11977a4e9ca9a0bc734090164a%7C1%7C0%7C637141983466164254&amp;sdata=c5Ls5M6iPgEhEpvngfyaNwttmAi39VMWejT8QJRNNhk%3D&amp;reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20200110/40491109/attachment.html>


More information about the CWB mailing list