how to resolve version number conflicts of script in flywaydb

淺唱寂寞╮ 提交于 2019-12-06 04:23:12

问题


I got 3 git branches: develop, fixbug, and master.

The latest FlywayDB script version in branch master is 1.2.43, and the one in branch develop is 1.2.54. Branch fixbug's script version is update to 1.2.55, and it is based on branch master.

I need to merge branch fixbug to branch master, and to deploy master(version 1.2.55) to production environment first. As we know, flywayDB executes scripts in order, from low version to high version. If I do so, when I deploy branch develop(version 1.2.54) to the production evironment, the scripts will not be executed or even assert errors.

How should I do? Thanks!!


回答1:


There's a great blog post about that.

It can be summarised as:

  1. Prefix your migrations with timestamps rather than integers
  2. Enable out of order migrations
  3. Create idempotent migrations


来源:https://stackoverflow.com/questions/38236802/how-to-resolve-version-number-conflicts-of-script-in-flywaydb

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!