Needs work
Project:
Drupal core
Version:
main
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Dec 2019 at 15:53 UTC
Updated:
27 Jun 2023 at 16:26 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
amateescu commentedComment #3
amateescu commentedComment #4
amateescu commentedComment #5
daffie commentedHow are site admin going to find out that there is a problem that they should fix? Do we need a change record for that? Can we as Drupal core developers do something to help them with that?
Comment #6
hchonovUnfortunately finding inconsistencies requires debugging to check what exactly is the problem ... It was always like that and we could provide better and exactly errors about where the inconsistency relies. For example when detecting the unique identifier inconsistency we could provide a message exactly about this. This however is more complicated when the storage schema changed itself as those are nested arrays and providing automatic error retrieval would not be easy and we might just wanna stick to saying that there is a mismatch.
The unique storage identifier does not affect the storage schema, does it? If it does not, then this is not the right place to report the inconsistency.
Comment #7
amateescu commentedIt does, because a different storage identifier can mean that there is a different field type using that field name, and a different field type usually means a different field (storage) schema.
Comment #8
hchonovMakes sense, but then the following check should be failing right? :
$storage_definition->getSchema() != $original->getSchema()Comment #9
amateescu commentedRight. The problem that this patch tries to alleviate is when someone has the same field name and type, but with different storage identifiers (regardless of how that could happen). That situation can lead to broken entity type schema updates, because the temporary table names created by that process are based on the unique field storage identifiers.
Comment #10
hchonovOk, let's then document this in the code where the condition is being added as it isn't that obvious.
Comment #12
amateescu commentedNot sure why I tagged this issue with 'WI critical' when I opened it, but at this time it's not really blocking Workspaces from being marked as stable, so untagging.
Comment #17
larowlanComment #18
larowlanFWIW https://github.com/larowlan/schema_diff can be used to unpick schema differences
Comment #19
karishmaamin commentedRe-rolled patch against 9.5.x. Please review
Comment #20
smustgrave commentedFor the issue summary update per #18