db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Marten Visser <jan.marten.vis...@virgil.nl>
Subject Re: Database schema changes: migration how to
Date Thu, 27 Mar 2003 17:07:52 GMT

Eric Emminger wrote:
> Jan
> > I guess I am missing the point here, if you change a relational database
> > scheme, e.g. add columns, you introduce new data. It is off course
> > impossible to generate new data by means of Torque or any tool.
> > I guess you are referring to other changes.
> >
> > Could you give an example of such a change which could be supported by
> > tools because I think I am missing the point.
> Well, I was assuming, perhaps incorrectly, the following example.
> 1. Deploy a release of your application.
> 2. Continue developing your app, including adding, removing, and/or
> changing some properties in your objects. This would require the
> database schema to change to store the objects.

This sounds strange to me. I think you can change the business object
(the non-Peer objects) and add methods to them or fields that need not
be stored in the database. The moment you have the need for
fields/properties that you want to store in the database, you should
change your scheme and recreate the Peer objects (the bussiness objects
are not touched by regeneration, so changes there remain.

So I am wondering: if you add those properties to your objects, do you
also adapt the peer classes?

> 3. Deploy new release of your app with changes from step 2.
> 4. Instruct tool to automatically migrate data from app in step 1 to app
> in step 3.

Ok, i can imagine that if you add fields according to some kind of
naming convention and then regenerate this into the xml-schema. But then
again, is this really a big thing. You have to remember the properties
you add and add them to the xml scheme.

> Theoretically, the tool could do this if it were "aware" of the changes.
> I've used some tools in the past that come close if not accomplish this.
> Was that example useful?
> Eric
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org

View raw message