Version based database migration with Liquibase

preview_player
Показать описание
Today, I want to talk about version-based database migration with Liquibase.
Creating the database for your application seems to be easy as long as you don’t need to support multiple versions or work in multiple teams. You just generate an SQL script from your database model or in the worst case, export the required statements from your test database. You can then execute it manually or use JPA to do that automatically.
This approach doesn’t work as soon as you need to support multiple versions of your application. And extracting the required changes from the test database becomes a huge mess when the size of your team and the number of changes increases.
You can avoid some of these problems when you create the database update scripts, while working on the next release, and store them alongside your code in git or whichever version control system you use. Whenever someone gets the latest code changes, he will also get the required database changes. With the right tooling in place, you will even be able to apply these changes automatically. One tool that can help you with that is Liquibase.

If you like this video, please give me your thumbs up and share it with your friends and co-workers.

Like my channel? Subscribe!

Join the free Member Library:

Want to connect with me?
Рекомендации по теме
Комментарии
Автор

Very good video for newbies with Liquibase. Txs!!

fabiosuarez
Автор

Interesting tutorial, thank you very much for the infos. We are waiting for more....

alifellahi
Автор

could you please suggest how rollback works, I have tried rollback with <rollback> tag but it's not working fo rme

Mokshith
Автор

So can Liquibase generate the XML files with the new schema automatically?

chrisbordeman
Автор

Thank you for the video. One comment I would like to make is that all videos about Liquidbase or Flyway talk about benefits of automatic migration. And this is clear. But what they all fail to explain is handling of different environments such as PROD, TEST, DEV, etc. Also release dates. So, while explanation on how to setup and use the tools seem to be all over the net, there is little to none touching on these topic but they are very important as for example in large enterprises, we ad developers mostly dont even get a view of real database and have zero access rights to it. So, how would the tool has the rights to access it? How should it handle different environments such as PROD, TEST, DEV etc? What about release dates? etc...

dinobulja
Автор

Hi thanks for the introduction. Can you please show how to update dB on startup using spring boot and gradle? Thanks.

MrKajan
Автор

I think changesets are unique on basis of Author name + id+ changelog file classpath. Please correct me if wrong.

saurabhsuman
Автор

Nice video. Can i use liquibase for store procedures, triggers etc. If you have document or video please share.

umeshapt