You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Dave Brosius <db...@mebigfatguy.com> on 2008/04/02 04:48:33 UTC
Modifying the NTD of a workspace
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?
Re: Modifying the NTD of a workspace
Posted by James Abley <ja...@gmail.com>.
On 02/04/2008, Dave Brosius <db...@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
Re: Modifying the NTD of a workspace
Posted by Dave Brosius <db...@mebigfatguy.com>.
This is the best reference i've found
http://jackrabbit.apache.org/node-types.html
and the two associated links at the bottom of this page.
Even an idiot like me was able to make sense of it all from this. :)
----- Original Message -----
From: "Charles Johnson" <cj...@proteanit.net>
To: <us...@jackrabbit.apache.org>
Sent: Wednesday, April 02, 2008 2:41 AM
Subject: Re: Modifying the NTD of a workspace
>I took your advice and am looking into ntd myself but so far haven't seen
>many 'in the wild'. I expect yours could be commercially sensitive but
>where can i see more of these?
>http://wiki.apache.org/jackrabbit/NodeTypeRegistry seems to be pretty empty
>
> CJ
>
> Dave Brosius 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?
>>
>
>
Re: Modifying the NTD of a workspace
Posted by Charles Johnson <cj...@proteanit.net>.
I took your advice and am looking into ntd myself but so far haven't
seen many 'in the wild'. I expect yours could be commercially sensitive
but where can i see more of these?
http://wiki.apache.org/jackrabbit/NodeTypeRegistry seems to be pretty empty
CJ
Dave Brosius 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?
>