Flyway multiple metadata tables in one schema

前端 未结 2 1679
长发绾君心
长发绾君心 2020-12-16 19:19

I\'m trying to use Flyway to version the database of a modular application. Each module has its own separate set of tables, and migration scripts that will control the versi

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-16 19:53

    I think you need to baseline each module before performing the migrate. You'll need to pass the table option to override schema_version for each module eg flyway.table=schema_version_module1. As the error message suggests you can also baselineOnMigrate however that is warned against in the docs (https://flywaydb.org/documentation/commandline/migrate).

    We are considering a similar approach with another schema_version table to apply and log data fixes that cannot be rolled out to every environment cleanly.

提交回复
热议问题