diff options
Diffstat (limited to 'internal/repositories/migration_fs_repo.go')
| -rw-r--r-- | internal/repositories/migration_fs_repo.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/repositories/migration_fs_repo.go b/internal/repositories/migration_fs_repo.go index 72057ec..b328c90 100644 --- a/internal/repositories/migration_fs_repo.go +++ b/internal/repositories/migration_fs_repo.go @@ -90,11 +90,13 @@ func (mr migrationFsRepo) List() (map[string]*models.Migration, error) { if err != nil { return nil, err } - _, exists := migrations[migration.Version] + existing, exists := migrations[migration.Version] if exists { return nil, fmt.Errorf( - "%w: a local migration file with version %s already exists", + "%w: %s and %s both have version %s; renumber one of them", ErrMigrationVersionConflict, + existing.Name(), + migration.Name(), migration.Version, ) } |