Closed rodrigok closed 7 years ago
:+1:
:+1: this is very needed
This should also update the version number to reflect successful migrations that have occurred. But otherwise this will help.
@ggranito can you explain better?
:+1: Thanks for this @rodrigok.
This would be extremely helpful. Is there something preventing it from being merged, or is it just awaiting review?
If multiple migrations are running, like migrating from version 0 to version 2. If migration 1 succeeds, but migration 2 fails, there is currently no record that 1 was successful. So this error logging should set the version number in the control object to the failed version number - 1. (Because you don't want to re-run version 1 if it was successful)
@ggranito Seems that your issue is not related with this PR, I'm just adding the current error to the control record. I'm not modifying how this lib sets the correct version number after successful migrations.
Is there a reason for not merging this PR?
Seems pretty reasonable to me. How about adding a test?
That would be very helpful!