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.
3,309
questions
0
votes
1
answer
16
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?
0
votes
0
answers
16
views
ClassNotFoundException: org.springframework.cloud.client.circuitbreaker.CircuitBreakerFactory
My app does not start because of a ClassNotFoundException error:
ClassNotFoundException: org.springframework.cloud.client.circuitbreaker.CircuitBreakerFactory
I couldn't find anything like this online....
0
votes
1
answer
30
views
Maven Execution of Liquibase
I am executing liquibase through Maven like mvn liquibase:update and as you can see I am getting output in the console
[INFO] Scanning for projects...
[INFO]
[INFO] -------< ...
0
votes
0
answers
38
views
How to run liquibase scripts before bootstrap context?
Good day, everyone!
The problem is:
I have Spring Cloud Config Server with that bootstrap.yaml
spring:
application:
name: config-server
cloud:
config:
server:
bootstrap: true
...
0
votes
0
answers
49
views
Liquibase ERROR: relation "databasechangeloglock" already exists
While running Liquibase migration, the docker container is returning the following error:
Unexpected error running Liquibase: ERROR: relation
"databasechangeloglock" already exists [Failed ...
0
votes
1
answer
37
views
Liquibase : Expected something between the "TABLE" keyword and the "IF" keyword
I am trying to run the below sql by liquibase and I am getting an error expected something between "TABLE" and the keyword "IF" keyword .This is for teradata database
CREATE ...
0
votes
1
answer
11
views
liquibase.exception.DatabaseException: ORA-01950: no privileges on tablespace 'VMSS_TBS'
Initially I was getting this exception while starting my service
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework....
1
vote
0
answers
15
views
How to reference the default schema in liquibase preCondition sqlCheck
Posting here in case it helps someone.
TLDR: ${database.defaultSchemaName} within sqlCheck to access default schema name
I wanted my database changeset to first check if a certain row is present in ...
1
vote
1
answer
37
views
how disable liquibase in jhipster 7.7.0
I'd like to know how can I temporarily disable Liquibase in JHipster 7.7.0 there is a similar question here I tried this suggested solution but it shows this error
org.springframework.boot.context....
2
votes
1
answer
30
views
Liquibase looks for a strange path, when loading data from csv and throws an error
Liquibase version: 4.7
The path that liquibase is looking for is a combination between the changeset path and the csv content.
Error message
Caused by: liquibase.exception.MigrationFailedException: ...
0
votes
1
answer
13
views
Liquibase context in changeset
The text below is from liquibase's contexts page https://docs.liquibase.com/concepts/changelogs/attributes/contexts.html
By default, a database update runs all changesets in the changelog,
regardless ...
0
votes
0
answers
33
views
Null pointer exception in Liquibase core
I am getting a null pointer issue in liquibase core. It started in 3.7.x onward. My code is working fine with 3.6.3 core jar. I was trying to create table in oracle DB by comparing change logs.
Caused ...
0
votes
1
answer
21
views
SpringLiquibase with Liquibase 4 and FileSystemResourceLoader
I'm currently facing a problem.
My project looks like this :
Project
|_ module 1
|_ liquibase
|_ migration.xml
|_ file1.xml
|_ src
|_ main
|_ java
|_ ...
1
vote
1
answer
40
views
"Constraint already exists" when using H2 with liquibase
I'm using H2 as a test db, and Liquibase to initialize it. After the first few changelogs, I've got an error.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '...
1
vote
1
answer
29
views
Is it possible to automatically generate migration scripts by comparing db and code?
I’m seriously confused about how flyway generally works to maintain the db as a code. Suppose I have the following V0 script:
Create table student(
Name varchar(25)
)
That would be my initial db. ...
0
votes
0
answers
17
views
How to create Liquibase changeset for below Postgres index creation statement - "using btree"
create index if not exists department_index
on department using btree (department_id);
How can I create a Liquibase changeset for the above Postgresql? I have to use "using btree" ...
0
votes
1
answer
24
views
How to create Liquibase changeset for below Postgres index creation statement - concat 2 columns in index
create index if not exists employee_index
on employee(emp_id, (emp_first_name|| ' ' ||emp_last_name));
I'm able to use the above statement in Postgres, I want to have it in my Liquibase changeset....
0
votes
1
answer
12
views
Liquibase transaction rollback vs <rollback> tag
I learned that Liquibase runs each changeSet in a transaction and commits it after inserting into the DATABASECHANGELOG table.
If something goes wrong during the changeSet, the transaction gets rolled ...
1
vote
0
answers
28
views
Liquibase - Create index not creating
I am trying to use the following Liquibase change sets to create indexes for my Postgres database table:
<changeSet author="xxxx" id="1120-000-1-index1">
<createIndex ...
0
votes
1
answer
21
views
Liquibase exclude any changesets without a label
Is it possible to prevent changesets without a label from being deployed?
We want to deploy our changesets based on feature/ticket using liquibase labels. However, we have a lot of existing changesets ...
1
vote
1
answer
48
views
liquibase.exception.DatabaseException: org.h2.jdbc.JdbcBatchUpdateException: Cannot parse "DATE" constant "DATEADD(DAY,-2,CURDATE())
after upgrading to liquibase 3.9.0 and h2 1.4.200, I'm receiving this error message when trying to load data from a csv file. Reason: liquibase.exception.DatabaseException: org.h2.jdbc....
1
vote
1
answer
22
views
Nesting one-to-one relationship in already owned entity
I'm working on a project with multiple user data mapped to a user by one-to-one relationships in the entities. I'm in the process of adding another entity which has a one-to-one relationship with ...
0
votes
0
answers
36
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
1
answer
21
views
LiquiBase changeset: how do build a where clause based on ANOTHER table's column
Building upon the question How to build a WHERE-clause in a LiquiBase changeset, I would like to choose the default value of a column based on the value of a column from a different table.
For ...
-1
votes
0
answers
41
views
How to handle data in development, staging and production databases?
If you have a local database, Staging/UAT database, Production database
1)Say 10 developers have the database script to generate the database (I'm using liquibase), how can the devs fill their local ...
0
votes
1
answer
19
views
liquibase sql migration issue
I am writing 1 PostgreSQL function for some operation.
Writing SQL migration for that function but facing formatting error as liquibase is not able to recognize some portion.
Function Liquibase ...
1
vote
0
answers
53
views
ERROR: column "student_id_list" is of type integer but expression is of type bytea
I'm using liquibase changelog.xml to update my postgre database by adding a column containing arrays of student ids. However I keep encountering this error in my logs :
ERROR: column "...
0
votes
0
answers
23
views
Liquebase not working after upgrade spring boot to 2.5.12
When I upgrade the MS based on spring boot from 2.4.12 to 2.5.12
The liquebase stopped working.
How to fix it ?
0
votes
1
answer
27
views
Liquibase insert select where not exists
I want to insert into table1 multiple rows from table2. The problem is that I have a field of same name in table2 and table1 and I don't want to insert data if there's already a record with same value ...
0
votes
1
answer
23
views
Liquibase insert select multiple rows postgres
I want to insert into table1 multiple rows from table2. The problem is that I have some fields in table1 that I want to compute, and some rows that I want to select from table2. For example something ...
1
vote
2
answers
37
views
liquibase update data based on existing column
Here, I am new to liquibase and I have a scenario where I need to add a new column to the existing table and have the value of this column based on existing column. However I was able to add column ...
1
vote
1
answer
32
views
Using Liquibase to populate data with ORM
I am currently using Liquibase to create the database schema. It's a spring boot application that uses hibernate ORM.
Liquibase is changing the database schema at the beginning of application startup, ...
1
vote
0
answers
19
views
How to update a Swagger UI after a Liquibase Changelog was done
I use springdoc-openapi-ui in my demo spring boot project. To play around with Liquibase, I created a dummy Entity
@Entity
@Table
public class DummyEntity {
// with field "dummyNumber"
// ...
0
votes
1
answer
32
views
Liquibase. generate-changelog doesn't create script of function creation
I'm trying to execute command
liquibase generate-changelog --changelog-file=baseline.postgresql.sql --diffTypes=functions
on free version of liquibase (parameters of connection to a database are in ...
0
votes
1
answer
16
views
Missing table [rev_info] after bump liquibase version, spring data envers
I have problem with my project after bump liquibase version to 4.9.1.
There is error:
BeanCreationException: Error creating bean with name
'entityManagerFactory' defined in class path resource
[org/...
0
votes
1
answer
22
views
Liquibase insert from old database into new schema
I have a database user with access to 2 schemas, oldDb and newDb and I want to select everything from oldDb.users table and insert them into newDb.users using Liquibase.
I want to be able to not to ...
0
votes
2
answers
43
views
Liquibase causes "could not prepare statement; SQL" only with H2
I integrated Liquibase in my Spring Boot application. Using it with MariaDB works fine.
For unit & integration testing I use a H2 in-memory database. While running tests it causes following ...
0
votes
2
answers
48
views
How to use postgres database when generate jooq by LiquibaseDatabase
There is pretty good guide how to use code generation from liquibase
However by default it uses h2 database to create schema from migrations and then generate records. How to specify another database ...
0
votes
0
answers
30
views
liquidbase createSequence and add to ID column with jdbi
I use OracleDb and JDBI and i'm trying to create autoincrement id column. I don't want to use autoIncrement = true only:
<changeSet id="createSequence" author="me">
&...
0
votes
1
answer
47
views
Maven mvn install doesn't run liquibase scripts
everyone! I faced with a problem. I have SpringBoot app with Spring JDBC and liquibase.
When I do mvn install my tests failed because, liquibase doesn't run. What is a problem?
Liquibase work ...
0
votes
1
answer
28
views
How to handle changed database structures in Liquibase when switching between Git branches
Imagine I have a USER MySql table with the rows id, name, email, address in the 'main' Git branch. I create a new feature branch and decide the 'address' column needs to be removed from the USER table ...
1
vote
0
answers
43
views
How to add a generated column to a PostgreSQL table with Liquibase?
I'd like to add a generated column https://www.postgresql.org/docs/current/ddl-generated-columns.html to my PostgreSQL table with Liquibase. I've tried everything that came to my mind, even something ...
1
vote
1
answer
22
views
Liquibase: hide author from ChangeSet logging
Is there a way to hide the author from the logs? I want the logs to include the ChangeSet details but not the author so that we are not leaking developer information in customer environments.
0
votes
1
answer
27
views
SpringBoot Liquibase Oracle Junit test case execution fails
I have a SpringBoot application in which i use Liquibase to generate oracle schema and tables.
When i run the application, it runs fine.
But when i try to run the Junit test case, it fails with below ...
2
votes
0
answers
44
views
Liquibase precondition sql check returns incorrect result
I've been struggling to troubleshoot and fix this problem for few days now. The liquibase changeset are not running due to sql check.
-- changeset ryanjan:1 context:staging
-- preconditions onFail:...
1
vote
2
answers
68
views
LIQUIBASE - Cannot pass command with “-” sign in liquibase command line
I’m new to liquibase, just started to research on it for 1 week, and i’m having an issue that really need you guys help
I’m trying to use command with “-” sign such as “rollback-count” or “update-to-...
-1
votes
1
answer
67
views
How to fix ValidationFailedException in liquibase checksum?
I am using liquibase with spring boot. I am having SQL changesets. I have not changed anything in the liquibase SQL scripts. but I am getting below error
Error creating bean with name 'liquibase' ...
0
votes
1
answer
47
views
liquibase with postgres throws ERROR: column am.amcanorder on index exists precondition
liquibase : 4.9.0
postgres driver: 42.3.4, 42.3.3
postgres server: 13, 14
liquibase precondition:
<changeSet id="metrics_indexes_v1" author="jim.hunter" dbms="...
0
votes
1
answer
50
views
How to fix Possibly the wrong driver for the given database URL for liquibase
I have a jhipster generated database, where I am trying to run this command:
mvn liquibase:diff
But right now I am getting the following error:
Failed to execute goal org.liquibase:liquibase-maven-...
0
votes
1
answer
32
views
Spring boot r2dbc and jdbc Liquibase does not update on application start
I want my application to use r2dbc drive when running and jdbc to handle the database with Liquibase. I have this as a reference. It is possible by adding the correct configuration inside application....