Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
better-migration
Advanced tools
This is a simple tool to migrate data. It features some key features:
npm install --save better-migration
var migration = require('better-migration');
The idea behind this tool is simple:
migration.version('1.0.0', function (cb) {
// Your migration script, call cb() when done.
// cb(err) will abort the migration.
cb();
})
This will run your migration scripts one at a time until it reaches the latest version.
migration.start(function (err) {
// If the error is set, the script failed, and you should probably not continue.
// Your data is updated to the latest semver version (in this case is 1.0.0)
})
When you need to migrate again, just call migration.set with the new version number, and restart.
By default, we save the current version into a file, ./version
. You may change this:
var migration = require('better-migration');
Optionally, you may set your own functions for setting the version/lock:
// Set the function to get the version
migration.get = function (cb) {
cb(null, '1.0.0');
};
// Set the function to set the version
migration.set = function (v, cb) {
cb(); // Call when saved
}
// Set the function to obtain a lock for migration.
migration.lock = function (cb) {
// After you acquire the lock, you must return a release function
// so that we can release the lock after the migration is complete.
cb(err, release)
}
Contributions welcome!
This library was initially made by the awesome team of engineers at Diamond.
If you haven't already, make sure you install Diamond!
FAQs
This is a simple tool to migrate data.
We found that better-migration demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.