1

I would like to use liquibase for db versioning.

I face a kind of problem. I would like to know how to do for commiting changes I make directly on the database to the db.changelog.xml.

I tried the command generateChangeLog but it append the script to create the complete database one after the other. I would like to have only the changes between an old db.changelog.xml and the database.

I saw that people use a reference database, I find that very heavy and not very flexible and scalable for doing a good continuous integration.

Is there any other solution to simply compare the differences bewteen a db.changelog.xml and a database and write them in this db.changelog.xml ?

Thanks.

1
  • In any case, if it is not possible, what are the minimum privileges to give to databases for making a diff with liquibase ? Commented Oct 8, 2013 at 15:43

1 Answer 1

1

I guess that is not how liquibase is intended to be used. You should do all your changes through liquibase changesets and let liquibase handle db updates. If you additionally also change the db manually it will get tough to handle this.

There is no real support for this in liquibase (imho). You can only try to come up with a solution yourself by using the generateChangeLog command and then compare the result to an existing other changelog file.

I think the intention of the generateChangeLog is to use it at the start of a project when you already have an existing db and you want to switch over to use liquibase. But not to constantly use this to overcome manual changes that have been done without liquibase.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks. In that case, is there any other opensource system to do db versioning without the needs to write queries in another thing than the sql db itself ?
I took example on that tutorial to do what I want: sitepoint.com/versioning-your-database-with-liquibase but it seems that datas are not diffed (only schema). What are commands to also diff datas ? thanks.
I guess there are many tools out there that diff between data bases or synchronize data bases (even the data in it). Here is a question for mysql but the answers also include recommendations for general db diff tools. You should maybe create another question if you are looking for tools to do this. Or even better research it yourself and ask specific questions here on SO.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.