i'm in need of a tool that migrates repository schemas for multiple
versions of my application.

in other words, i need to be able to run a tool against an existing
repository that adds, removes and (most importantly) alters node type
definitions. eg "migrate the repository from version 1 to version 2 of
my application" or correspondingly "migrate from version 2 to version
1".

i'm considering building something like rails' "migrations" feature.
the app developer would provide the tool with a java class that can
migrate "up" (from version x-1 to x) and "down" (from x to x-1). the
tool would chain these classes together to migrate up or down an
abritrary number of versions.

ideally the tool would work in-place against a single repository, but
copying data out of a "version x" repository to an empty "x+n" or
"x-n" repository would also work.

to do in-place migrations, jackrabbit would have to support alteration
of existing node types (adding and removing property types and child
node types). having looked through the javadoc for
o.a.j.core.nodetype, i don't see any such api. am i looking in the
wrong place, or does it truly not exist? seems like a pretty
complicated feature to add, if it's not already there.

assuming those apis exist or someday materialize, it would also be
excellent if the tool could accept scripts written in a ddl-like
command language, perhaps one that uses/extends the cnd format. for
example

"alter nodetype calendar:event add propertytype calendar:uid mandatory"

or even

"alter nodetype ticket:ticktable add childnodetype ticket:ticket
(ticket:ticket) =ticket:ticket multiple version"

it's a good bet that the jcr-commands contrib project could be leveraged here.

anyway, has anybody build a repository migration tool that does any
amount of these things? or am i starting from scratch?

Reply via email to