Questions tagged [liquibase-hibernate]
Liquibase plugin for Hibernate that lets this be configured as a comparison database for Liquibase commands.
169
questions
0
votes
0
answers
33
views
Liquibase "Unkown database Hibernate"
I am using Spring Boot 3 with Spring Data JPA (MySQL8).
I am attempting to generate a liquibase:diff based on my JPA Entities. When I attempt to do so, I have the following error:
Starting Liquibase ...
-1
votes
0
answers
13
views
insert data to a table which have a column name as globalsettingsvalue
I write a liquibase script to insert data to a STATIC table which have a column name as globalsettingsvalue.loading data through .csv file using a temp table.
But it give below error:
Reason: ...
0
votes
0
answers
49
views
SpringBoot - TestContainers - Liquibase - Cascade delete fails
I am migrating from real postgres testing to testContainers using spring-boot.
The test fails with this exception:
Reason: liquibase.exception.DatabaseException: ERROR: update or delete on table "...
0
votes
0
answers
70
views
How do I perform database diff generation with Quarkus and Hibernate?
Currently, I'm using PostgreSQL for my database and Quarkus with Hibernate ORM. For a while, I just used Hibernate's default HBM2DDL. Eventually, I discovered that it couldn't update every change I ...
0
votes
0
answers
30
views
I need to reset Liquibase in my project. How can I do that?
I have a SpringBoot project with a lot of entities, we are using liquibase since always, but know my TL had the idea of reset all the migrations and run the liquibase like a restart of the project to ...
0
votes
0
answers
70
views
Customize the primary key name with Liquibase and Hibernate for liquibase:diff
I have a Spring Boot application where I am trying to automatically generate a liquibase diff .sql (using mvn liquibase:diff) with my own NamingStrategy. I created a custom ImplicitNamingStrategy and ...
0
votes
1
answer
97
views
Liquibase maven rollback command: [ERROR] Unknown lifecycle phase ".rollbackCount=1"
I'm using Spring-Boot v3.1.3 with Liquibase v4.23.1.
The command for creating diff and update for Liquibase work correctly as expected:
- mvn liquibase:diff
- mvn liquibase:update
But when I want ...
1
vote
1
answer
169
views
liquibase-hibernate6: java.lang.UnsupportedOperationException: The application must supply JDBC connections
I've tried adding Liquibase to my project and to get the diff between entities and the database I've also added liquibase-hibernate6 to POM file.
When I try the command:
mvn liquibase:diff
I get ...
0
votes
0
answers
117
views
Facing issue while setting up Mysql with Keycloak [java.lang.Throwable: Lock owned during cleanup: ServerService Thread Pool -- 68]
I'm setting up keycloak(in RHEL 9 Linux VM and version is rhsso-7.4.10) and mysql. Added the needed configuration changes in standalone.xml file but I'm getting below error.
The logs shows some lock ...
0
votes
0
answers
32
views
Sharing field constraint metadata between Java DTO layer and Java Entity layer
I have a Java Entity class and a Java Data Transfer Object, each of which has it's own layer of validation based on constraints.
I use Liquibase to generate changelogs (db schema) based on the state ...
3
votes
1
answer
528
views
Using SpringBoot 3 and Hibernate 6 any generated Liquibase changelogs based on my Java Entity classes are empty
I have a SpringBoot 3 based Gradle project that uses Hibernate 6 and Liquibase.
The goal is to use the liquibase-hibernate6 dependency to generate an initial Liquibase changelog containing the details ...
0
votes
0
answers
46
views
Java @NotNull constraint information not part of generated Liquibase changelog when using diffChangeLog command
I have a Java Entity with an id field.
I've now added a new column to the Entity but I would like to add a Java bean validation constraint of @NotNull to that field but the generated Liquibase ...
0
votes
0
answers
44
views
what should be column type for embedded type field, while writing changelog in liquibase
@Entity
public class A{
private String aa;
@Embedded
private Addreess bb;
}
@Embeddable
public class Address{
private String dd;
}
while writing the changelog below are some of the syntaxes ...
0
votes
0
answers
142
views
Liquibase (diff and diffChangeLog) dataSource or dataSourceClassName or jdbcUrl is required
I'm getting the following error When I try to run Liquibase
diff and diffChangeLog.
The fun part is When I try to run ./gradlew update -PrunList='localEnv'
It runs without any issues.
The same goes ...
1
vote
1
answer
138
views
How to execute Set escape \; in liquibase
There are several insert sql statements which have \ in them.
Originally the statements were written for manual execution from sql developer.
So SET ESCAPE ; would work and the insert scripts also ...
2
votes
0
answers
319
views
Liquibase can not find constructor for liquibase.changelog.ChangeSet
I have a gradle multi module spring boot project.
My build.gradle file:
apply plugin: 'org.springframework.boot'
apply plugin: 'org.liquibase.gradle'
dependencies {
liquibaseRuntime 'org....
0
votes
0
answers
36
views
How to do data migration in liquibase for multinant architecture
We are having a multitenant architecture whereby single database is shared by multiple tenant
We want to do data migration (Insert,update,delete) operation for each tenant in the same database. Each ...
0
votes
0
answers
74
views
Liquibase script for TABLE_PER_CLASS inheritance and @OneToMany mapping
Let "A" be a base entity with TABLE_PER_CLASS inheritance strategy. Let "B" and "C" be entity subclasses of "A". let "D" be an entity that has a @...
0
votes
0
answers
87
views
Generated changelog has "add" foreign key constraint before "Drop" foreign Key constraint. liquibase jar version : 4.10
I have to upgrade liquibase-core jar from 3.4.2 to version > 4.8 for my application.
In our application we are generating the changelog.xml via CLI command.
we are using liquibase with Oracle PL/...
0
votes
1
answer
313
views
Liquibase generateChangeLog generates no data at all
I want to dump some data with liquibase maven plugin from a legacy database. So I ran this command :
mvn liquibase:generateChangeLog -Poracle. The build ran successfully with no errors, but the output ...
0
votes
1
answer
264
views
Embedded H2 Database for Spring unit test with Liquibase: No data in tables when running test
I have embedded H2 database for my Spring unit tests. The tables and data should be initialized with Liquibase. However, when a test is running, there are no data in the table.
I'm using Spring 4.2.1, ...
0
votes
0
answers
50
views
liquibase + Failed to load ApplicationContext
I'm developing a test for an application with many models some of them with relationships. Every time I try to run the test, it says "Failed to load ApplicationContext" error.
I have a ...
0
votes
1
answer
630
views
Liquibase is not taking the configurations from application.yml
I have a spring boot application. And I have configured liquibase to create tables. I have few issues though. The tables are not getting created inside the schema and in the location provided in ...
1
vote
0
answers
137
views
Integration test doesn't work with liquibase, throws: Failed load ApplicationContext
I wrote integration test but it doesn't work. It throws Failed load ApplicationContext. I think problem with liquibase but I hadn't fix that. Other tests are worked but it didn't.
My entity liquibase ...
0
votes
2
answers
723
views
How to create diff changelog file from JPA entities for different databases at the same time?
I want to create Liquibase changelog file based on differences between my database and my Hibernate entities for different database environments, therefore different datatypes in Oracle, SQL Server ...
1
vote
0
answers
176
views
Is it possible to execute same liquibase for 2 applications at same time
I have two applications needs to be deployed at same time. Both having some common code, which is in another repo. In that common repo i have liquibase file. When i start the applictaions with time ...
0
votes
2
answers
1k
views
How we can update table A column by table B column value using liquibase yml script
I want to update table A's name column with Table B's name column value where table B's id is present in table A.
I am trying this using the liquibase yml script but its not working.
databaseChangeLog:...
0
votes
1
answer
171
views
Move rows from one table to another liquibase
I need to drop one table, but before I need to move all the data that is in that table to another table with xml liquibase. I tried with update but it is giving ORA-00936: missing expression. Can ...
0
votes
1
answer
43
views
Liquibase hibernate sequence tabel dosen't exist
Table 'liquibase_db.hibernate_sequence' doesn't exist.So I am getting this type of error while I post data from the postman. I tried to solve that problem I tried to add hibernate sequence It's not ...
-1
votes
2
answers
68
views
Suggest any structure to maintain history tabel
Suggest any structure for below process.
If I update something in a table. before affecting the changes values to be stored in history table.
1
vote
0
answers
2k
views
How to get rid of Liquibase 4.0 error : Please use a relative path or add '/' to the classpath parameter
How to solve this error?
Specifying files by absolute path was removed in Liquibase 4.0. Please use a relative path or add '/' to the classpath parameter.
Suppose I don't have the liquibase installed....
1
vote
2
answers
635
views
JSONB usage with liquibase-hibernate5 not supported through liquibase maven plugin?
I am trying to get JSONB type working with liquibase-hibernate5 extension, but without any luck.
I am using liquibase core and the extension version 4.10.
I am using liquibase within Spring boot 2.5....
0
votes
1
answer
2k
views
What is the difference between liquibase and Hibernate?
How can I use both in same SpringBoot project? Will it not create conflict which one is going to create tables?
3
votes
0
answers
2k
views
Hibernate- Liquibase throwing exception : java.lang.UnsupportedOperationException: The application must supply JDBC connections
I am trying to generate changelog based on DB and Entity class
My Liquibase properties file is as follows
`url=jdbc:h2:mem:testdb
changeLogFile=classpath:/db/changelog/liquibase-changelog.xml
username=...
1
vote
0
answers
355
views
Create @GeneratedValue sequence in hibernate and liquibase
In liquibase I added a script for creating a database and also use in Java / Spring Entity with GeneratedValue and my SequenceGenerator. In the case of the script in liquibase, do I have to add the ...
0
votes
1
answer
767
views
Issue with "language" keyword, after upgrading h2 database to 2.1.210
I am currently working on spring boot jpa applicaiton. it used to work normally with h2 1.4.196.
After I upgrade to h2 to latest version(2.1.210). I am facing issues with the application.
I am facing ...
0
votes
1
answer
2k
views
Liquibase drop foreign key constraints issue
We have the foreign key set up on a table and would now like to delete them. In order to delete them, I have the following changeset
<changeSet author="me" id="drop-foreign-key-...
0
votes
0
answers
2k
views
Importing data from CSV using loadDate liquibase. Unknown columns creating an error
Let's say I have data.csv file with some data.
name, lastName, something, somethingElse
John, Doe , drinking , eating
I'm creating a table
<changeSet id="1" author="me&...
1
vote
0
answers
1k
views
mvn Liquibase:diff A required class was missing while executing org.liquibase:liquibase-maven-plugin:3.8.1:diff: javax/xml/bind/annotation/XmlSchema
I am trying to generate liquibase changelogs based on jpa entities using maven-hibernate-plugin so I can use the generated chagelogs to create my database. I followed the https://www.baeldung.com/...
4
votes
0
answers
405
views
Liquibase Hibernate missing SequenceStyleGenerator.generatorKey() error
I am trying to generate a diff changelog using Liquibase and Hibernate but when I run the command gradle diffChangeLog I get the following error:
ERROR [liquibase.integration.commandline.Main]: ...
0
votes
0
answers
341
views
When do liquibase changeSets get run in parallel?
Because of a service refactor I had a big liquibase migration running. Sadly, the migration ran into multiple deadlocks on the way even though the script on local and staging ran OK.
This lead me to ...
1
vote
0
answers
271
views
Liquibase PostgreSQL sequence re-generation
I migrated Liquibase from version 3 to 4.5 and Liquibase re-generates all existing sequences.
I have the following changeset in my main changelog
<changeSet author="radouane (generated)" ...
2
votes
2
answers
368
views
liquibase maven plugin UUID vs BINARY(255)
I use the liquibase-maven-plugin to generate the database migration scripts.
But liquibase generates the UUID id fields as BINARY(255).
This in itself is not a problem as the IDs for new entities are ...
0
votes
1
answer
676
views
Wrong encoding using liquibase and docker postgis/postgis
I have a very strange behaviors with my sprintboot project using a docker postgresql db postgis/postgis.
I create the docker container with the db with this docker file:
version: '3'
services:
...
1
vote
0
answers
323
views
Liquibase Maven Plugin Error: Provider liquibase.serializer.core.xml.XMLChangeLogSerializer could not be instantiated
I am having trouble getting my changelog to be compiled, due to Liquibase not being able to load the correct Serializer. Anyone know what the issue could be? Here is my config:
<groupId>org....
0
votes
1
answer
536
views
Liquibase generate migration for geometry type (Spring boot with JPA/Hibernate)
I am writing a RESTfull API with Spring boot using Maven Liquibase to manage migrations alongside MySQL 8 for the database.
I have searched online (1,2, 3) but Liquibase is still generating "...
0
votes
0
answers
48
views
Grails 4 - declare global sequence for database
I am currently using native SQL queries to create sequences and get sequence values in a Grails 4 web app. This normally doesn't cause much of an issue, but when I use the grails database migration ...
0
votes
1
answer
928
views
SQL script is not executed during startup
I want to run SQL script always when I start Spring boot application. I added this Liquibase configuration:
application.yml
spring:
datasource:
platform: org.hibernate.dialect....
1
vote
0
answers
193
views
Liquibase generates dropdefault change set when nothing has changed
I am trying to generate liquibase changeset programtically using liquibase and liquibase-hiberante using the code below
Class.forName("org.mariadb.jdbc.Driver");
Connection ...
1
vote
1
answer
868
views
Generate production sql from liquibase
I have used liquibase 3.8.9 version on my spring boot application for database versioning and now I need to generate an sql for the production environment (we cannot run liquibase from the app).
I ...