Skip to content

Migration fails if already migrated up to target version #1260

@haines

Description

@haines

We're running River migrations on each deployment with (*Migrator[TTx]).Migrate. As we are in the process of rolling out River Pro v0.24.0, we specify TargetVersion: 6 in the MigrateOpts for the pro line.

This worked fine the first time it was run, but on subsequent deployments we get an error

Error: version 6 is not in target list of valid migrations to apply

It seems to me that if the target version has already been reached, calling Migrate should be a no-op rather than an error, which would match the behaviour when TargetVersion is not specified.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions