Which database is used when play test?
-
20-12-2019 - |
質問
My application.conf:
### default #conf/evolutions/default/1.sql
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost/test"
### test #conf/evolutions/test/1.sql
db.test.driver=org.h2.Driver
db.test.url="jdbc:h2:mem:play"
I run run
command in play
console, is db.default used?
When I run test
command in play
console, is still db.default used? How can I use db.test when I run test
?
And when will conf/evolutions/default/1.sql
and #conf/evolutions/test/1.sql
be executed?
解決
It will use the default database. Specifying the environment in the parameter key was a Play1 specific feature.
所属していません StackOverflow