Community contributed extensions

Liquibase Module

You never develop code without version control, why do you develop your database without it ?™

Liquibase ( is a simple, reliable and elegant solution for database refactoring management. It comes with main features :

Liquibase module differs from Migrate module for the main following reason :

Database changes follow application changes just the same way code source does

Getting started

Bundle changelog files within your Play application (see example),

Add liquibase dependency to your Play application

# Additional modules
# ~~~~~
# A module is another play! application. Add a line for each module you want
# to add to your application. Module paths are either absolutes or relative to
# the application root.


First version configuration options are the following :
liquibase.actions=status|update|validate|sync|listlocks|releaselocks|clearchecksums [actions can be sequenced with coma]
liquibase.changelog=changelog_path (classpath loaded) (classpath loaded)

More features (hosts execution filter, underlying database changelog structure visualization...) under development


Locate your xml changeset file within your models folder, or in external 3rd party jar. You only need to remember relative path to root xml file.
At configuration level, Turn jpa.ddl to validate or none within your application.conf file. Simply start your play app and see the changelog information output

Sample configuration entries for liquibase module


Set your action(s) sequence using the corresponding tag, use the active flag to apply – or not – changesets, and simply start your app. That’s it, you can now handle Model development with structural projection in parallel. Keep the jpa.ddl flag to validate in order to prevent asynchronous evolution, and you’re done. Underlying db keeps track of changes performed (structural, performances, data, custom SQL).

Database Properties Injection

Properties are then injected within changeset xml file

#naming convention
type.timestamp=timestamp without time zone

Changeset files / properties can be jared and integrated – thus versioned – as 3rd party libs, at module / application level, just the same way jdbc drivers are.

One may also handle changeset at the same level as domainmodel declaration – that’s what we do at GdTeam -, within dedicated module/application, using play module dependency mechanism to create modular app.
Modules archives are still built and maintained against 3rd party repository such as nexus / archiva / artifactory, and then released agains private / public play module repository (see for more information)