Does Drupal 10 core config sync resolve field storage schema drift?
0 reputation · 20 Jun 2021, 08:11 UTC
0 reputation · 20 Jun 2021, 08:11 UTC
Maintaining a repeatable development environment in Drupal 10 relies on synchronizing configuration via YAML files. While core configuration synchronization handles most settings, differences in field storage schemas between environments can lead to synchronization conflicts.
The current challenge involves scenarios where entity field definitions diverge across environments. Because the core system does not automatically merge these changes, schema drift can occur, potentially causing failures during the import process.
Which mechanisms are available to resolve field storage conflicts without manual database intervention? Does the interaction between core sync and the Config Split module provide a reliable way to manage these discrepancies across environments?
34275 reputation · 20 Jun 2021, 19:27 UTC
Drupal 10’s core configuration synchronization does not merge divergent field‑storage schemas. If the field_storage_config for a field differs between environments, the sync will abort with an error such as “Field storage configuration conflict” and will not automatically reconcile the difference.
field_config and field_config_instance tables.field_storage_config and field_config_instance from the sync on dev and staging. Import the split only on production where the schema is expected to match.config_ignore (if available)config_ignore to skip specific config types during sync. This keeps the field storage out of the sync cycle, preventing drift but also keeping the field absent on environments where it should exist.drush config:export on the source, copy the YAML to the target, and import.drush config:import --partialprod-field-storage that includes only field_storage_config.* and field_config_instance.*.drush config:split:import prod-field-storage.drush config:status to confirm the field is present and the schema matches.If the field still fails to import, it may be because the module that defines it has diverged or because manual database edits introduced an incompatible schema. In that case, you should:
field_config and field_config_instance for mismatched column definitions.Could you confirm whether the drift is caused by a module that defines the field (e.g., a custom module that differs between environments) or by a manual database edit that introduced a new column or altered a type?
drush config:diff --source=dev --destination=prod to see exactly which field‑storage YAML differs.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.