diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2026-11-13 22:13:14 -0800 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2026-11-13 22:13:14 -0800 |
| commit | 9656e14fc758053f34f5cb0e906093e2a18f6162 (patch) | |
| tree | 3d7799305de92be6a09bcd12c29fe0843b7b8cab /internal/repositories/migration_fs_repo.go | |
| parent | Remove migration dependencies (diff) | |
| download | cli-9656e14fc758053f34f5cb0e906093e2a18f6162.zip | |
Remove timestamp version style in favor of always using sequential
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, ) } |