Problem/Motivation
The database update process invokes the entity definition updates prior to any other update hooks. This will throw exceptions on sufficiently old databases/betas (see #2530940: Provide beta7 update tests for instance). Since these exceptions are unhandled, no update hooks that attempt to resolve those very same exceptions can be run.
See #2532356: Provide a wrapper to core entity.definition_update_manager to temporarily disable updates for background (and the workaround should this not be possible to change in core).
Proposed resolution
Run the automated updates after update hooks so that the schemas can be fixed if they are in a state that is not automatically updatable.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | entity-updates-last-2534832-02.patch | 1.5 KB | jhedstrom |
Comments
Comment #1
jhedstromComment #2
jhedstromThis may be too simplistic. It might need to try to run these at the beginning, and again at the end. If run at the beginning, *all* exceptions should be caught, and then the ones at the end can still only catch the targetted exception type.
Comment #3
berdir#2535082: Allow hook_update_N() implementations to run before the automated entity updates is the better approach I think, that allows us to control if we want to run before or after.