On 02/04/2008, Dave Brosius <[EMAIL PROTECTED]> 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
