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
17
votes
5 answers

Can Flyway or Liquibase generate an update script instead of updating the database directly?

First, a little background. I have a set of Java applications, some based on JPA, some not. To create my databases I am currently using Hibernates schema export to generate create scripts for those using JPA. Those not using JPA I generate the…
pillingworth
  • 3,128
  • 2
  • 21
  • 46
16
votes
5 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
  • 261
  • 3
  • 7
16
votes
1 answer

altering my sql table to add multiple new columns at once using liquibase

What is the correct syntax to alter the table and adding multiple columns at a time using liquibase xml. The official document gives the example for adding only one column :
smart987
  • 782
  • 2
  • 11
  • 31
16
votes
2 answers

Update Liquibase's changelog automatically while building

I'm currently working on a Spring project which uses Hibernate and Liquibase. What I am trying to achieve is to update Liquibase's changelog automatically every time I build the project. It's supposed to generate a diff based on my current…
Cerbis
  • 495
  • 4
  • 12
16
votes
1 answer

How can I create triggers for a postgreSQL db using liquibase?

I'm using the dropwizard-migrations module for liquibase db refactoring. See the guide here: http://dropwizard.codahale.com/manual/migrations/ When I run java -jar my_project.jar db migrate my_project.yml I get the following error: ERROR…
Ann Kilzer
  • 1,146
  • 1
  • 13
  • 36
16
votes
4 answers

Using liquibase file paths via both maven and spring

I update scheme and initial data in spring context using the following beean:
Alexandr
  • 8,399
  • 11
  • 54
  • 92
15
votes
1 answer

Setting up Liquibase with MS-SQL Server

I am utilising Liquibase (www.liquibase.org) into our MVC3 SQL Server 2008 project to manage database migration/changes. However I'm stumbling on the first hurdle: Connecting to Microsoft SQL Server instance. I am looking at the quick start tutorial…
Dan Black
  • 1,087
  • 2
  • 11
  • 20
15
votes
1 answer

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
15
votes
2 answers

How to manage schema migrations in Google BigQuery

How to manage schema migrations for Google BigQuery, we have used Liquibase and Flyway in the past. What kind of tools can we use to manage schema modifications and the like (e.g. adding a new column) across dev/staging environments.
15
votes
2 answers

Liquibase: Copy column data into a new column in the same table

I have a table with a column A. I am creating a new column B. B will have the same data as column A. How do I replicate the column in Liquibase? Is there some expression I can write to do the replication?
sindhunk
  • 245
  • 1
  • 3
  • 9
15
votes
5 answers

Why are all contexts executed when non specified on update?

I'm using Liquibase 3.3.5 to update my database. Having contexts is a nice way to only execute specific parts of the changelog. But I don't understand, why ALL changesets are executed, when no context is provided on update. Consider the following…
javg
  • 325
  • 3
  • 10
15
votes
3 answers

Convert Liquibase XML to YAML?

Can I automatically convert Liquibase changelog files in the XML format to the YAML format?
user3364825
  • 1,451
  • 1
  • 15
  • 22
15
votes
2 answers

Spring test injection not working when using TestExecutionListener

I want to use a custom TestExecutionListener in combination with SpringJUnit4ClassRunner to run a Liquibase schema setup on my test database. My TestExecutionListener works fine but when I use the annotation on my class the injection of the DAO…
nansen
  • 2,846
  • 1
  • 17
  • 32
15
votes
2 answers

how to insert html tag inside sql in Liquibase migration?

I need to update my data that have html tag inside so wrote this on liquibase update table_something set table_content = " something
in the next line "
it apparently doesn't work on liquibase ( i got loooong errors .. and…
nightingale2k1
  • 9,113
  • 12
  • 62
  • 90
14
votes
3 answers

Adding a non-nullable column to existing table fails. Is the "value" attribute being ignored?

Background: we have a Grails 1.3.7 app and are using Liquibase to manage our database migrations. I am trying to add a new column to an existing table which is not empty. My changeset looks like this: changeSet(author: "someCoolGuy (generated)",…
David
  • 1,840
  • 3
  • 17
  • 30