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
36
votes
3 answers

How to work with liquibase, a concrete example

Following the quickstart on liquibase i've created a changeset (very dumb :) ) Code:
apelliciari
  • 8,241
  • 9
  • 57
  • 92
35
votes
8 answers

Liquibase error [Postgresql]: unterminated dollar-quoted string at or near "$BODY$

Liquibase error: unterminated dollar-quoted string at or near "$BODY$` Chaneg log xml has one entry: see below include file="/home/dev/....../admin_script.sql" content of the file: ............... CREATE OR REPLACE FUNCTION…
Vibin
  • 489
  • 1
  • 5
  • 10
34
votes
2 answers

Flyway and liquibase together?

I've looked at both Liquibase and Flyway individually and on an individual comparison alone, Liquibase seems like the better tool for our needs. Some sources mention using both Liquibase and Flyway together. Liquibase seems to have everything Flyway…
Slayer0248
  • 1,231
  • 3
  • 15
  • 26
34
votes
4 answers

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?
Benny Bottema
  • 11,111
  • 10
  • 71
  • 96
33
votes
1 answer

Liquibase - disable checksum?

How can I disable checksum validation in Liquibase? It looks like Liquibase does not provide such feature. Would it be hard to modify Liquibase to achieve that? Your opinion, please.
anton1980
  • 979
  • 3
  • 10
  • 20
33
votes
1 answer

Using liquibase on the existing database

We have a existing database in production. We have decided to use liquibase for all further updates and create any new database (like development or integration). We have created liquibase scripts based on the existing production schema (to create…
yottabrain
  • 2,387
  • 5
  • 23
  • 37
32
votes
6 answers

LiquiBase problem , class path resource [db/changelog/db.changelog-master.yaml] cannot be resolved to URL because it does not exist

I am having a problem integrating liquibase with springboot. I have added the liquibase dependency in the pom file like below: org.springframework.boot
user12827457
28
votes
3 answers

How to tag a changeset in liquibase to rollback

I have configured the maven pluggin for liquibase as specified in maven configuration. Now created a changeset like :-
Manu
  • 3,467
  • 3
  • 29
  • 28
27
votes
7 answers

Liquibase - insert rows with uuid

I have two tables declared as follows:
Farkas István
  • 504
  • 2
  • 5
  • 15
27
votes
3 answers

Spring Boot: How to setup test data with liquibase in unit test

I'm trying to setup the database schema and some test data with liquibase for some tests. Each test has a separate changelog which setup the schema and some specific data for the test. In order to make my tests working, I need to drop the schema…
René Winkler
  • 6,508
  • 7
  • 42
  • 69
27
votes
3 answers

When creating a column using liquibase, how do I specify a value for that column based on an existing column?

I have an existing mysql table with two columns a and b. I now want to add a column c to that table. c should be nullable, should have a default value of NULL, except in those rows where column b has the value 10. Where b has the value 10, c…
Aml
  • 301
  • 1
  • 3
  • 6
25
votes
4 answers

Update type of a column in liquibase

I want to update the type of a column named "password". At the moment it has type NVARCHAR(40) and I want it to be of type NVARCHAR(64). This is what I did:
Chris311
  • 3,794
  • 9
  • 46
  • 80
25
votes
2 answers

Inserting lots of values (with FK's) into database using LiquiBase and Spring

I'm trying to add a lot of records (currently located in an Excel file) into my DB using Liquibase (so that I know how to do it for future DB changes) My idea was to read the excel file using Java, and then fill the ChangeLogParameters from my…
Gonçalo Cardoso
  • 2,253
  • 4
  • 34
  • 63
24
votes
6 answers

Spring Boot: run liquibase migrations without starting app

In Spring Boot, the documentation seems to encourage running migrations on app startup. This is fine, but sometimes app startup may have side effects / dependencies that I don't want to bother with - I just want to run the migrations on their own.…
davnicwil
  • 28,487
  • 16
  • 107
  • 123
24
votes
4 answers

Liquibase inserting into BIT column, MySQL, data too long for column

In Liquibase, I define a table with a column of type BIT(1)
dustin.schultz
  • 13,076
  • 7
  • 54
  • 63