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

Stefan Evert stefanML at collocations.de
Sat Jun 8 13:08:45 CEST 2019


I ran into a problem with the database upgrade for 3.2.37, too:

> An SQL query did not run successfully!
> Original query:
> 
> alter table `system_messages` drop primary key
> 	/* from User: ??? | Function: upgrade_3_2_36() | 2019-Jun-08 13:03 */
> Error # 1091: Can't DROP 'PRIMARY'; check that column/key exists

The issue seems to be that the table has a key ("message_id") but no primary key. Notice that it's listed as "MUL":

> mysql> describe system_messages;
> +------------+--------------+------+-----+-------------------+-----------------------------+
> | Field      | Type         | Null | Key | Default           | Extra                       |
> +------------+--------------+------+-----+-------------------+-----------------------------+
> | message_id | varchar(150) | YES  | MUL | NULL              |                             |
> | timestamp  | timestamp    | NO   |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
> | header     | varchar(150) | YES  |     |                   |                             |
> | content    | text         | YES  |     | NULL              |                             |
> | fromto     | varchar(150) | YES  |     | NULL              |                             |
> +------------+--------------+------+-----+-------------------+——————————————+

Please advise.

Best,
Stefan




More information about the CWB mailing list