![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
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.
app-migrations
Advanced tools
Helper for application schema migrations
A helper module to define and execute app schema migrations.
Run on every start of your application with the previous and current version.
Makes sure that the correct migration steps are executed in the right order and that downgrades are only allowed if there hasn't been a migration between the two versions.
app-migrations uses semver to determine version order.
// define your migrations functions, keyed to the version they were introduced at.
var migrations = {
'1.0.4': function(previousVersion, currentVersion, done) {
// introduced new "jetpack" feature which requires changes to the engine.
// ... add code here ...
done(null, 'upgraded engine to support jetpack.');
},
'1.0.9': function(previousVersion, currentVersion, done) {
// added photon cannons for more fire power, but needed to deprecate
// laser cannons instead.
// ... add code here ...
done(null, 'removed laser cannons, added photon cannons.');
}
};
var migrate = require('app-migrations')(migrations);
On every new launch, run migrate()
with previous and current version.
migrate('1.0.0', '2.0.0', function(err, res) {
if (err) return console.error('Error:', e.message);
console.log('Success:', res);
});
// console output
// Success: { '1.0.4': 'upgraded engine to support jetpack.',
// '1.0.9': 'removed laser cannons, added photon cannons.' }
migrate('1.0.5', '1.1.4', function(err, res) {
if (err) return console.error('Error:', e.message);
console.log('Success:', res);
});
// console output
// Success: { '1.0.9': 'removed laser cannons, added photon cannons.' }
migrate('1.0.4', '1.0.4', function(err, res) {
if (err) return console.error('Error:', e.message);
console.log('Success:', res);
});
// console output
// Success: {}
migrate('1.0.8', '1.0.6', function(err, res) {
if (err) return console.error('Error:', e.message);
console.log('Success:', res);
});
// console output
// Success: {}
migrate('1.0.8', '1.0.3', function(err, res) {
if (err) return console.error('Error:', e.message);
console.log('Success:', res);
});
// console output
// Error: Downgrade from version 1.0.8 to 1.0.3 not possible.
FAQs
Helper for application schema migrations
The npm package app-migrations receives a total of 49 weekly downloads. As such, app-migrations popularity was classified as not popular.
We found that app-migrations demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 32 open source maintainers 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.