【问题标题】:Flyway ignoring specified schemaFlyway忽略指定的模式
【发布时间】:2021-09-16 13:30:27
【问题描述】:

尝试部署我的应用时出现此错误:

Found non-empty schema(s) "public" but no schema history table. Use baseline() or set baselineOnMigrate to true to initialize the schema history table.

问题是我已指定 flyway 使用名为linked_note 的不同模式,其中模式表历史记录实际上是。这是我的配置:

spring:
  datasource:
    tomcat:
      initSQL: ""
  flyway:
    locations: classpath:db/migration/common, db/migration/crunchy
    schemas: linked_note
    table: schema_version

为什么 flyway 会忽略指定的架构? 为什么默认是公开的?

【问题讨论】:

    标签: spring gradle flyway concourse


    【解决方案1】:

    我想您已经有了一个数据库,并定义了一个模式。为了为其设置 flyway,您需要在配置 yaml 中添加以下属性。

    https://flywaydb.org/documentation/configuration/parameters/baselineOnMigrate

    【讨论】:

      猜你喜欢
      • 2014-10-04
      • 2014-10-24
      • 1970-01-01
      • 2014-03-29
      • 1970-01-01
      • 1970-01-01
      • 2012-02-01
      • 2014-08-06
      • 2020-04-18
      相关资源
      最近更新 更多