Explain the N-rules in hook_update_N On hook_update_N() the documentation says:


  mymodule_update_7000(): This is the required update for mymodule to
  run with Drupal core API 7.x when upgrading from Drupal core API 6.x.





  mymodule_update_7200(): This is the first update to get the database
  ready to run mymodule 7.x-2.. Users can directly update from 6.x-2.
  to 7.x-2.* and they get all 70xx and 72xx updates, but not 71xx
  updates, because those reside in the 7.x-1.x branch only.


Is it really mandatory to define an 7000 update hook? I saw some contributed module updates that starts with 7300, when the module version for Drupal 7 is 7.x-3.x. 

I am a bit confused, because I read before the UPGRADE.txt file for Drupal 7 core that says:


  MAJOR VERSION UPGRADE
  To upgrade from a previous major version of Drupal to Drupal 7.x, after following the instructions in the
  INTRODUCTION section at the top of this file:
  
  
  In addition to updating to the latest available version of Drupal 6.x core,    you must also upgrade all of your contributed modules for Drupal to their    latest Drupal 6.x versions.
  


For me, it means that users can't directly update from 6.x-2.x to 7.x-2.x unless  6.x-2.x module was the latest in the Drupal 6.x versions. Is this correct?

What about eventual database updates defined by 7.x-1.x branch? Do they have to be reported in the 70xx updates?

Can a module version 7.2.x keep any other updates (e.g. 60xx, 71xx) or it should be clean and defined only updates about 70xx and 72xx?
Basing on the documentation, 70xx updates are only necessary if there are updates from Drupal 6.x to Drupal 7.x that are necessary for any branch the Drupal 7 module has (e.g. 7.x-1.x, 7.x-2.x, 7.x-3.x). If that is not the case, then you don't need to use 70xx as update numbers.

As said in the documentation, updates numbered 72xx allows updating from the 6.x-2-x version of the module to the 7.x-2.x version, but not from the 6.x-3.x version. This is generally not a problem, since project maintainers normally create a version 7.x-3.x together a version 6.x-3.x.

As the documentation reports, updates numbered 71xx are for updated from version 6.x-1.x to 7.x-1.x; updates numbered 70xx are for updates from Drupal 6 to any branch of the module for Drupal 7.x. You don't copy the 70xx updates in 71xx updates, since those are already executed for the 7.x-1.x branch.

As for the updates to keep, the documentation says:


  A good rule of thumb is to remove updates older than two major releases of Drupal.


So, updates for a 7.x-1.x version should still be kept for a 7.x-2.x version.

Keep in mind that, as far as I recall, what described in the documentation about which updates are run when updating from Drupal 6 to Drupal 7 doesn't describe what the code actually does. For what I recall, Drupal code simply run any updates higher than the last executed update. For example, if a module last time ran its 6123 update, Drupal will run any update higher than that number, such as 7000, 7100, and 7200, if they are defined.