playframework-2.0ebeanplayframework-evolutions

Deploying Play! 2.4 and Database Evolutions


I am trying to deploy and run a Play! 2.4 project on a server.

sudo bin/app -Dhttp.port=80 -Dconfig.resource=production.conf -DapplyEvolutions.default=true

The source code I have deployed on the server (and from which I run stage) however does not contain the evolution SQL scripts. Should I build them, and include them, at the development stage, or is there a way that they generate themselves either at build stage or at the start of the server?


Solution

  • Nope they don't generate themselves. You write them, and usually store them in conf/evolutions/default (or alternative db name). More information here. They are managed with the rest of the source code.

    There are some discussions about this in other SO questions such as Managing evolutions in production environment