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.

Liquibase Supports:

  • Extensibility
  • Merging changes from multiple developers
  • Code branches
  • Multiple Databases
  • Managing production data as well as various test datasets
  • Cluster-safe database upgrades
  • Automated updates or generation of SQL scripts that can be approved and applied by a DBA
  • Update rollbacks
  • Database ”diff“s
  • Generating starting change logs from existing databases
  • Generating database change documentation

Resources

3764 questions
1
vote
1 answer

Liquibase Changeset without precondition

What will happen when we did not add precondition in a changeset and run it twice? Will it be marked ran by default? For example, this is changeset: DO $$ BEGIN CREATE TYPE…
1
vote
1 answer

Getting error on dropping the unique constraint column of a table in liquibase

Getting this error when i tried to delete app_user_id column. I did remove the foreign key relation of app_user_id table. But idk why I am getting this only on running a test case. stackTrace SEVERE 2/5/20 2:25 PM: liquibase:…
1
vote
1 answer

How to do database schema testing across distinct applications that share the same schema

I have a situation where I have two SpringBoot microservices which share the same database schema. The schema is maintained by a liquibase changelog file. One service reads from the database, and the other service is responsible for writing to the…
FlatPenguin
  • 121
  • 1
  • 13
1
vote
0 answers

Liquibase Generating a / (slash) before a SQL

I have a need to generate a / (slash) before a SQL file. The XML code is shown as below : SELECT 1 FROM DUAL; What I need is to have the output as follows: ( notice the / (slash) ): …
oradbanj
  • 551
  • 7
  • 23
1
vote
1 answer

Liquibase Gradle Plugin is dropping hibernate sequence table on generated changelog

I'm trying to set up the liquibase gradle plugin to generate my changelogs automatically. I have managed to run the plugin and obtain a changelog but the log being generated contains several problems. The main problem that I'm having is that the…
1
vote
2 answers

Liquibase ChangeLog and LogLock table creation on Later stage without failing already executed scripts

I have one micro-service running from long however few days back we realised that custom changelog and changeloglock tables were defined incorrectly. See below... spring: liquibase: abc: change-log:…
Kunal Vohra
  • 2,703
  • 2
  • 15
  • 33
1
vote
1 answer

How to update old database schema to new one in Java with liquibase

Me and my team have worked on a project separately from other team. That team worked for 2 years on this project and now they are leaving, leaving us the entire project and in the past 2 months we had to learn about the project and add some features…
1
vote
0 answers

Liquibase diffChangelog does not generate rollback

If I haven't misunderstood anything, the liquibase command diffChangelog should be able to generate rollback change sets for some types of change sets like create table, rename column or add column but it is not working for me using the liquibase…
Fran García
  • 2,011
  • 16
  • 24
1
vote
0 answers

Multi module liquibase project

I have a multi module spring boot application backed by maven. There is a parent pom.xml which defines all the dependencies. There are 2 modules A and B. Module B is dependent on module A. Both the modules are spring applications and I have…
1
vote
1 answer

Two conditions in where tag of Liquibase

I want to add two conditions in where tag of liquibase and exception is thrown: Reason: liquibase.exception.DatabaseException: Unknown column 'uid' in 'where clause' [Failed SQL: UPDATE kw.media_file SET created = '1586352959' WHERE id=1 AND…
Doston
  • 579
  • 6
  • 15
1
vote
1 answer

Tests not working for multiple datasource with spring boot liquibase

I am creating unittesting for spring boot application having multiple datasources. (Configuration is heavily inspired from this answer) @Configuration public class DatasourceConfig { @Primary @Bean @ConfigurationProperties(prefix =…
Akshay
  • 3,558
  • 4
  • 43
  • 77
1
vote
1 answer

DataJpaTest with with liquibase on MySQL TestContainer

Is it possible to set up a Spring @DataJpaTest that uses liquibase with a temporary MySQL (so we can use the MySQL specific functions and syntax). I was thinking that to do this, I'd have to use testcontainers to create a temporary MySQL instance…
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
1
vote
1 answer

sql syntax error with liquibase using join tables

I am using liquibase, and I have a sql script: update edi_file_steps fs INNER JOIN GU_User u on u.login = SUBSTRING(fs.message, …
Aymen Ragoubi
  • 298
  • 5
  • 22
1
vote
0 answers

Is there any framework to verify the DDL script (CREATE and ALTER) generated by Liquibase (in offline mode) using the ORM xml?

I am successful in generating the DDL script for my jpa entity using Liquibase (in offline mode and I am only generating it and not applying it to any database). I have my hibernate orm.xml for my jpa entity which has the information about my entity…
JITHIN_PATHROSE
  • 1,134
  • 4
  • 14
  • 29
1
vote
0 answers

Liquibase diff does not work for @SecondaryTable

If I add to my spring-boot / hibernate app an entity with secondary table, defined e.g. like this (taken from https://www.baeldung.com/jpa-mapping-single-entity-to-multiple-tables): @Entity @Table(name = "meal") @SecondaryTable(name = "allergens",…