[development] versioned schema?

andrew morton drewish at katherinehouse.com
Tue Jun 12 16:49:24 UTC 2007

On 11 Jun 2007 00:03:03 -0400, Barry Jaspan <barry at jaspan.org> wrote:
> 2.  hook_schema($version = SCHEMA_CURRENT)
> I kinda like #2 the best, but #1 may make more sense with our current
> hook_update_N() system.  (#3 has the "advantage" that we might be able
> to automatically update from one version to the next, but it could
> also be very complicated.)  Perhaps hook_schema_N() and
> hook_update_N() should be tied together in some way so that the new
> schema and the upgrade path to get to it from the previous one are
> always specified together.

The problem I see with #2 is that the .install files would quickly
become huge. I'm imagining hook_schema() would have a big case
statement with a complete copy of every version. I guess we don't need
to load the .schema files often but it seems like it'd cause some
memory issues when several are loaded.


More information about the development mailing list