I get the following error when preforming a drush updb. I'm using mysql 5.7.16 and I have tried modifying the workbench_moderation.install file such that all primary keys have NOT NULL => TRUE; but I still receive this error.

SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use [error]
UNIQUE instead
Performed update: workbench_moderation_update_7009

Comments

TrevorBrown28 created an issue.

TrevorBrown28’s picture

Also, when enabling the workbench_moderation module, the following error occurs.

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't.id' in 'field list' in [error]
/var/www/includes/database/database.inc:2227

Does anyone have any suggestions on what I can try to fix this?

agentrickard’s picture

"When enabling the workbench module, the following error occurs."

Workbench is a separate module that does not install any database tables. Please limit yourself to one issue per submission.

If that error report is correct, please file it with Workbench.

TrevorBrown28’s picture

It is the same issue. I meant to refer to workbench_moderation. My mistake. Thanks for catching it.

agentrickard’s picture

It's a common omission. I'm just trying to route the issue correctly.

TrevorBrown28’s picture

This issue is still preventing us from updating to version 7.x-3.0

javi-er’s picture

This is because a bug in core with MySql, see: https://drupal.stackexchange.com/a/219154/35082 , I fixed it applying this patch that will be part of the next core release (7.62) https://www.drupal.org/project/drupal/issues/2615496#comment-12116014