I'm new to drupal and was recently tasked with upgrading the drupal core version of one of our sites. I upgraded from 8.3 to 8.9.13 and everything went smooth enough until it came time to update the database. Here, I was told that two updates had failed.
system module
Update #8501
Failed: Drupal\Core\Entity\EntityStorageException: Exception thrown while performing a schema update. SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes: ALTER TABLE {content_moderation_state_field_data} ADD UNIQUE KEYcontent_moderation_state__lookup
(content_entity_type_id
,content_entity_id
,content_entity_revision_id
,workflow
,langcode
); Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1619 of /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).content_moderation module
Update #8700
Failed: Drupal\Core\Entity\EntityStorageException: Exception thrown while performing a schema update. SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes: ALTER TABLE {content_moderation_state_field_data} ADD UNIQUE KEYcontent_moderation_state__lookup
(content_entity_type_id
,content_entity_id
,content_entity_revision_id
,workflow
,langcode
); Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1619 of /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php)
The table in question is InnoDB and utf8mb4_general_ci.
Does anyone know what could be causing this issue and how I might go about fixing it?
v8.3 to 8.9.13
Dont bump to many versions. Perform incremental upgrades. You will probably resolve your issue. Try with one or 2 versions upgrade once. and continue the same.drush sql-drop
command.