Skip to content

Tag: liquibase

@Column settings in case of externally managed database schema

When externally managing the database schema (e.g. with Liquibase), in addition to specifying the Liquibase changesets, you have to help Hibernate understand your data structure using JPA annotations. While some annotations concern higher level abstractions of the underlying data like @Embedded or @OneToMany, other lower level annotations, such as @Column(length = 255, nullable = false), seem only to represent what

Custom LiquibaseDataTypes not found in docker image classpath

I am trying to build a custom Liquibase docker image (based on the official liquibase/liquibase:4.3.5 image) for running database migrations in Kubernetes. I am using some custom types for the database which are implemented using @DataTypeInfo annotation and extending existing LiquibaseDataTypes like liquibase.datatype.core.VarcharType (class discovery is implemented using the META-INF/services/liquibase.datatype.LiquibaseDatatype mechanism introduced in Liquibase 4+). These extensions are implemented inside

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

Error creating bean with name ‘liquibase’ in Spring Boot App

I have difficulties with adding Liquibase to my existing Spring Boot application. I added the necessary dependency in pom.xml. Then I have added an empty changelog-master.xml file Here is the code:”> But when I run the program I got an exception: Error creating bean with name ‘liquibase’ defined in class path resource [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested