You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 1, 2021. It is now read-only.
Executes a forward migration to a specific version, or to the latest version if a specific version is not specified.
98
98
99
99
**Arguments:**
100
100
101
101
*`path` (string, mandatory) - path to the repo to be migrated
102
+
*`toVersion` (int, mandatory) - version to which the repo should be migrated.
102
103
*`options` (object, optional) - options for the migration
103
-
*`options.toVersion` (int, optional) - version to which the repo should be migrated. Defaults to the latest migration version.
104
104
*`options.ignoreLock` (bool, optional) - if true will not lock the repo when applying migrations. Use with caution.
105
105
*`options.repoOptions` (object, optional) - options that are passed to migrations, that use them to construct the datastore. (options are the same as for IPFSRepo).
106
106
*`options.onProgress` (function, optional) - callback that is called after finishing execution of each migration to report progress.
* @param {int} toVersion - Version to which the repo should be migrated.
45
46
* @param {Object} options - Options for migration
46
-
* @param {int?} options.toVersion - Version to which the repo should be migrated, if undefined repo will be migrated to the latest version.
47
47
* @param {boolean?} options.ignoreLock - Won't lock the repo for applying the migrations. Use with caution.
48
48
* @param {object?} options.repoOptions - Options that are passed to migrations, that can use them to correctly construct datastore. Options are same like for IPFSRepo.
49
49
* @param {function?} options.onProgress - Callback which will be called after each executed migration to report progress
50
50
* @param {boolean?} options.isDryRun - Allows to simulate the execution of the migrations without any effect.
51
51
* @param {array?} options.migrations - Array of migrations to migrate. If undefined, the bundled migrations are used. Mainly for testing purpose.
log(`Current repo's version (${currentVersion}) is higher then toVersion (${toVersion}), nothing to migrate.`)
83
-
return
86
+
thrownewerrors.InvalidValueError(`Current repo's version (${currentVersion}) is higher then toVersion (${toVersion}), you probably wanted to revert it?`)
log(`Current repo's version (${currentVersion}) is lower then toVersion (${toVersion}), nothing to revert.`)
169
-
return
172
+
thrownewerrors.InvalidValueError(`Current repo's version (${currentVersion}) is lower then toVersion (${toVersion}), you probably wanted to migrate it?`)
0 commit comments