我正在使用 Play framework 2.7.3,无论我做什么,进化总是会创建错误的 sql
我试图编辑生成的 sql,但是在加载项目之后,演变变成了以前的样子
这是在我的 application.conf
db.default.url="jdbc:mysql://localhost:3306/playstudent?serverTimezone=EST5EDT"
db.default.username=root
ebean.default = ["models.*"]
#my build.sbt look like this
#=============================
name := """MyFirstPlay"""
organization := "com.example"
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean)
scalaVersion := "2.13.0"
libraryDependencies ++= Seq(evolutions, jdbc)
libraryDependencies += guice
libraryDependencies += jdbc
libraryDependencies += javaJdbc
libraryDependencies += javaWs
// https://mvnrepository.com/artifact/mysql/mysql-connector-java
libraryDependencies += "mysql" % "mysql-connector-java" % "8.0.16"
libraryDependencies += "javax.xml.bind" % "jaxb-api" % "2.3.1"
libraryDependencies += "javax.activation" % "activation" % "1.1.1"
libraryDependencies += "org.glassfish.jaxb" % "jaxb-runtime" % "2.3.2"
playEbeanModels in Compile := Seq("models.*")
playEbeanDebugLevel := 4
我希望生成的 sql 是正确的,但我收到了这个错误
play.api.db.evolutions.InconsistentDatabase:数据库“默认”处于不一致状态![未正确应用进化。请检查问题并在将其标记为已解决之前手动解决。] at play.api.db.evolutions.DatabaseEvolutions.$anonfun$checkEvolutionsState$3(EvolutionsApi.scala:309) at play.api.db.evolutions.DatabaseEvolutions.$ anonfun$checkEvolutionsState$3$adapted(EvolutionsApi.scala:294) at play.api.db.evolutions.DatabaseEvolutions.executeQuery(EvolutionsApi.scala:341) at play.api.db.evolutions.DatabaseEvolutions.checkEvolutionsState(EvolutionsApi.scala:294 )在 play.api.db.evolutions.DatabaseEvolutions.databaseEvolutions(EvolutionsApi.scala:145) 在 play.api.db.evolutions.DatabaseEvolutions.scripts(EvolutionsApi.scala:120) 在 play.api.db。
!@7ch9a8n6b - 内部服务器错误,用于 (GET) [/] ->
play.api.db.evolutions.InconsistentDatabase:数据库“默认”处于不一致状态![未正确应用进化。请检查问题并在将其标记为已解决之前手动解决。] at play.api.db.evolutions.DatabaseEvolutions.$anonfun$checkEvolutionsState$3(EvolutionsApi.scala:309) at play.api.db.evolutions.DatabaseEvolutions.$ anonfun$checkEvolutionsState$3$adapted(EvolutionsApi.scala:294) at play.api.db.evolutions.DatabaseEvolutions.executeQuery(EvolutionsApi.scala:341) at play.api.db.evolutions.DatabaseEvolutions.checkEvolutionsState(EvolutionsApi.scala:294 )在 play.api.db.evolutions.DatabaseEvolutions.databaseEvolutions(EvolutionsApi.scala:145) 在 play.api.db.evolutions.DatabaseEvolutions.scripts(EvolutionsApi.scala:120) 在 play.api.db。