database-migrationflyway

New flyway script to replace a "broken" script, old never be run?


We have this script name V1_0_15_1__anytext.sql and it was copied to a flyway system.

However it never succeeded as it had Insert Into ... Values (1,2, '${variable1}') and $variable was meant to be saved as-is without a flyway placeholder substitute.

Script failed on this line and rollbacked, my understanding Flyway had an error as it did not have a value for ${variable1} substitute, default flyway placeholder prefix=${ | suffix=} conflict.

So this V1_0_15_1 was never succeeded, how do we provide a new flyway script without ${...} substring syntax. we changed our application level substitute syntax.


Solution

  • Customer made an adhoc edit on a broken script, fixed a db manually and rerun a migration. We also provided a next sequence of _16_1__fix.sql script to rerun the same InsertUpdate data modifications just in case.