We use the (*Migrator[TTx]).Validate to check on startup if the database migrations have been applied.
We want to roll out River Pro v0.24.0, which means we want to stop at migration v6 for the pro line.
We can pass a MigrateOpts to the Migrate method to actually perform the migration, but there doesn't seem to be a way to do the same when validating, so presumably we're going to get an error because v7 hasn't been applied yet.
As a workaround I think we can compare the results of AllVersions and ExistingVersions but it is a bit of a pain having to reimplement the validation logic.
We use the
(*Migrator[TTx]).Validateto check on startup if the database migrations have been applied.We want to roll out River Pro v0.24.0, which means we want to stop at migration v6 for the
proline.We can pass a
MigrateOptsto theMigratemethod to actually perform the migration, but there doesn't seem to be a way to do the same when validating, so presumably we're going to get an error because v7 hasn't been applied yet.As a workaround I think we can compare the results of
AllVersionsandExistingVersionsbut it is a bit of a pain having to reimplement the validation logic.