Evolve icon indicating copy to clipboard operation
Evolve copied to clipboard

Sometimes placeholder values change - this doesn't seem to update the checksum value

Open sjd2021 opened this issue 3 years ago • 3 comments

Logically, I guess the placeholders come into play after a checksum has already been calculated. How can I ensure the checksum changes so that my repeatable migrations still run when needed without me having to make a random whitespace change?

In flyway-based java projects, I had partially code-based migrations for some of the things I'm trying to do here and I could generate a custom checksum value which made this work. I'm not sure of a good solution right now for this with evolve, which works fantastically for every other scenario I've needed up till now btw.

sjd2021 avatar Mar 07 '22 14:03 sjd2021

Yes, you're right. That's why it is not re-executed even if you change the placeholders. Maybe you can use the latest version of Evolve 3.1.0-alpha7 and use the new option -- evolve-repeat-always at the beginning of the script to always execute a repeatable migration ?

lecaillon avatar Mar 07 '22 17:03 lecaillon

I don't want that to happen since we run so many instances. Is it worth exploring an option to calculate the checksums post-placeholder-eval or is such an idea not likely to be approved due to philosophical reasons, etc.?

sjd2021 avatar Mar 07 '22 21:03 sjd2021

+1 for checksums after placeholder substitution. Or at least having a way to denote some scripts as repeat-if-changed vs repeat-always.

matthooper avatar Aug 04 '22 17:08 matthooper