Skip to content

Tag: liquibase

ValidationFailedException after Liquibase update to 4.9.1

We were using older Liquibase that we now wanted to update to 4.9.1 due to vulnerabilities in older versions. However, now at least one of our old migrations fails with ValidationFailedException: The constraintName is missing from <addPrimaryKey>. However, it worked just fine with the older versions. How can we fix this? If we change the migration, it changes its checksum

How to solve Error when save Entity with List

I have next Entity(List was added with last update): And liquibase update: Well, when I try to save entity I get rg.postgresql.util.PSQLException: ERROR: relation “settings_bank” does not exist. I connect to DB by pgAdmin and- table was created.. List bankIds- just Long, its not connect to another Entity. What I missed and how to fix it? Answer I solve it,

Make column non-nullable in liquibase script

In my liquibase script I made a mistake in the first change set, one of the columns (OWNER) in my Primary Key is nullable as I forgot to set nullable to false for it, as shown below when I mvn clean install my springboot app, I get the below error: I tried adding below chnageset but it doesn’t work and

Liquibase use a changelog outside of my jar file

I developed an app that uses Liquibase and built a jar file. I was wondering if it is possible to use a changelog file that is outside of the jar file , like for example: I know that Liquibase removed the option to use an absolute path , so is there any other way to achieve this? Answer Found an

H2 – Oracle – liquibase – org.h2.jdbc.JdbcSQLException: Table “all_sequences” not found;

I try to add H2 for testing purpose into Spring Boot application-test.yml, my production Db is Oracle. I want to populate H2 schema by liquibase, but I receive following error: Caused by: org.h2.jdbc.JdbcSQLException: Table “all_sequences” not found; SQL statement: My config is following: How to adjust config aboive, I spent few hours, but can not figure out how to make

Running liquibase within Java code

For some reason there’s no documentation on running liquibase inside Java code. I want to generate tables for Unit tests. How would I run it directly in Java? e.g. Liquibase liquibase = new …