db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Emminger <e...@ericemminger.com>
Subject Re: Database schema changes: migration how to
Date Thu, 27 Mar 2003 15:54:52 GMT

> I'm evaluating possibility on using an O-R mapping tool in my current
> project.  I've read tutorial on torque and similar other O-R mapping tools and
> wonder how the migration is managed.
> Suppose, I've created a book database scheme, generate sql/java code and
> deploy it. Some time later when a lot of data 's been filled into DB I
> discovered that I had to add/change/remove some properties on the Book
> class. I could tweak the schema file and re-create sql/java code but how
> one typically perform migration data to new db scheme.
> An elaborate answer or pointers to relevant Web resources are greatly
> appreciated.

As far as I know, no OR mapping tool, including Torque, has an easy way 
to migrate data between changed models. Migration usually involves 
either database-specific SQL code to change the existing database, or 
creating a new database and moving the data.

If you'd prefer the latter, you can search the archives for import, 
export, migration, transformation, etc. I use this approach in 
development. In production, I would choose an approach that would be 
appropriate for the changes. But, hey, this is just what I do.

If you know or find anything that would change the above information, 
please tell us, or at least me. :)


View raw message