O'Reilly logo

Lift Application Development Cookbook by Gilberto T. Garcia Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Migrating the database using Liquibase

Squeryl doesn't do database migration for us. This means that you can use the create method from the schema object only once, because it tries to create all of the tables each time it runs and it will give errors when trying to create a table that already exists.

For this reason, we can use third-party tools such as Liquibase, in order to automate the migration process; that is, database creation and changing. Liquibase uses an XML file, databaseChangeLog, to define all of the changes that it needs to execute. Each one of these changes is defined by a changeSet tag. It also keeps track of these changeSet tags to prevent executing any one of them twice.

Once you define your databaseChangeLog file—the XML file ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required