diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2024-03-02 07:35:21 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2024-03-02 07:35:21 -0500 |
| commit | 55d3999d9efdeb0a87959e93d473cb64c8ba8c48 (patch) | |
| tree | 18f733eaa298501095ce0be15a3f28de11ff5e9c /internal/services/migration.go | |
| parent | Add service tests (diff) | |
| download | cli-55d3999d9efdeb0a87959e93d473cb64c8ba8c48.zip | |
Add proper tests for ApplyAllMigrations and ApplyUpToVersion
Diffstat (limited to 'internal/services/migration.go')
| -rw-r--r-- | internal/services/migration.go | 2 |
1 files changed, 2 insertions, 0 deletions
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, |