I have my database structure in this file
myproject/conf/evolutions/mydatabasename/1.sql
and I have this configuration for tests
implicit override def newAppForTest(td: TestData): FakeApplication = FakeApplication(
additionalConfiguration = Map(
"evolutionplugin" -> "enabled",
"db.mydatabasename.driver" -> "org.h2.Driver",
"db.mydatabasename.url" -> "jdbc:h2:mem:play;MODE=MYSQL",
"db.mydatabasename.logStatements" -> true,
"db.mydatabasename.username" -> "root",
"db.mydatabasename.password" -> "root",
"logback.com.jolbox" -> "ERROR"
)
)
If I change the folder name 'mydatabasename' for 'default' and in the configuration file 'mydatabasename' for 'default' it works, but when I try to change the name, it does not. Is there a way to make this work?
Thank you
First, make sure that you have the
evolutions
module enabled in yourbuild.sbt
library dependencies, otherwise everything evolution-related will silently fail.Your configuration appears to be outdated for 2.4.x, and you need to change it like so, specifically enabling evolutions for your data source:
See Evolutions Configuration in the docs.