Flyway vs LIQUIBASE

Flyway and Liquibase both are database schema migration applications so having lots of similarities apart from it having lots of differences also.

What is Flyway?

Flyway is a schema version control application to evolve your Database schema easily and reliably across all your DB instances. Flyway is helpful to handling database migrations or also called as schema migrations.

What is Liquibase?

Liquibase is an Open Source tool which keep track of database schema script revisions. It can handle variety of database types and accepts a variety of file formats for defining the database structures.

See Also:

Difference Between Flyway and Liquibase

These are the main differences between Flyway and Liquibase database migration tools.

ConceptsLiquibaseFlyway
Generate SQL for youNoYes
RollbackYes, AvailablePaid Service
Different utilities to compare two DBYesNo
Target roll back for any single change and targeted rollback for a set of changesPaid ServiceNo
Ability to manage change files versions in variety of ways and use reporting and monitoring dashboard.NoYes
Specified file formatSQL, XML, JSON, YAMLSQL
Repeatable MigrationYesYes
Pre conditionsYesNo
Dry RunYes, AvailablePaid Service
Flyway and Liquibase comparison

Happy Learning !!!

FLYWAY Spring Boot Properties

FLYWAY is a provider of Spring Boot Data for handling database schemas operations. FLYWAY is a schema version control application to evolve your Database schema easily and reliably across all your DB instances. FLYWAY is helpful to handling database migrations or also called as schema migrations.

See Also:

Use below FLYWAY dependencies to integrate with Spring Boot.

<dependency>
   <groupId>org.flywaydb</groupId>
   <artifactId>flyway-core</artifactId>
</dependency>

After adding FLYWAY dependencies in your application it will automatically download and add the required other dependencies in your application and initialize with default values. You can overwrite these values through application.properties / application.yaml .

FLYWAY CONFIGURATION PROPERTIES

Spring Boot load these properties in FlywayProperties class.

NameDefault
Value
Description
flyway.baseline-description  
flyway.baseline-version1version to start migration
flyway.baseline-on-migrate  
flyway.check-locationfalseCheck that migration scripts location exists.
flyway.clean-on-validation-error  
flyway.enabledtrueEnable flyway.
flyway.encoding  
flyway.ignore-failed-future-migration  
flyway.init-sqls SQL statements to execute immediate to initialize when a connection obtain.
flyway.locationsclasspath:db/migrationlocations of migrations scripts
flyway.out-of-order  
flyway.password JDBC password In case if you want Flyway create its own DataSource
flyway.placeholder-prefix  
flyway.placeholder-replacement  
flyway.placeholder-suffix  
flyway.placeholders.*  
flyway.schemas schemas to update
flyway.sql-migration-prefixV 
flyway.sql-migration-separator  
flyway.sql-migration-suffix.sql 
flyway.table  
flyway.url JDBC database url to migrate. Incase not set then use the primary configured data source.
flyway.user Login user of the database to migrate.
flyway.validate-on-migrate  



REFERENCES

https://docs.spring.io/spring-boot/docs/1.4.x/reference/html/common-application-properties.html

LIQUIBASE Spring Boot Properties

LIQUIBASE is a provider of Spring Boot Data for handling database schemas operations. LIQUIBASE is an Open Source tool which keep track of database schema script revisions. It can handle variety of database types and accepts a variety of file formats for defining the database structures.

See Also:

<dependency>
			<groupId>org.liquibase</groupId>
			<artifactId>liquibase-core</artifactId>
</dependency>

After adding LIQUIBASE dependencies in your application it will automatically download and add the required other dependencies in your application and initialize with default values. You can overwrite these values through application.properties / application.yaml .

Liquibase Configuration Properties

Spring Boot load these properties in LiquibaseProperties class.

NameDefault ValueDescription
liquibase.change-logclasspath:/db/ changelog/db.
changelog-master.yaml
Change log configuration path.
liquibase.check-change-log-locationtrueCheck the change log location exists.
liquibase.contexts Comma-separated list of runtime contexts to use.
liquibase.default-schema Default database schema.
liquibase.drop-firstfalseDrop the database schema first.
liquibase.enabledtrueEnable liquibase support.
liquibase.labels Comma-separated list of runtime labels to use.
liquibase.parameters.* Change log parameters.
liquibase.password Login password of the database to migrate.
liquibase.rollback-file File to rollback SQL statements will be written when an update is performed.
liquibase.url JDBC url of the database to migrate. Incase not set then use the primary configured data source.
liquibase.user Login user of the database to migrate.

References

https://docs.spring.io/spring-boot/docs/1.4.x/reference/html/common-application-properties.html