I would like to write database integration tests against a Play Slick managed database and apply and unapply Evolutions using the helper methods described in the Play documentation namely, Evolutions.applyEvolutions(database)
and Evolutions.cleanupEvolutions(database)
. However these require a play.api.db.Database
instance which is not possible to get hold of from what I can see. The jdbc
library conflicts with play-slick so how do I get the database instance from slick? I use the following to get a slick database def for running slick queries:
val dbConfig = DatabaseConfigProvider.get[JdbcProfile]("my-test-db")(FakeApplication())
import dbConfig.driver.api._
val db = dbConfig.db
Thanks,
Leanne