Managing database versions with Liquibase and Spring Boot
5.0 (4 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
16 students enrolled

Managing database versions with Liquibase and Spring Boot

Learn how to make database changes, manage various code versions and update different environments with Liquibase
5.0 (4 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
16 students enrolled
Created by Arkadiusz Fronc
Last updated 6/2020
English [Auto]
Current price: $13.99 Original price: $19.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 2 hours on-demand video
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • define a database structure using Liquibase in XML format
  • upgrade and rollback database structure
  • integrate Liquibase with Spring Boot for automatic database creation and upgrade on application startup
  • use Liquibase for testing database upgrades and rollbacks
  • generate SQL upgrade and rollback scripts
  • Understand basics of relational databases
  • Be able to write SQL statements that create tables, indexes etc.
  • Be able to pull source code from a Git repository
  • Be able to write Java code and use Spring Boot
  • Have IDE that allows creating Java web applications (e.g. IntelliJ IDEA, Eclipse)

Do you want to stop frustration caused by manual database updates? Do you know that there is a free tool to help you out? If your answer is YES, it means that you might benefit from this course.

I start from the very beginning of using Liquibase. You should have some database and SQL knowledge. Basics of Java will increase your final satisfaction as I will also show you Liquibase integration with Spring Boot. I believe in practice so there will be mostly coding with some necessary theory. You will have many chances to try using Liquibase yourself because I included some exercises for you as well.

Get ready for an exiting journey to through Liquibase functionalities.

Who this course is for:
  • Java developers who want to make development and delivery of the database easy
Course content
Expand all 34 lectures 02:13:30
+ Introduction to database versioning
4 lectures 07:16

This is an introduction of me as an instructor. You will hear about my past experience and you will understand why I am a good person to talk about database versioning.

Preview 03:24

I present a high level plan of the course. You will know which subjects we will be talking about and practicing.

What you will learn

You will get a basic overview of technology that we will use during the course.


I will tell you what is the application that we will be working on during the course.

What we will build
+ Prepare the environment
4 lectures 15:36

I reveal the plan for this section.


I talk more about the sample application architecture and functionality. It will be easier for you to modify the code later.

Architecture and software overview

I talk about not obvious but necessary software that you must have to complete exercises for this course.

If you do not have Git, Java and MySQL installed and configured on your computer yet, you should have it after this lecture.

Commands used during this lecture

  • git --version
    It prints the current version of Git. It does not have to be a specific version but Git must be installed and the command should work.


I show how to get the application source code from the Git repository, how to configure it and how to run it. After this lecture you should be able to do the same and have the dating platform for dogs configured and working on your computer.

Run the application
+ Database versioning - basic changesets
8 lectures 41:08

I define new feature requirement that involves updating the database structure. You will understand why we have to modify the database.

Task to modify the database structure

You will understand the difference between deployment of new application version and new database structure and why it requires different solutions. I will present you the database versioning concept that Liquibase follows.


You will be able to download, install and configure Liquibase and MySQL JDBC driver. After this lecture you should repeat my steps to have Liquibase ready on your computer.

Installing Liquibase and database driver

You will be able to define a basic database structure in Liquibase XML format. You will learn changeset syntax and some change types: table creation with columns, a primary key, autoincrement, not nullable constraints.

Db structure definition in Liquibase changesets

You will get a chance to upgrade a database using update Liquibase command. You will also see a sample error during execution and a solution to it.

Upgrading database

You will learn how to make data changes using Liquibase changesets.

Data changes and incremental database upgrade

You will understand Liquibase internals - how Liquibase knows which changesets have to be applied on a database.

How does incremental upgrade work?

I will define a task for you to practice changeset creation. You will be able to practice your knowledge.

Database versioning basics
3 questions
+ Development database
4 lectures 15:16

You will understand special needs of development database in software companies and why a single one shared with many developers is not a good solution.

Development database challenge

I will show you how to add H2 database to the project, integrate it with Spring Boot and use it instead of MySQL database.

In-memory H2 database

We will add Liquibase to the project to be configured by Spring Boot. You will learn how to use it to upgrade H2 database during each application start.

Liquibase integration with Spring Boot

You will learn how to add various types of data through a changeset: text, numbers and use subqueries in insert Liquibase changes. You will be able to split changesets across multiple files and nest one file in the other.

Sample data
+ Rollback
3 lectures 11:08

You will know why having a possibility of rolling back a database structure change is important.

Rolling back changes challenge

You will be able to revert changes from the database taking advantage of autorollback feature of Liquibase.


What to do if autorollback does not work? You will learn how to create a custom rollback for a changeset.

Custom rollback
Autorollback support
1 question
+ Production database
4 lectures 18:07

You will realize that the production environment often have its own requirements and you cannot avoid SQL scripts.

Production challenge

You learn how to apply a tag on the database and how to roll back to that tag. You will also see how to rollback to a specific timestamp.

Tag, upgrade and rollback commands

You will learn how to prepare upgrade and rollback SQL scripts for a database when you cannot use Liquibase XML changesets directly.

Generate upgrade, rollback SQL scripts

You get familiar with a fast and automatic way of testing changesets for update and rollback procedures.

Testing upgrade and rollback
Liquibase commands
3 questions
+ Best practices
3 lectures 10:21

I will tell you when to look for information about Liquibase.


I will explain you why you should create new changesets instead of modifying existing ones. I will show you how Liquibase checks this rule using a hash. And in the mean time you will also learn a new command - dropAll.

Changeset hash

You will understand why you should never mix more than one change per changeset.

One change per changeset
Best practices
3 questions
+ Exercises
4 lectures 14:38

I will invite you to a series of exercises to practice using Liquibase.


You will practice Liquibase commands.

Exercise 1

You will practice creating various types of changes while preserving existing data and securing rollback possibility for the future.

Exercise 2

You will practice creating custom not obvious rollbacks.

Exercise 3