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

Comments

jhedstrom’s picture

Issue tags: +D8 upgrade path
jhedstrom’s picture

Status: Active » Needs review
StatusFileSize
new1.5 KB

This 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.

berdir’s picture

Status: Needs review » Closed (duplicate)

#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.