mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Recommend hook_post_update_NAME() for configuration additions/deletions in module development docs.
This commit is contained in:
parent
818242606a
commit
a742ee6ce9
1 changed files with 5 additions and 1 deletions
|
@ -7,7 +7,8 @@ updates to a farmOS database or configuration, then update logic should be
|
|||
provided so that users of the module can perform the necessary changes
|
||||
automatically when they update to the new version.
|
||||
|
||||
This logic can be supplied via implementations of `hook_update_N()`.
|
||||
This logic can be supplied via implementations of `hook_update_N()` and
|
||||
`hook_post_update_NAME()`.
|
||||
|
||||
For more information, see the documentation for Drupal's
|
||||
[Update API](https://www.drupal.org/docs/drupal-apis/update-api/).
|
||||
|
@ -23,6 +24,9 @@ Note that this only handles overridden configuration. It does not handle
|
|||
missing, inactive, or added configuration. It also does not touch "simple"
|
||||
configuration (eg: module settings) - only configuration entities (eg: Views).
|
||||
|
||||
If your module is adding or deleting configuration, the recommended approach is
|
||||
to implement `hook_post_update_NAME()` to perform the necessary operations.
|
||||
|
||||
In most cases this is desirable, but if you are intentionally overriding
|
||||
configuration in your farmOS instance then you have a few options for
|
||||
disabling this behavior.
|
||||
|
|
Loading…
Reference in a new issue