gpt4 book ai didi

database - 验证失败的: Detected applied migration not resolved locally | Flyway

转载 作者:行者123 更新时间:2023-12-03 16:12:29 27 4
gpt4 key购买 nike

设置飞行 channel 时,我在 Spring 启动应用中遇到此错误

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Validate failed: Detected applied migration not resolved locally: 1.5.4



属性文件
spring.jpa.hibernate.ddl_auto=update
spring.jpa.hibernate.use-new-id-generator-mappings=false
spring.flyway.locations=classpath:db/migration,classpath:db/vendor/mysql
spring.flyway.baseline-on-migrate=true
spring.flyway.baseline-version=1.0.2
spring.flyway.table=schema_version
spring.flyway.enabled=true

上面的配置可以在其他项目中正常工作。

我尝试在我的pom.xml中添加此插件,但仍然无法正常工作
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<configuration>
<argline>${argline} flyway:migrate -Dflyway.ignoreMissingMigrations=true</argline>
</configuration>
</plugin>

最佳答案

您可以通过在本地数据库中执行此命令来解决问题。

delete from flyway_schema_history where version = '1.5.4'

关于database - 验证失败的: Detected applied migration not resolved locally | Flyway,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58640023/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com