Evolving Database using Spring Boot and Liquibase

When developing web application, it is important to consider how to create schema for production and evolve the database schema going forward of a Java web application.

Liquibase is an open source library for tracking, managing and applying database changes that can be used for any database. It helps you create the schema, run them during deployment and also help you write automated tests so that your changes will work in production.

Liquibase is a tool that reads a list of database changes from a changelog file. The changelog file is often XML-based, but it could be in other formats also, such as YAML, JSON and SQL formats. Once a new change is added to the changelog file, Liquibase will read the file, detect the new change, and apply it to the database. When code changes are committed to the version control system, the changelog file containing the database “version” also gets committed along with it. Continue reading “Evolving Database using Spring Boot and Liquibase”

Spring Boot Liquibase Gradle Example

Introduction

It is often important to consider when developing web application, how to evolve the database schema of a Java web application.

Liquibase is an open source library for tracking, managing and applying database changes that can be used for any database. It helps you create the schema, run them during deployment and also help you write automated tests so that your changes will work in production.

Liquibase is a tool that reads a list of database changes from a changelog file. The changelog file is often XML-based, but it could be in other formats also, such as YAML, JSON and SQL formats. Once a new change is added to the changelog file, Liquibase will read the file, detect the new change, and apply it to the database. When code changes are committed to the version control system, the changelog file containing the database “version” also gets committed along with it.

In this example I will specify the changelog files in XML format, if you want to specify it using YAML and SQL formats then please read here Evolving Database using Spring Boot and Liquibase

For more information http://www.liquibase.org/

Continue reading “Spring Boot Liquibase Gradle Example”