Hi all,

I noticed that there are very few implementations of hook_update_N() in the examples modules. Perhaps a module dedicated to demonstrating how to implement minor and major upgrade path would be a good idea? Something like this has been requested in #1475954: Demonstrate how to Update/Upgrade the Node Example module.

I have submitted a patch for a new 8.x example module for the config management system, #1615520: Add translatable config_simple_example, and I soon found that a very important aspect of this is how to implement a major point upgrade path from 7.x, so I submitted a patch for a new module against 7.x as well, #1630762: Configuration example for D7, so that the upgrade path to D8 may be demonstrated..

However this issue does not affect only configuration_example, but almost any module, so perhaps a policy is needed for how to demonstrate hook_update_N():

- Does it make sense for 7.x example modules to have an upgrade path to 8.x example modules when needed? --In the real world this is really needed; and this is what I have attempted with configuration_example.
- Is a dedicated update_upgrade_example module is a good idea? thoughts?

Comments

alberto56’s picture

Title: Decide on a policy for demonstrating hook_update_N(): a dedicated module, or should each module implement this? » A dedicated to module to demonstrate hook_update_N() and automatically testing upgrades and updates
Category: support » feature

I have a created an example for this purpose 6.x, 7.x, and 8.x versions, for a blog post: http://www.koumbit.org/en/node/16028

Having a separate module for the upgrade path makes it a lot clearer to me. Thus, let me suggest:

If there is interest in this I'll submit some patches.

Mile23’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Since it's minimal-maintenance time for 7.x-1.x, and since we have a migration example in the works, I'm calling this a duplicate of #2182621: Add Migrate example

If you want to bump this issue up to 8.x-1.x in order to demonstrate something else, then feel free.

It's minimal maintenance time for the 7.x-1.x branch of Examples. See #2642596: D6, D7 Roadmap for Examples