Best practice: How to modify flyway migration script after it has been used

后端 未结 2 977
囚心锁ツ
囚心锁ツ 2021-02-13 01:31

I am looking for an advice in the following case.

I set up flyway migration scripts in my production environment. On every deployment the database will be migrated to the

相关标签:
2条回答
  • 2021-02-13 02:26

    The first rule is don't.

    The second one is do it very carefully and use Flyway.repair() to realign the checksums in the DB with the ones on disk.

    0 讨论(0)
  • 2021-02-13 02:31

    I completely agree with the fact you shouldn't do it.

    But if you really need to, you can change the flyway configuration and set the validateOnMigrate boolean as false.

    Here's the link: https://flywaydb.org/documentation/commandline/migrate#validateOnMigrate

    0 讨论(0)
提交回复
热议问题