Can I use this without caring to learn the changelog xml syntax?

To avoid bothering learning how it operates behind the scenes, can developers and DBA use it by taking a snapshot of how a database looks right now, then make some changes in the database, and then having it snapshot again to see what changed, and then even record that?


Vague thoughts there, but the point I’m trying to make is, is it possible to use this app without learning the changelog XML stuff? Just allow a developer or DBA to make the changes in a database (local copy or whatever) and have the tool find them and save its changelog whatever it needs to apply those changes.


We’d use it only to output the SQL anyway, so we wouldn’t really care what it uses to track changes internally. Just want to actually do a change in a dev copy of a database, and have it eventually output the SQL to duplicate that change.


Thank you for that tip on the Formatted SQL option.


There is a very good reason to use this tool, even if we ALWAYS avoid using the changelog XML. The point is to create the changes in the DB and save the things that changed and then continue using Liquibase capabilities of storing the change log in the database and applying changes, etc.  In other words, there is no real need to learn the syntax Liquibase uses to use it effectively. We can still revision control the changelog files it creates (in XML or this SQL format) but don’t need to care to learn how to use it. We can review the output to kind of peer-review it, but otherwise it’s really not necessary in our case. I can see how it would be a good thing to use for bigger scale projects with even multiple types of databases.


However…  all the better to use some generic DDL format rather than an XML thing you have to learn.


But…  again, ignoring the format of the changelog files, you can use this to migrate to and from totally different type of data storage entities, not just SQL databases. That concept is cool. So maybe you are using some database designing/modeling tool and you have the schema stored in its own XML or whatever file format, or you make up your own. You could use Liquibase to go back and forth with that, using it to push the changes to the actual storage database.



Short answer: Yes


Slightly longer answer:


You can do diffs, but if you’re ALWAYS going to do diffs, then there may not be much reason to use the tool.


A better solution would be use the Formatted SQL changelog option.  It’s basically a file of the DDL with very minimal markup in the comments.  Once it’s created, users (developers/DBAs/etc.) can simply add their changes to the end of the DDL and run liquibase to have the changed incorporated.


See:


http://liquibase.org/manual/formatted_sql_changelogs


For information on the formatted SQL changelogs