The first advantage is that liquibase keeps track of which SQL scripts (which in liquibase parlance are known as changesets) have been deployed to any given database instance, which if you are doing things manually you will need to do yourself. Liquibase also keeps track of whether or not a changeset has been changed since it was deployed, preventing other errors.
Liquibase does not require you to use XML to define the changes - but if you do, you also get another advantage in that your changes can be slightly less dependent on any particular database engine’s dialect of SQL - it is possible to write a single XML changelog that will work the same on PostgreSQL, Oracle, Microsoft SQL server, and more. Some teams use this to give them the ability to do local tests that require a database using something like h2 as the developer database, and then a “real” relational database in production.
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
Yes, you can. There is a tutorial showing the basics of doing that at https://www.liquibase.org/quickstart.html
After reading and following the first page, follow the link about using Liquibase with SQL scipts, which leads to https://www.liquibase.org/quickstart/quickstart_sql.html
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
You can include rollback in sql formatted changelogs. There is some basic documentation at https://www.liquibase.org/documentation/sql_format.html
Some discussion about different rollback options at https://github.com/liquibase/liquibase/pull/334
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
Hello,
I need to know the advantages of using liquibase
liquibase uses XML file which is kept on git but I can still maintain raw SQL versioning on git.Also liquibase rollback also needs XML file even though tag is created.
Hello Steve,
Good day!!
Can I use SQL statements directly in liquibase & those SQL changes being tracked ?
Hey Steve,
I tried with sql tag but it doesn’t seems to be provide rollback feature.
Writing XML is the only way to get rollback option ?