Why database connection for updateSQL?

It needs to check which changesets have already been applied.


I would like your thoughts and opinions on how I intend to use Liquibase.

I am planning to use EMF (Eclipse Modeling Framework) to model my domain objects which I intend to transform to JPA entities using generators like Texo or something home-grown. I am not comfortable with letting the JPA providers control the database objects creation also. Two reasons for this- most enterprise DBAs want to review the database DDLs before they can be executed and second, different JPA providers support schema changes differently. For example, EclipseLink till recently did not support altering existing tables at all. Hence my decision to use Liquibase to manage the DDL side of things. I am hoping to create some utility which can generate the Liquibase XML from the EMF model definitions. Does this sound plausible? Any issues or potential problems you see here?

A query I have with Liquibase’s updateSQL command - it is meant to generate the DDLs for the change sets defined and write them to a specified file. Why is database connection details required for this? Cant Liquibase simply use the definitions in the XML to generate the DDLs?

Thank you for any inputs.