Migrator is currently out in beta, and has no documentation, but Obie Fernandez just wrote an overview. Migrator is easy-to-use, but is undocumented and relies on SQL and therefore your migrations are not portable to other databases. It is an attempt to bring the functionality of ActiveRecord migrations to Java.
Scriptella, which has gone from a 0.1 release to version 0.4 in the last two months, is primarily a Extract-Transform-Load (ETL) tool. However, it does provide the capability to do schema migrations. In their examples, they provide a demonstration of how to do migrations, with documentation. Scriptella is primarily used from Ant and uses straight SQL in the query and script sections of its XML configuration file, thus it is not cross-database (although it nicely supports moving data from one database to another, you have to write both sets of SQL yourself).
DdlUtils is an Apache project that first and foremost handles straight DDL changes to your database in a cross-platform way. Guy Davis blogged how to use DdlUtils in a cross-database way including dumping and loading data. One limitation of DdlUtils is that it currently does not have the ability to capture or create triggers, constraints, or stored procedures.
Of the above projects, DdlUtils has been around the longest, although Sciptella was developed in-house and then open-sourced so it is also fairly stable. Migrator shows good promise, but it is too soon to say how it will develop.
InfoQ covered some similar ideas back in August when talking about the broader idea of project updates.
Community comments
Scriptella does support cross database scripts.
by Fyodor Kupolov,
Scriptella does support cross database scripts.
by Fyodor Kupolov,
Your message is awaiting moderation. Thank you for participating in the discussion.
Hello Rob,
First I'd like to thank you for mentioning Scriptella. But I have several important notes.
Scriptella supports cross database scripts via dialect elements. Example:
So you can write most of your code in ANSI SQL and only add small vendor specific code snippets if necessary. See Best Practices for additional tips on how to write cross database scripts.
Scriptella is mainly an ETL and scripts execution tool, so schema evolution is just one of possible usages. With Scriptella you can work with databases, LDAP directories, Velocity etc. simultaneously and this feature is very important in complex deployment scenarious. I'd like to note that SQL is not the only supported language, our phylosophy is to use a suitable language for the datasource, e.g. LDIF for inserting data into directories.
Originally Scriptella was created to migrate our customer production Sybase DB to HSQLDB with additional schema changes. Then we used it to synchronize Oracle DB with LDAP directory. And finally we've tried Scriptella as a schema evolution tool.
We also use Scriptella for test data generation, benchmarking and preparing an in-memory database for testing. Besides Ant and command line launchers Scriptella can be easily integrated with Java code, Spring Framework and Java EE environment.
Regards,
Fyodor Kupolov