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
394
votes
12 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
  • 5,556
  • 3
  • 23
  • 38
118
votes
8 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,956
  • 3
  • 27
  • 43
117
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
  • 9,213
  • 12
  • 62
  • 102
82
votes
9 answers

Spring boot - disable Liquibase at startup

I want to have Liquibase configured with my Spring Boot application, so I added dependencies to pom.xml and set the path to master.xml in application.properties. This works fine and Spring Boot runs Liquibase at startup. The problem is that now I…
Gravian
  • 957
  • 2
  • 11
  • 20
70
votes
9 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
  • 943
  • 1
  • 8
  • 17
68
votes
4 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
  • 4,121
  • 8
  • 40
  • 56
62
votes
3 answers

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,780
  • 9
  • 41
  • 60
57
votes
3 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
  • 4,232
  • 8
  • 38
  • 62
52
votes
8 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
  • 569
  • 2
  • 6
  • 8
41
votes
1 answer

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
  • 992
  • 1
  • 12
  • 19
40
votes
3 answers

Adding composite unique constraint in Liquibase

I'm creating a link table which has 3 columns; id, product_id, tournament_id. Adding a uniqueConstraint to the "id" column is trivial, but I want to ensure that any pair of (product_id, tournament_id) is unique. The example at Liquibase.org…
Alec
  • 1,986
  • 4
  • 23
  • 47
40
votes
3 answers

Update one row in the table, using liquibase

I was hoping if someone could verify if this is the correct syntax and correct way of populating the DB using liquibase? All, I want is to change value of a row in a table and I'm doing it like this:
user2187935
  • 751
  • 2
  • 8
  • 19
38
votes
4 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
  • 8,967
  • 18
  • 65
  • 95
37
votes
10 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
  • 551
  • 1
  • 4
  • 6
36
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
  • 20,702
  • 12
  • 62
  • 79
1
2 3
99 100