Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.

Commit 3e4415d

Browse files
AuHaudirkmc
andauthored
Message wordings
Co-Authored-By: dirkmc <[email protected]>
1 parent 1a6d6c6 commit 3e4415d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async function migrate (path, { toVersion, ignoreLock = false, repoOptions, onPr
106106
}
107107

108108
if (!isDryRun) await repoVersion.setVersion(path, toVersion || getLatestMigrationVersion(migrations))
109-
log('All migrations successfully migrated ', toVersion !== undefined ? `to version ${toVersion}!` : 'to latest version!')
109+
log('Repo successfully migrated ', toVersion !== undefined ? `to version ${toVersion}!` : 'to latest version!')
110110
} finally {
111111
if (!isDryRun && !ignoreLock) await lock.close()
112112
}
@@ -162,7 +162,7 @@ async function revert (path, toVersion, { ignoreLock = false, repoOptions, onPro
162162

163163
let reversibility = verifyReversibility(migrations, currentVersion, toVersion)
164164
if (!reversibility.reversible) {
165-
throw new errors.NonReversibleMigrationError(`Migration version ${reversibility.version} is not possible to revert! Cancelling reversion.`)
165+
throw new errors.NonReversibleMigrationError(`It is not possible to revert to version ${toVersion} because migration version ${reversibility.version} is not reversible. Cancelling reversion.`)
166166
}
167167

168168
let lock
@@ -227,8 +227,8 @@ function verifyReversibility (migrations, fromVersion, toVersion) {
227227
}
228228

229229
if (migrationCounter !== (fromVersion - toVersion)) {
230-
throw new errors.NonReversibleMigrationError(`There are missing migration to perform the reversion!
231-
Expected ${(fromVersion - toVersion)} migrations, but there is only ${migrationCounter} migrations.`)
230+
throw new errors.NonReversibleMigrationError(`There are not enough migrations to perform the reversion!
231+
Expected ${(fromVersion - toVersion)} migrations, but there are only ${migrationCounter} migrations.`)
232232
}
233233

234234
return { reversible: true, version: undefined }

0 commit comments

Comments
 (0)