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 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 configuration 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.