Yes, I think you might find yourself fighting the framework. If you want to stick to the framework I guess what you could look at is to port the app to the current version of Hibernate and have Hibernate generate the DDL for the target version. Then you could dump the resultant schema and compare this against the old schema. At this point you could look at manually creating a patch to perform the migration. One applied, you can then throw away the patch. Alternatively you could run the two different versions of Hibernate in separate JVMs or classloaders each with their own DB instance and write some data shovel to pipe the data between the two different versions, i.e. doing the migration in Java rather than in the DB. This could be quite an expensive approach depending on how much data you have. I guess it depends on how SQL-centric you want the solution to be. |