flyway exception, detected failed migration

六眼飞鱼酱① 提交于 2020-05-12 11:15:19

问题


I've got a Flyway exception:

FlywayException: Detected failed migration to version 1.0

I looked for on documentation and forums but I didn't found what mean this exception. Please someone can tell me what can be the reasons of these exception ! Thanks


回答1:


"FlywayException: Detected failed migration to version 1.0"

it means that you ran migrate before and it failed at 1.0 for some reason. You need to identify why the previous migration failed at 1.0 and solve it if you have already not done so. Once solved you need to run flyway repair to tell flyway that whatever failed is now out of the way.

Then run flyway migrate again. If it fails again, you are back on step 1. Good luck with the migration.




回答2:


Make

select * from your_database_name.flyway_schema_history

you will get something like this:

Query to flyway_schema_history table query to flyway_schema_history table]

Then find the entry that corresponds to the migration that is failing and delete it, it should work.



来源:https://stackoverflow.com/questions/44970904/flyway-exception-detected-failed-migration

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!