I have a custom entity and wish to increase size of a varchar field. This gives helpful input: https://www.drupal.org/docs/8/api/update-api/updating-database-schema-andor-data-in-drupal-8

I added the relevant 'Altering the length of a field with data' code to my .install, and updated my entity definition, and while the DB field is changed correctly, the Drupal Status report page still says 'Mismatched entity and/or field definitions'.

Running drush updatedb --entity-updates says it wont as field has data 'The SQL storage cannot change the schema for an existing field (yeargroup in compresult entity) with data.' (the whole point of the code in the ref)

Is there any way to persuade Drupal to not complain, ie so that the configs are aligned internally.

  • I'm not adding data - just trying to extend the size of a varchar - which is a safe process – jons Jul 13 '19 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.