DorianOlympia DorianOlympia - 5 months ago 14x
SQL Question

Play framework ignores evolution script

I'm currently covering the basics of SQL databases and using them in play framework. I have created postgres database and successfully configured it in my application.conf


I have also created 1.sql file in conf/evolutions/evolutions/default directory and wrote there same example SQL code to create simple table. The problem is that play seems to ignore the existence of this file. When I run my server and connect to localhost, I'm suppoused to be asked by Play, whether I would like to have my script applied to my database or not. Unfortunately I'm not and the only thing play is doing, is loading my home page (CREATE TABLE in 1.sql is not executed and I don't have any tables created). Any ideas what am I doing wrong?


Make sure you have following line in your build.sbt file

libraryDependencies += evolutions