[development] Choosing the N number for .install's hook_update_N

Earl Miles merlin at logrus.com
Mon Aug 4 16:29:56 UTC 2008


Earnie Boyd wrote:
> Quoting Erik Stielstra <info at erikstielstra.nl>:
> 
>> You find the policy here: 
>> http://api.drupal.org/api/function/hook_update_N/7
>>
> 
> That doesn't answer the OP's question.  I find the numbering a bit 
> limiting.  What happens if a module has version 10.  We should change N 
> to read D-M-S where D is the Drupal version, M is the module version and 
> S is the sequence number of changes with the dash (-) character being 
> the delimiter of versions and sequence.  So mymod-7.x-2.1 upgrade would 
> be mymod_update_7-2-1().

So the difference between your setup and the setup in the policy is that 
you include a dash -- which I'll mention isn't legal in function names 
-- but is otherwise identical.

Sorry, I don't think adding a character (and let's assume you meant _ 
which is the only legal possibility) actually adds anything; what it 
does do is break the database which requires the update number to be a 
number.


More information about the development mailing list