jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Abley" <james.ab...@gmail.com>
Subject Re: Modifying the NTD of a workspace
Date Wed, 02 Apr 2008 07:16:08 GMT
On 02/04/2008, Dave Brosius <dbrosius@mebigfatguy.com> wrote:
> We are developing a set of node type definitions for our application, and as
> is to be expected it is changing over time as we develop it. So far, we have
> just deleted the repository, and started over whenever we make a change to
> the NTD, which is perfectly fine in development. My question is, when
> customers have a repository in place with a defined NTD, and a new version
> of our software is to be shipped, how do we manage the upgrading of data
> from one NTD to another?
>
>
>  Are there any general guidelines for this? Do you have to drop the NTD
> completely, make the changes, then reinstall the new NTD?

Ideally, we try to treat it like any schema change in a normal relational DB.

1. Update the table schemas, with relaxed constraints where needed.
2. Update the data; e.g. set default values on legacy columns,
populate other new columns with data migration scripts, etc.
3. Apply constraints and remove any unwanted cruft now that we have
the data in place to support the updated schema.

This does map reasonably well to NTD changes too. YMMV depending on
the environment that you work in. So far, we've not had to write any
code to do step 2, but we are aware that we might need to someday, if
our NTD evolves very drastically (or if we start hitting a fundamental
limitation of our model versus how jackrabbit operates).

Cheers,

James

Mime
View raw message