Community contributed extensions


Module for creating and running database migrations for Play application. To use the module add the module to your application.conf file


Next configure the database and add the carbonate path in to the application.conf file, here we are using framework id local-mysql


Now you can create a new migration by

play carbonate:new --%local-mysql

The tool will ask for a short description for the migration which will be added to the migration file name, and then it will create the migration file to the path defined by the carbonate.path property. It will compare the models with the database and generate a schema update SQL based on that.

You should always check the migration generated by the tool before accepting it to production use!

The new migration will be applied to the database the next time you run your play application

play run --%local-mysql

Please note that if the application.conf is missing the carbonate.path property the migrations will just be ignored, which is useful if you want to use the mem database in play.

Configuration options

carbonate.path       - Path to the migrations folder. If missing the migrations will not be run.
carbonate.delimeter      - Delimeter string to use to separate the generated migration statements. Default value ';'.
carbonate.comment        - Comment string used in migrations. Default value '--'.