continuum-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Liu" <ken....@gmail.com>
Subject Re: Versioning the Continuum database
Date Tue, 09 Sep 2008 21:45:23 GMT
Hi Wendy -

I am new to this list, but I thought I'd throw in a comment on this.

The general approach is to have a one-column table in the database
that contains only a schema version number. This version number can be
read at application startup to determine if the schema is the correct
version. If an older version is detected (or the table is missing),
some automatic facility performs the database migration, or simply
throws an exception telling the user to migrate.

Ruby on Rails has a nice built-in way of doing this, and extends the
concept further by correlating each schema version number with a
"migration" class/script that performs incremental migration of the
application schema. The built-in migration rake target applies each
migration script in order, and updates the schema version table with
the version for each database migration.

Hope that helps.

Ken

>Is there currently any way that Continuum could know that it has been
>started up with an old/incompatible database?

>Any thoughts on what it would take to make this happen?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message