一、详细错误信息
Found non-empty schema(s) vhr
but no schema history table. Use baseline() or set baselineOnMigrate to true to initialize the schema history table.
二、解决方案
在springboot项目中集成flyway的时候遇到上述问题,此时需在application.propeties文件中加入:
#设置flyway配置基线
spring.flyway.baseline-on-migrate=true
在终端输入框执行以下操作:
mvn flyway:clean //清除缓存
mvn flyway:migrate //迁移数据库