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

2984 questions
309
votes
9 answers

Liquibase lock - reasons?

I get this when running a lot of liquibase-scripts against a Oracle-server. SomeComputer is me. Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog…
Peter Isberg
  • 4,582
  • 2
  • 19
  • 32
105
votes
6 answers

Why and when Liquibase?

I have searched for this answer on stack overflow, but I couldn't find any questions on this. I am new to Liquibase and want to learn Why Liquibase? When exactly one should use Liquibase in the project? I know that this is to keep all database…
SSC
  • 2,796
  • 3
  • 24
  • 42
93
votes
4 answers

List all liquibase sql types

I try to find documentation on the supported types that can be used in change log files. But cannot find it. Is there any document, site or something similar where I can find all types-specific issues. For example clob type is supported in databases…
Alexandr
  • 8,399
  • 11
  • 54
  • 92
53
votes
3 answers

Liquibase: How to Set Foreign Key(s) Constraint in Column Tag?

How can I configure foreign keys through column tag attributes foreignKeyName and references? The only example I've found demonstrates how to add foreign keys after the fact.
Ari
  • 3,671
  • 8
  • 31
  • 51
52
votes
8 answers

Liquibase checksum validation error without any changes

Maven fires liquibase validation fail even no changes was made in changeset. My database is oracle. Situation: In DB changelog table was record for changeset ; Then by mistake i added another changeset…
Daggeto
  • 763
  • 1
  • 7
  • 16
51
votes
1 answer

How can I force Liquibase to recalculate checksums without re-running the statements?

We're using Liquibase 3.2 with Java 6. Is there a way I can force Liquibase to recalculate checksums without re-running the same statements from our Liquibase files? In our database, I run this ... update DATABASECHANGELOG set md5sum = null where…
Dave A
  • 2,490
  • 9
  • 36
  • 54
51
votes
2 answers

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 such feature)
Pavel Bernshtam
  • 3,634
  • 6
  • 34
  • 52
48
votes
6 answers

Spring boot - disable Liquibase at startup

I want to have Liquibase configured with my spring boot aplication, so I added dependencies to pom.xml and set the path to master.xml in application.properties. This works fine and Spring runs Liquibase at startup. The problem is that now I want to…
Gravian
  • 607
  • 2
  • 10
  • 20
42
votes
6 answers

Liquibase: How to set the default value of a date column to be "now" in UTC format?

How do you set the default value of a date column to be "now" in UTC format? I think the answer involves the defaultValueComputed attribute on the column element. The documentation states: defaultValueComputed A value that is returned from a…
Jeff
  • 469
  • 1
  • 6
  • 8
37
votes
2 answers

Liquibase or Flyway database migration alternative for Elasticsearch

I am pretty new to ES. I have been trying to search for a db migration tool for long and I could not find one. I am wondering if anyone could help to point me to the right direction. I would be using Elasticsearch as a primary datastore in my…
Istvano
  • 942
  • 11
  • 19
37
votes
3 answers

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 Liquibase() liquibase.runUpdates() ?
sproketboy
  • 7,827
  • 17
  • 56
  • 81
35
votes
1 answer

Hibernate using JPA (annotated Entities) and liquibase

liquibase is a perfect alternative to hibernate's hbm2ddl_auto property if you are using xml-mapping. But Im using JPA annotation (hibernate annotations). Is it possible to use liquibase then?
Schildmeijer
  • 19,921
  • 11
  • 59
  • 79
35
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
  • 7,321
  • 7
  • 53
  • 89
34
votes
7 answers

liquibase : Insert current date

I am trying to insert data using liquibase insert tag. It works fine when I am inputing a number to value tag . But I am looking for a simple function that will take care of default date (current DateTime of database) even when I don't have it as…
Ramya
  • 521
  • 1
  • 4
  • 6
31
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
  • 9,605
  • 10
  • 59
  • 80
1
2 3
99 100