我有一个这样配置的基本开发数据库:
# Default database configuration using H2 database engine in an in-memory mode
db.default.driver=org.h2.Driver
db.default.url="jdbc:h2:mem:play;DB_CLOSE_DELAY=-1;MODE=MYSQL;DATABASE_TO_UPPER=FALSE"
我添加了一个脚本来从数据库中创建表conf/evolutions/default/1.sql
当启动应用程序sbt run
并转到任何页面时,Play 要求我应用脚本1.sql
。按下按钮后,我收到以下错误:
JdbcSQLException: Table "play_evolutions" not found; SQL statement: update play_evolutions set last_problem = ? where id = ? [42102-192]`en`
游戏框架不应该已经创建了这个吗?
版本:
//project/plugins.sbt
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.10")
//build.sbt
lazy val root =
(project in file("."))
.enablePlugins(PlayScala)
scalaVersion := "2.11.8"
libraryDependencies += jdbc
libraryDependencies += evolutions