Update #7017 to 2.10 or later throws error during updatedb

Created on 25 October 2017, almost 8 years ago
Updated 9 September 2025, 23 days ago

Update #14: This may be a Drupal core bug regarding MySQL >= 5.7 https://www.drupal.org/project/drupal/issues/3056593
Update #12: This looks like an issue with Mysql 5.7 and Drupal 7. My workaround is to downgrade my database version to 5.5.

Original post:
I am trying to upgrade a fairly old version of Workflow to the latest version and I've run into a number of issues.

I decided to upgrade version by version to pinpoint them. When I ran the db update for 2.3 I got the following warnings pop up.

$:/var/www/public$ drush updatedb
 Workflow  7011  Add database fields to make Workflow exportable.   Ignore the 'User warning'.
Do you wish to run all pending updates? (y/n): y
Performed update: workflow_update_7011                                                                                                                                                           [ok]
class_implements(): Class WorkflowTransitionController does not exist and could not be loaded entity.module:728                                                                                  [warning]
in_array() expects parameter 2 to be array, boolean given entity.module:728                                                                                                                      [warning]
class_implements(): Class WorkflowTransitionController does not exist and could not be loaded entity.module:728                                                                                  [warning]
in_array() expects parameter 2 to be array, boolean given entity.module:728                                                                                                                      [warning]
Missing database columns for the exportable entity Workflow as defined by entity_exportable_schema_fields(). Update the according module and run update.php! entity.module:872                   [warning]
'all' cache was cleared.                                                                                                                                                                         [success]
Finished performing updates.                                                                                                                                                                     [ok]

Seeing as they were warnings I pressed on, upgrading individually through versions 2.4, 2.5 until I hit an error at 2.6

$:/var/www/public$ drush updatedb
 Workflow  7016  Add an index to {workflow_node_history}.nid.
 Workflow  7017  Add a primary key to {workflow_scheduled_transition}.
Do you wish to run all pending updates? (y/n): y
Performed update: workflow_update_7016                                                                                                                                                           [ok]
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 UNIQUE instead                                               [error]
Performed update: workflow_update_7017                                                                                                                                                           [ok]
include_once(/var/www/public/sites/all/modules/workflow/includes/Entity/WorkflowTransitionController.php): failed to open stream: No such file or directory bootstrap.inc:3494       [warning]
include_once(): Failed opening '/var/www/public/sites/all/modules/workflow/includes/Entity/WorkflowTransitionController.php' for inclusion (include_path='.:/usr/share/php')         [warning]
bootstrap.inc:3494
class_implements(): Class WorkflowTransitionController does not exist and could not be loaded entity.module:728                                                                                  [warning]
in_array() expects parameter 2 to be array, boolean given entity.module:728                                                                                                                      [warning]
include_once(/var/www/public/sites/all/modules/workflow/includes/Entity/WorkflowTransitionController.php): failed to open stream: No such file or directory bootstrap.inc:3469       [warning]
include_once(): Failed opening '/var/www/public/sites/all/modules/workflow/includes/Entity/WorkflowTransitionController.php' for inclusion (include_path='.:/usr/share/php')         [warning]
bootstrap.inc:3469
class_implements(): Class WorkflowTransitionController does not exist and could not be loaded entity.module:728                                                                                  [warning]
in_array() expects parameter 2 to be array, boolean given entity.module:728                                                                                                                      [warning]
'all' cache was cleared.                                                                                                                                                                         [success]
Finished performing updates.

The same warnings as 2.3 have popped up along with the PRIMARY KEY error, which I've been unable to find any other reference to in the Workflow module.

Could anyone point me in the right direction as to how to fix these issues?

Thanks in advance.

🐛 Bug report
Status

Closed: outdated

Version

2.11

Component

Code

Created by

🇦🇺Australia chris_gooley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024