Cherry Blossom feature
Updates: Migration base
Supplies optional behavior shared by migration classes.
Supplies optional behavior shared by migration classes.
Capabilities and extension points
Supplies optional behavior shared by migration classes.
A migration defines an immutable ID, a target parent version, and update behavior. Override install() only when a clean installation needs a value that differs from the legacy-safe runtime fallback.
Immutable migration identifier.
- var string
Parent version that introduced the migration.
- var string
Gets the immutable migration identifier.
Never rename an ID after release. The migration ledger uses it to avoid running the same operation more than once.
- return string Migration identifier.
Gets the parent version that introduced the migration.
- return string Target version.
Determines whether the migration applies to the current site.
Override this for manual feature detection. This method must only inspect state. Returning false records the migration as completed because its conversion is not applicable.
- param Context $context Migration context.
- return bool Whether the migration should run.
Applies behavior for a clean installation.
New-site defaults should be written explicitly here. Runtime code must still use its legacy-safe fallback when that persisted value is absent.
- param Context $context Migration context.
Source reference
This editable reference page is based on the PHP documentation in updates/abstract-migration.php.