The documentation for hook_update_N() says the following:
Implementations of hook_update_N() are named (module name)update(number). The numbers are composed of three parts:
- 1 digit for Drupal core compatibility.
- 1 digit for your module's major release version (e.g., is this the 7.x-1.* (1) or 7.x-2.* (2) series of your module?). This digit should be 0 for initial porting of your module to a new Drupal core API.
- 2 digits for sequential counting, starting with 00.
These are hypothetical questions:
What happens if you get to something like 7299? Are you required to release a major version update next even if you don't implement the hook, or if you do?
What happens if you have a lot of branches or major releases and get to something like 8900 and want to release a new one for that version of Drupal... 8(10)00? I know some modules go from 7.x-3.x to 8.x-4.x, so this could potentially happen if they continue in that way.
foo_update_8101000
is valid, for example), but it's easy to introduce ambiguity if you go to extremes. Take811123
. Is that major version 11 and minor 123, or major version 1 and minor 1123? – Clive♦ Sep 23 at 18:27update_get_update_list()
anddrupal_get_schema_versions()
for the nitty-gritty – Clive♦ Sep 23 at 19:29