Tuesday, April 29, 2008

[Tech] Database Migration

I found an interesting project: migrate4j which was introduced at Javalobby today. The idea behind this tool is to leverage the issues that come up when applications are developed using a relational database and the database schema changes between version. I.e., databases at customers or used by other developers have to be modified to the needs of the new version of the software. Probably you even want to downscale again.

The main page of the project already gives a good insight into the functionality of this tool. The idea is to describe "up" and "down" grading steps in Java classes that can be executed within the build automation cycle. Up and down are relative to the current version of the database. So it should be possible to up- and downgrade the database to the desired level automatically when needed.

Very interesting idea, however, I am wondering, why there are not more tools like that around; everyone developing database-applications is fighting with such issues I suppose. Have I overseen such tools? Recommendations?


David said...

This is pretty much standard in Ruby on Rails, see UnderstandingMigrations.

Alexander Schatten said...

Yes I understand that; I think this Java project is also inspired by this Rails feature.

However it is funny, that there are at least to my knowledge not many projects in that field. Particularly not in Java, where we find typically all sorts of technology in multiple versions way before other technologies adopt it.

MexicanHacker said...

Actually you can look at autopatch in sourceforge, it has the same functionality that migrations and it's older than migrations I think.