From 55d3999d9efdeb0a87959e93d473cb64c8ba8c48 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 2 Mar 2024 07:35:21 -0500 Subject: Add proper tests for ApplyAllMigrations and ApplyUpToVersion --- 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 48859d6..c0d043b 100644 --- a/internal/services/migration.go +++ b/internal/services/migration.go @@ -105,6 +105,8 @@ func (ms MigrationService) ApplyUpToVersion(version string) error { return fmt.Errorf("migration with version %s does not exist", version) } if targetMigration.Applied { + // Assumption: If the target migration is applied, all migrations before + // it must also be applied. return fmt.Errorf( "migration with version %s is already applied, nothing to apply", version, -- cgit v1.2.3