- Issue created by @giuse69
- 🇺🇸United States apmsooner
Hi, i'm not really sure how this failed you. I just tried the update on another installation with 3.1.7, added a bunch of data and then installed 3.1.8 and the update ran just fine. Maybe you can export the config for the field storage that is giving you problems and paste here and perhaps I can take a look. I'm not really sure why it thinks its changing schema in the db, the update is only changing settings. If anyone else has similar issues then maybe we can figure out a way to isolate it but whatever your storage config looks like may give us some clues. You can go to: /admin/config/development/configuration/single/export to get that.
- 🇮🇹Italy giuse69
As an additional info, the update failed on custom_field module Update #8005, that I see in the code actually tries to change the schema.
Does this help? - 🇺🇸United States apmsooner
in that update in the .install file, you can try adding this extra line right before the save action. If that works, just verify no data loss. I think its just triggering a safety feature in storage settings to prevent data loss although I still havn't been able to reproduce the issue. It could be helpful again if you could share the storage config for that field.
// Update the settings.
$field_storage_config->setSetting('columns', $columns);
$field_storage_config->setSetting('column_changes_handled', TRUE);
$field_storage_config->save(); - 🇮🇹Italy giuse69
Hi, I added the line and the update again failed with the same reason
custom_field module Update #8005 Failed: Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException: The SQL storage cannot change the schema for an existing field (field_geo_area_info in taxonomy_term entity) with data. in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->updateDedicatedTableSchema() (line 1750 of /web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php).
The configuration for that field is the following
uuid: 1d4286d3-e313-419d-a3c1-04e1303979d0 langcode: en status: true dependencies: module: - custom_field - taxonomy id: taxonomy_term.field_geo_area_info field_name: field_geo_area_info entity_type: taxonomy_term type: custom settings: columns: type: name: type type: string max_length: '20' unsigned: 0 precision: '10' scale: '2' size: normal datetime_type: datetime code: name: code type: string max_length: '10' unsigned: 0 precision: '10' scale: '2' size: normal datetime_type: datetime flag: name: flag type: string max_length: '255' unsigned: 0 precision: null scale: null size: null datetime_type: null target_type: null uri_scheme: null module: custom_field locked: false cardinality: 1 translatable: true indexes: { } persist_with_no_fields: false custom_storage: false
- 🇺🇸United States apmsooner
I was able to reproduce and fix. Please try the dev branch and verify if the update goes through now. Please confirm for me as I will roll out another release for others that may experience the same issue.