[development] versioned schema?

Barry Jaspan barry at jaspan.org
Tue Jun 12 21:58:11 UTC 2007


> One could minimize the code by making changes to the array rather than
> re-declaring the whole thing. Something like:
> 
> node_schema_6000() {
>   $schema = node_schema_5000();
> 
>   $schema['node']['fields']['newcolumn'] = array('type' => 'int', 'not
> null' => TRUE, 'default' => 1);
> 
>   return $schema;
> }

The downside here is that there is nowhere a developer can look to
find the current node_schema.  Well, actually, schema.module can
easily provide this, but (I suspect) developers would prefer to look
at a file than visit a Drupal page for this info.

Barry



More information about the development mailing list