Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 从4.X到5.X的flyway升级将再次运行已运行的迁移脚本_Spring Boot_Flyway - Fatal编程技术网

Spring boot 从4.X到5.X的flyway升级将再次运行已运行的迁移脚本

Spring boot 从4.X到5.X的flyway升级将再次运行已运行的迁移脚本,spring-boot,flyway,Spring Boot,Flyway,我正在从1.5升级Springboot2。为此,我将flyway从4.X升级到了5.24。之后我运行springboot应用程序时,它正在执行已经执行的脚本。下面是我看到的日志。删除项目特定的名称,因为我不允许发布该名称: myproject INFO 2019-03-11T16:08:11-0400 main [org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory] Creating Schema History

我正在从1.5升级Springboot2。为此,我将flyway从4.X升级到了5.24。之后我运行springboot应用程序时,它正在执行已经执行的脚本。下面是我看到的日志。删除项目特定的名称,因为我不允许发布该名称:

myproject     INFO 2019-03-11T16:08:11-0400 main [org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory] Creating Schema History table: "PUBLIC"."flyway_schema_history"
myproject     INFO 2019-03-11T16:08:11-0400 main [org.flywaydb.core.internal.command.DbMigrate] Current version of schema "PUBLIC": << Empty Schema >>
myproject     INFO 2019-03-11T16:08:11-0400 main [org.flywaydb.core.internal.command.DbMigrate] Migrating schema "PUBLIC" to version 1 - CREATE mything
myproject     ERROR 2019-03-11T16:08:11-0400 main [org.flywaydb.core.internal.command.DbMigrate] Migration of schema "PUBLIC" to version 1 - CREATE mything failed! Please restore backups and roll back database and code!
myproject     WARN 2019-03-11T16:08:11-0400 main [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: 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.internal.command.DbMigrate$FlywayMigrateException: 
Migration V1__CREATE_mything.sql failed
---------------------------------------
SQL State  : 42509
Error Code : -5509
Message    : type not found or user lacks privilege: SERIAL
myproject INFO 2019-03-11T16:08:11-0400 main[org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory]创建架构历史记录表:“PUBLIC”。“flyway\u Schema\u History”
myproject INFO 2019-03-11T16:08:11-0400 main[org.flywaydb.core.internal.command.DbMigrate]架构“PUBLIC”的当前版本:
myproject INFO 2019-03-11T16:08:11-0400 main[org.flywaydb.core.internal.command.DbMigrate]将架构“PUBLIC”迁移到版本1-创建神话
myproject错误2019-03-11T16:08:11-0400 main[org.flywaydb.core.internal.command.DbMigrate]将架构“PUBLIC”迁移到版本1-创建神话失败!请还原备份并回滚数据库和代码!
myproject警告2019-03-11T16:08:11-0400 main[org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext]上下文初始化期间遇到异常-取消刷新尝试:org.springframework.beans.factory.BeanCreationException:创建名为“flywayInitializer”的bean时出错,该bean在类路径资源[org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]中定义:调用init方法失败;嵌套异常为org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException:
迁移V1\uu CREATE\u mything.sql失败
---------------------------------------
SQL状态:42509
错误代码:-5509
消息:找不到类型或用户缺少权限:串行

我猜您正在使用参数table.name的默认值,该值在v中更改。5.0.0

flyway.table的默认值已从schema_版本更改为flyway_schema_历史