I have below at the start of http server:
if err := goose.Run("up", db, dir); err != nil {
return errors.WithStack(err)
}
However I've noticed recently that if two instances of application run migrations at the same time, then one will fail trying to apply migration that was already applied by the other one. Looks like there is a race condition. I was under impression that this library solves this problem with some smart queries but looks like not?
I have below at the start of http server:
However I've noticed recently that if two instances of application run migrations at the same time, then one will fail trying to apply migration that was already applied by the other one. Looks like there is a race condition. I was under impression that this library solves this problem with some smart queries but looks like not?