Questions tagged [liquibase]

Liquibase is an open source, database-independent library for tracking, managing and applying database changes. It is built on a simple premise: All database changes are stored in a human readable yet trackable form and checked into source control.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Dropwizard Migrations DB Dump permission denied

I'm trying to add dropwizard-migrations to an existing project. It is already using dropwizard-hibernate for the database. I attempted a "db dump" as suggested by the documentation, and got ...
EMS's user avatar
  • 188
0 votes
0 answers
23 views

How can I verify that a script that works in a SQL editor (DBeaver) will not run into syntax errors in Liquibase?

Running into this constantly over the past few days: edit a file in DBeaver execute the code rollback the change (truncate/drop etc) run the change with Liquibase Result: some variation on "...
jcollum's user avatar
  • 43.7k
-1 votes
0 answers
10 views

Getting an error while deploying database objects through liquibase

I am using liquibase agent version 3.4.1, while deploying the database objects I am getting an error message Unexpected error running Liquibase: Validation Failed: 2 change sets check sum and SEVERE ...
Wen's user avatar
  • 45
0 votes
0 answers
15 views

How do you create a function in Liquibase + Postgres with a SQL file and JSON config?

Related, didn't fix: Liquibase error [Postgresql]: unterminated dollar-quoted string at or near "$BODY$ Create Procedure Liquibase https://docs.liquibase.com/change-types/create-procedure.html My ...
jcollum's user avatar
  • 43.7k
0 votes
1 answer
19 views

preliquibase-spring-boot-starter throwing error when application starting up

I am trying to utilise the pre script (create schema) before starting my application. However im getting the following error: spring boot version 2.7.15 liquibase 4.9.0 pre-liquibase 1.4.0 Caused by: ...
user1555190's user avatar
  • 2,815
0 votes
1 answer
17 views

Liquibase LoadData where Computed value fails

I have a Liqiuibase changeset that uses a CSV file to load data, with the data being computed as the result of a SELECT from other tables. I am finding that if the other data exists it all works fine, ...
Steve Davis's user avatar
0 votes
1 answer
23 views

Why is liquibase unable to connect on a Spring Boot app running in bootRun with Docker Compose?

I have a non-trivial app that I want to incorporate liquibase, r2dbc and mysql. But when I tried to add what I think is minimal I get the following problem. Caused by: java.sql.SQLException: Access ...
Archimedes Trajano's user avatar
0 votes
0 answers
19 views

liquibase-maven-plugin error jakarta/validation/ValidatorFactory when I use liquibase:diff

I'm integrating liquibase-maven-plugin into my spring boot project. I can use the plugin for mvn liquibase:update and mvn liquibase:dropAll work correctly. But when I try to use the mvn liquibase:diff ...
dnlnfr's user avatar
  • 47
0 votes
1 answer
14 views

How to export Keycloak database SQL schema

we are looking to set up Keycloak using Liquibase to define its database schema. Our goal is to prevent Keycloak from directly executing any SQL commands during its startup process. Instead, we only ...
Andreascopp's user avatar
-1 votes
0 answers
13 views

liquibase-"Debugging in the source code results in a NullPointerException."

I’m a beginner. I encountered an error while debugging the Liquibase source code. Below is the code I’m debugging and the exception message. Can any experts help me out? @Test public void ...
windsor's user avatar
0 votes
0 answers
26 views

In-memory H2 be used with both R2DBC and JDBC?

I'm trying to do a simple test app that uses in memory H2 like this. I need the "datasource" t spring: liquibase: url: jdbc:h2:mem:///testdb user: sa password: "" ...
Archimedes Trajano's user avatar
0 votes
0 answers
20 views

How to generate a diff from 2 databases using mvn liquibase?

I have two separate databases runninng on port 3306; jdbc:mysql://localhost:3306/a jdbc:mysql://localhost:3306/b Basically B is an updated version of A. I've been trying to generate the diff from ...
Brik000's user avatar
  • 56
1 vote
0 answers
16 views

Why liquibase thru docker-compose keeps throwing: changelog.yaml: No such file or directory?

I'm trying to implement liquibase in my Docker-compose file: version: '3' services: app: image: data-service:dev container_name: data-service environment: - MONGO_DB=mongodb://user:...
Miguel Jasso's user avatar
1 vote
1 answer
20 views

Liquibase: difference between 'initiallyDeferred' and 'deferrable'

I understand why the deferred parameter is needed, but the presence of two parameters 'initiallyDeferred' and 'deferrable' in the liquidbase script is a little confusing, I can’t find anything ...
SP QRT's user avatar
  • 105
0 votes
0 answers
15 views

Liquibase connection could not be created to Database

