From 4daf960b457fe1ab27e405c1c1d56e9cfc7c904e Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 2 Mar 2024 08:50:27 -0500 Subject: Add proper tests to revert service methods --- internal/services/migration.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/services/migration.go') diff --git a/internal/services/migration.go b/internal/services/migration.go index bc4b9d1..446f267 100644 --- a/internal/services/migration.go +++ b/internal/services/migration.go @@ -189,6 +189,8 @@ func (ms MigrationService) RevertDownToVersion(version string) error { return fmt.Errorf("migration with version %s does not exist", version) } if !targetMigration.Applied { + // Assumption: Every migration from the latest down to the target + // migration hasn't been applied. return fmt.Errorf( "migration with version %s isn't applied, nothing to revert", version, -- cgit v1.2.3