I have a question about performing downgrade together with Mongock. I got Java Spring application integrated with mongock and let's suppose that I upgraded my application from v1 to v2. During the upgrade migration script "001" was executed and data is migrated so I can see in "mongockChangeLog" collection new entry.
After one day client said that there is critical bug and want to downgrade application to v1. The problem is that client added some "devices" with new "type" (supported in v2) which is of course not supported in v1. Now, during the downgrade I want to delete entries with new "type" and I don't know how to do that. I see that mongock supports method with annotation "RollbackExecution" but as I understand from documentation it will be fired in different scenarios.
Do you have any ideas where I should put rollback logic that will delete all devices with new type?
Going further - during the downgrade - should I delete in this case entry from "mongockChangeLog" or there is better solution ?