Play Framework:如何更正进化脚本中的 SQL 语法错误?

Play Framework: How to correct SQL syntax error in evolution script?

我刚刚添加了一个 SQL 文件以在我的数据库中为我的进化脚本创建一个新的 table。不小心,我的 SQL 脚本中出现了错字。然后我通过配置设置 applyEvolutions.default=true 的激活器启动了我的 Play webapp。因此,当我 run 我的 webapp 时,它会因 SQL 语法错误和不一致的数据库而抱怨。

我更正了语法错误,但不知何故 Play/Evolutions/Activator 没有考虑我的更正。它仍然想执行我的 SQL 脚本的错误和未更正版本。这是显而易见的,因为它引用了我未更正版本的语法错误。我怎样才能让 Play 接受我更正后的 SQL 脚本?

此外,Play 指出以下错误消息:

play.api.db.evolutions.InconsistentDatabase: 
Database 'default' is in an inconsistent state!
[An evolution has not been applied properly.

我使用最新的 Play、Evolution 和 MySQL 版本。

我发现我的问题的答案已经在官方文档中了:

Run the fixed SQL command on your database and then mark this problem as manually resolved by clicking on the button.

But because your evolution script has errors, you probably want to fix it. So you modify the sql evolutions script.

Play detects this new evolution that replaces the previous one, and will run the appropriate script. Now everything is fixed, and you can continue to work.

https://www.playframework.com/documentation/2.5.x/Evolutions#inconsistent-states