Latest Questions tagged Liquibase

Browse all latest questions tagged Liquibase

69
Votes
Published 27 Oct, 2022
Java - How to use different tablespaces for tables and indexes with liquibase in Java

I'm using liquibase (3.6.3) in Spring Boot (2.1.8) java (1.8) application for managing database (Oracle 12.2) schema changes. My liquibase changesets does not contain 'tablespace' params and all data...

10
Votes
Published 21 Aug, 2022
Java - how can I access system properties using spring boot and Liquibase changeset yaml file

A Spring Boot Java application using Liquibase to manage the database schema changes is started with a parameter (e.g. dev, int) specifying the environment it runs in. There are corresponding propert...

70
Votes
Published 10 Sep, 2022
Java - Why a liquibase migration works on mysql and not in h2

I'm creating a jhipster based project and I'm having some problems in integration tests. I've removed login column from t_user table and did some changes to use e-mail as login. The liquibase migratio...

68
Votes
Published 07 Sep, 2022
Java - 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 Liquib...

57
Votes
Published 05 Sep, 2022
Java - Use other spring beans in liquibase CustomTaskChange class

I need to do some data migration, which is too complex to do it in a liquibase changeset. We use spring That's why I wrote a class implementing the liquibase.change.custom.CustomTaskChange class. I t...

7
Votes
Published 29 Aug, 2022
Java - 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....

88
Votes
Published 25 Aug, 2022
Java - Java code changeset in liquibase

Is there a way in liquibase to create java code change set (i.e. provide a java class, which will receive a JDBC connection and will perform some changes in the database) ? (I know that flyway has su...

17
Votes
Published 25 Aug, 2022
Java - How to clean database tables after each integration test when using Spring Boot and Liquibase?

I have a side project were I'm using Spring Boot, Liquibase and Postgres. I have the following sequence of tests: test1(); test2(); test3(); test4(); In those four tests I'm creating the same entity....

44
Votes
Published 23 Aug, 2022
Java - Drop MySQL table using Liquibase

I am looking to drop a table in MySQL using Liquibase only if the table exists. I am not able to figure out how to check if a table exists in Liquibase.

102
Votes
Published 22 Aug, 2022
Java - Setup LiquiBase in a Gradle Spring Boot Hibernate project

I'm having a hard time setting up LiquiBase in my Spring Boot project. I tried looking through the docs and finding some guides - but they seem contradict each other :( I wish to use LiquiBase via Gr...

28
Votes
Published 21 Aug, 2022
Java - How to get liquibase to log using slf4j?

A lot of people are unsure how to fix logging for liquibase, either to the console or file. Is it possible to make liquibase log to slf4j?

69
Votes
Published 19 Aug, 2022
Java - How to generate liquibase changelog with insert statement?

I'm getting my hands on the Liquibase tool and I'd like to mimic working with an existing database. From the command line, I managed to generate the changelog. I was wondering whether it's possible to...

49
Votes
Published 19 Aug, 2022
Java - Liquibase: Incorrect syntax near ;

I am trying to deploy db changes using Liquibase and getting the below error on one of the stored procedure code. SET NOCOUNT ON: Incorrect syntax near 'ON'. at liquibase.executor.jvm.JdbcExecuto...

72
Votes
Published 16 Aug, 2022
Java - How to add new column with default value from existing column in Liquibase

I'm using Postgres DB and for migration I'm using Liquibase. I have an ORDERS table with the following columns: ID | DATE | NAME | CREATOR | ... I need to add a new column which will hold the user...

70
Votes
Published 15 Aug, 2022
Java - How to divide Liquibase package structure for dev and prod environment in Spring Boot?

My package structure is looks like: In /db.changelog/db.changelod-master.xml i include /db.changelog/v1/db.changelog-1.0.xml where i also include all changelogs from /db.changelog/v1/changeset pack...