How to repair "Mismatched entity and/or field definition" when "drush entity-updates" fails? I'm developing a site in Drupal 8 in Acquia Dev Desktop 2 on Windows 10. After updating to 8.5.0-beta1 I noticed this error on my status page (although it may have been there earlier in 8.4.4):

ENTITY/FIELD DEFINITIONS
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Custom menu link
The menu_link_content.field_most_common_name field needs to be updated.




It's possible this error came from the Menu Item Extras module, which I had installed a couple of months ago, but since deleted.

Following popular advice, I ran drush entity-updates. That did not cure the problem. The output (typed manually) from my CMD window is below:

menu_link_content entity type :
  The menu_link_content.field_most_common_name field needs to be updated.
Do you wish to run all pending updates? (y/n): y
Drupal\Core\Entity\EntityStorageException: Exception thrown while
performing a schema update. SQLSTATE[42522]: column not found: 1054 unknown
column   [error]
'field_most_common_name_argument' in 'where clause': SELECT 1 AS expression
FROM
{menu_link_content__field_most_common_name} t
WHERE (field_most_common_name_target_id IS NOT NULL) OR
(field_most_common_name_display_id IS NOT NULL) OR
(field_most_common_name_argument IS NOT NULL) OR
(field_most_common_name_title IS NOT NULL) OR
(field_most_common_name_data IS NOT NULL)
LIMIT 1 OFFSET 0; Array
(
)
 in Drupal\Core\Entity\Sql\SqlContentEntityStorage-&gt;wrapSchemaException()
(line 1535 of C:\Users\Nick\Sites\devdesktop\drupal\core\lib\Drupal
\Core\Entity\Sql\SqlContentEntityStorage.php).
Failed: Drupal\core\EntityStorageException: !message in
Drupal\Core\Entity\Sql\SqlContentEntityStorage-&amp;gt;wrapSchemaException()
(line 1535 of
C:\Users\Nick\Sites\devdesktop\drupal\core\lib\Drupal\Core\Entity
\Sql\SqlContentEntityStorage.php).   [error]
Cache rebuild complete.   [ok]
Finished performing updates.   [ok]


Based on the 2nd answer here and this reference, I have made a custom module called "Database Fix" with the following content in the database_fix.module file. I am not a coder, so there is plenty of guesswork involved here:

&lt;?php

/**
 * Fix database by updating menu_link_content.field_most_common_name field
 *
 */
function database_fix_update_8501() {
    $manager = \Drupal::entityDefinitionUpdateManager();
    if ($field = $manager-&gt;getFieldStorageDefinition('field_most_common_name', 'menu_link_content')) {
      $manager-&gt;updateFieldStorageDefinition($field);
    }
}


I enabled the module, refreshed pages and ran update.php, but it didn't work.
Although this question is quite old and no longer relevant for Drupal 8 as drush no longer has entity-updates, I believe people would still be landing on this page with Pending Entity Updates messages in the Status Report. I ran into the same scenario and wanted to address that issue. 

The message is shown when the definition of the entity in the database is different from the definition of the entity in the file because of deleting or adding a field in the entity. That is something that is going to happen a lot when you are developing the module and the entity definition keeps evolving. 

Uninstalling and installing the module will solve the problem because you are recreating the entity again. 

I ran into this same problem and thought I should get to the bottom of this as it was not possible to keep uninstalling and installing the module. 

Drush used to have entity-updates as a feature that would allow entity definitions to be updated on the fly. However this was removed from Drupal core in 8.7.0 (Support for entity updates removed from core)

The work around is to install Devel Entity Updates module and run the dentup alternative

If you are using composer

composer require --dev drupal/devel_entity_updates

drush en devel_entity_updates

drush dentup

That should address this problem. The devel entity updates module is to be used in develpment environments only and in higher environments you are expected to push changes to your entities through hook_updates