我遇到的问题是部署的服务器上的播放数据库演变一次又一次处于不一致状态。我不明白这是什么问题。
play clean compile stage
我经常会收到此错误:
[error] play - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sequence life_cycle_event_seq' at line 1 [ERROR:1064, SQLSTATE:42000]
Oops, cannot start the server.
@6epm5i5m6: Database 'default' is in inconsistent state!
at play.api.db.evolutions.Evolutions$.checkEvolutionsState(Evolutions.scala:177)
at play.api.db.evolutions.Evolutions$.applyScript(Evolutions.scala:275)
at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1$$anonfun$apply$1.apply$mcV$sp(Evolutions.scala:446)
at play.api.db.evolutions.EvolutionsPlugin.withLock(Evolutions.scala:483)
at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:439)
at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:437)
at scala.collection.immutable.List.foreach(List.scala:309)
at play.api.db.evolutions.EvolutionsPlugin.onStart(Evolutions.scala:437)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:63)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:63)
at scala.collection.immutable.List.foreach(List.scala:309)
at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:63)
at play.api.Play$$anonfun$start$1.apply(Play.scala:63)
at play.api.Play$$anonfun$start$1.apply(Play.scala:63)
at play.utils.Threads$.withContextClassLoader(Threads.scala:18)
at play.api.Play$.start(Play.scala:62)
at play.core.StaticApplication.<init>(ApplicationProvider.scala:54)
at play.core.server.NettyServer$.createServer(NettyServer.scala:228)
at play.core.server.NettyServer$$anonfun$main$5.apply(NettyServer.scala:259)
at play.core.server.NettyServer$$anonfun$main$5.apply(NettyServer.scala:258)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer$.main(NettyServer.scala:258)
at play.core.server.NettyServer.main(NettyServer.scala)
在玩完整个过程后突然发挥作用。
答案 0 :(得分:1)
您应该在之后生成演变脚本,将配置切换为mysql。
生成的脚本依赖于RDBMS。在启动play clean compile stage