Reputation: 191
I'm an intern and I'm trying to learning Liquibase to see if we can use it for our application. I used Liquibase from Git Bash a bit without any problem (all good in updates and rollbacks), then I tried to use Liquibase with a Spring Boot project to see if I was able to update the database. I did that, I both created and updated db through Spring Boot. But next I wanted to do some rollbacks but I'm not able and I don't know what to do. I tried to do that from Git Bash in the folder where is the changelog of my Spring Boot project as you can see in the image, but Liquibase says that changes have not been applied and if I try to update gives error because tables exist (in fact the Spring Boot application created them earlier)
Here are the pieces of code hoping that they are useful to you to understand the problem:
Finally I discovered the problem!! Using liquibase changelog-sync command I noticed that in the DATABASECHANGELOG table I've different values for FILENAME column for the changeset of Spring and the others with the Git Bash as you can see here.
To avoid this problem I used the logicalFilePath attribute in the changelog like this. Now everything works and I can do rollbacks from the Git Bash.
Upvotes: 0
Views: 456
Reputation: 367
I am glad you were able to figure out the workaround. As you a newbie Liquibaser, I would like to inform you about the free Liquibase certifications! You can learn all the Liquibase fundamentals and best practices on Liquibase University
Upvotes: 0