Liquibase is unable to connect to the database, when I am running liquibase against my database, I get the following error: liquibase_1 | Starting Liquibase at 21:40:22 (version 4.23.1 #12042 built ...
Mabel Oza's user avatar
  • 567
1 vote
0 answers
33 views

Liquibase Gradle Plugin: Unexpected error running Liquibase: Unknown option: 'log-level'

I have problems when upgrading from org.liquibase.gradle version 2.1.1 to 2.2.0. I both cases I use org.liquibase:liquibase-core:4.23.1. With Gradle plugin version 2.1.1 version everything works fine (...
FrankS77's user avatar
  • 281
0 votes
0 answers
20 views

Kotlin + SpringBoot + MYSQL8+ Liquibase Migration Issue

im facing below issue my db configuration is as below url: jdbc:mysql://localhost:20307/test?useSSL=false&allowPublicKeyRetrieval=true&requireSSL=true&verifyServerCertificate=true}&...
Prashanth P's user avatar
1 vote
2 answers
76 views

Share database with several microservices which use liquibase

I have to migrate old Spring Boot microservices whiten in 2015 which are using liquibase with Oracle database. So far from what I found all microservices use the same database url. This means only one ...
Peter Penzov's user avatar
  • 1,188
0 votes
0 answers
17 views

How to Manage Liquibase Database Rollbacks When Using Git Reset?

I am working on a project where we use Liquibase for database migrations, and our codebase is version-controlled with Git. Occasionally, I need to perform a git reset to undo some commits. However, I'...
Hosni Bounechada's user avatar
0 votes
1 answer
8 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 ...
Mehdi Rahimi's user avatar
  • 1,463
-1 votes
0 answers
19 views

How to copy a table via liquibase tags?

I am trying to insert a column in an existing table via db-changelog <changeSet id="set1" author="an"> <sql> CREATE TABLE temp AS TABLE original WITH DATA; ...
Артём Смирнов's user avatar
0 votes
1 answer
27 views

I'm trying to delete a score from my database table, but database isn't updating

I'm writing a java spring boot backend with a method submitAnswers which takes in a JSON array of key-value pairs representing question and answer keys to a personality quiz, and assigns a full ...
Jasmine's user avatar
  • 21
1 vote
1 answer
16 views

Update existing IDs of changesets

I have to update IDs in all changesets to follow the convention of naming. What is a correct sequence of doing that? Update DATABASECHANGELOG table with new IDs Update XML with changesets with new ...
tomasz-mer's user avatar
  • 3,795
0 votes
0 answers
41 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 ...
Mehdi Rahimi's user avatar
  • 1,463
0 votes
0 answers
17 views

how can I exclude ddl excution in liquibase

I have a problem, I need exclude ddl execution in liquibase but I do not how I can do. I did to laboratory in maven with java but it dones't work in this case with is liquibase normal therefore I ...
Maikol Cucunuba's user avatar
1 vote
1 answer
44 views

How to modify datatype from BIGSERIAL to String?

I'm try to execute this sql: ALTER TABLE a_table ALTER COLUMN a_id TYPE VARCHAR(255) USING (a_id::VARCHAR(255)) where a_id is BIGSERIAL, but getting error: ERROR: identity column type can only be ...
AbrA's user avatar
  • 444
-2 votes
1 answer
29 views

How to write a custom checkstyle check to verify content of XML file?

I'm wondering is it posssible to write a custom checkstyle check that checks a file other then java source? For instance from src/main/resources? fiels like a liquibase changeset (it is a XML file)? *...
tomasz-mer's user avatar
  • 3,795
0 votes
0 answers
20 views

Liquibase createTable not creating primary Key

I am using MySQL, using Liquibase (Liquibase Version: 4.23.1), I am generating a table in the changeset and in another changeset, I am using precondition to check if the primary key exists and then ...
shrikant.sharma's user avatar
0 votes
0 answers
31 views

Liquibase+k8s init container automation for new DDL and DML

As Liquibase team has provided the solution of liquibase + k8s init container. This would solve problem: in a cluster environment, apps may not able to start up because of the changeloglock. The ...
James Winnchester's user avatar
0 votes
1 answer
22 views

Liquibase CONSTRAINT for NotNull values

ALTER TABLE apple_member ADD CONSTRAINT uc_banana_member UNIQUE (banana_id, apple_id) WHERE banana_id IS NOT NULL I want to add unique constraint only for not null values but i get syntax error: ...
Alper Arslan's user avatar
0 votes
1 answer
76 views

Running Liquibase 4 with Gradle 8 causes error could not find method getMain() for arguments []

I'm setting a Spring Boot 3 project with Liquibase 4 and Gradle 8 and no matter what I try in terms of configuring Liquibase in my build.gradle I always get the following error when running any of the ...
Favna's user avatar
  • 302
0 votes
0 answers
31 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 ...
Mr Owl's user avatar
  • 11
0 votes
0 answers
56 views

GitHub actions Liquibase update with port forwarding

I'm trying to run a Liquibase update (https://github.com/liquibase-github-actions/update) against my database from a GitHub workflow. The database is an AWS RDS Postgres instance in a private subnet ...
user2691402's user avatar
0 votes
3 answers
42 views

Liquibase / Long running DB scripts

Using Spring Boot and managing database changes by Liquibase all changes are executed on application start. This is totally fine for fast running changes. Some changes, e.g. adding DB index, can run ...
lunanigra's user avatar
0 votes
1 answer
57 views

Using SQL sequences

How can I put sql sequences like the one below into liquibase changelog file (xml)? Is it even possible? CREATE SEQUENCE sequence_option_1 START WITH COALESCE((SELECT MAX(id) FROM entity WHERE source =...
xMann999's user avatar
0 votes
2 answers
42 views

How to check if database Sequencer is in sync with the highest current value in the database records

I need to determine if the current value of a Sequencer is in sync with the highest value of a specific ID column. For example: Records | ID ------------- record1 1 record2 2 record3 7 record4 ...
Achiral's user avatar
  • 47
0 votes
0 answers
47 views

Scheduling pg_cron in PostgreSQL using liquiBase

I am trying to schedule pg_cron job using liquiBase, script is marked as EXECUTED in DATABASECHANGELOG, however, in CRON.JOB table there are no jobs added. Part of data: liquibase.properties: |- ...
Kropek's user avatar
  • 31
0 votes
0 answers
18 views

Can run liquibase rollback using command line out project path or using spring boot jar without unzip?

I'm trying to run liquibase from spring boot jar unzip using maven command to get the liquibase maven plugin for example my jar like this xyz.jar and run this jar like this java -jar xyz.jar now i ...
Ahmed Essam's user avatar
0 votes
0 answers
18 views

Liquibase error IDENTITY_INSERT is set to OFF

I am using Liquibase tool for database migration from one database(MSSQL) to other database(MSSQL). I am able to generate change xml file using generateChangeLog command which has create and insert ...
Sohan Badaya's user avatar
0 votes
0 answers
19 views

Junit test with two database schemas set up with liquibase

I need to write a JUnit Test, which tests reading from one database schema and writing to another. I have liquibase changelogs from two applications which own their respective database schemas, to ...
dschulten's user avatar
  • 2,994
1 vote
2 answers
54 views

Dockerized Liquibase cannot connect to Dockerized Scylladb, getting "DatabaseException: Connection could not be created"

I'm working with liquibase migration tool, it is working fine through terminal (update the table in scylla db). Now I want to dockerize it, for this I do the following steps: Create liquibase....
Asif's user avatar
  • 313
0 votes
0 answers
20 views

Liquibase Deployment - SQL Alchemy psycopg2 plugin error

We have a shell script that runs a liquibase deployment. This deployment script has been running with no issues for years on our ubuntu box. We have migrated over to Windows running through a ...
professionalNoob's user avatar
0 votes
0 answers
25 views

Remove schema name prefix in the output sql of liquibase updateSQL

I use liquibase version 4.23.1 together with the plugin 2.2.0 for gradle 7.6.1 When running the updateSQL task, the generated sql statements include the user or schema name used (MYSCHEMA): `CREATE ...
Sergio Sánchez Alvarez's user avatar
0 votes
0 answers
35 views

Primary key with multiple columns, with one being auto-incremental

I'm trying to alter a table as to add another newly created column being part of the already existing primary key (that includes multiple columns) and this newly created column (id) should auto-...
Francis Ducharme's user avatar
0 votes
1 answer
42 views

Liquibase - permissions issue when creating log and lock tables

I am adding Liquibase support to the existing project. When I ran changelog-sync-sql operation, all SQL queries were generated correctly. I checked them and wanted to execute. So, I tried to run ...
rabbitvirus's user avatar
-2 votes
1 answer
132 views

Caused by: org.postgresql.util.PSQLException: ERROR: no schema has been selected to create in

I created a new database scheme using PgAdmin. But when I start Spring Boot application with Liqudbase dependency I get this error: Caused by: liquibase.exception.DatabaseException: ERROR: no schema ...
Peter Penzov's user avatar
  • 1,188
1 vote
1 answer
26 views

Tidy up Liquibase scripts

I have a lot of already applied liquibase scripts in one single changelogs directory. The problem is that the directory has got too big. So i'd like to create a bunch of subdirectories in vein like ...
Žeka Koževin's user avatar
0 votes
1 answer
50 views

Liquibase executes migration after tests execution

I have very strange (for me) problem with testing my application, receiving this exception: Caused by: liquibase.exception.MigrationFailedException: Migration failed for changeset db/changelog/inserts/...
Jakub Kołacz's user avatar
0 votes
0 answers
51 views

Liquibase finds the file but i still get not found exception

I try to load some data from csv file to the DB. <changeSet id="Load data from CSV file Service" author="apal" > <loadData tableName="service" file=&...
Andor Pál's user avatar
0 votes
0 answers
55 views

Liquibase Upgrade Causes Certain Changesets to Rerun

Upgrading from Liquibase 4.4.2 to 4.23.0 (I know, shame on us for the lag) causes certain changesets to rerun in our existing databases. We then tried all of the versions from 4.23.0 down to 4.19.1 ...
DDirkson's user avatar

1
2 3 4 5
76