【问题标题】:How can I ensure a repeatable migration is applied after a certain fixed-version migration?如何确保在某个固定版本迁移后应用可重复的迁移?
【发布时间】:2016-06-22 02:40:45
【问题描述】:

Flyway documentation 包含这个可重复迁移的简单示例:

-- R__Blue_cars.sql

CREATE OR REPLACE VIEW blue_cars AS SELECT id, license_plate FROM cars WHERE color='blue';

但是,此迁移可能依赖于先前的固定版本迁移,该迁移创建了cars 表(我们称之为V1__Create_Cars_Table.sql)。

在部署到新数据库时,如何确保在此固定版本迁移之后运行可重复迁移?还是 Flyway 先应用固定版本的迁移,然后再应用可重复的迁移?

【问题讨论】:

    标签: flyway


    【解决方案1】:

    在可重复迁移之前应用版本化迁移。

    【讨论】:

      猜你喜欢
      • 2017-08-05
      • 2016-09-12
      • 1970-01-01
      • 1970-01-01
      • 2018-11-30
      • 1970-01-01
      • 2012-03-09
      • 2018-08-01
      • 2011-11-05
      相关资源
      最近更新 更多