
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
mysql-upgrade
Advanced tools
A simple MySQL database upgrade module based on plain SQL files. For developers who don't use an ORM like Sequelize, but still want to have a database.sync();
functionality.
npm install mysql-upgrade
This module only works with Node 7.6 or later (because of native support for async/await
).
const upgrade = require('mysql-upgrade')
const upgradeConfig = {
// MySQL settings (passed directly to the MySQL connector) - at least user, password and database are required
mysql: {
host: 'localhost',
user: 'root',
password: '',
database: ''
},
// Enable or disable logging output of the module
// Optional, default: false
verbose: true,
// Name of the table that will store the database version
// Optional, default: '_upgrade_version'
// Set this if you already have a table '_upgrade_version' to avoid clashing
table: 'my_upgrade_version',
// Path where the SQL files are located
// Optional, default: './database'
filePath: './my-sql-files'
};
upgradeDb(upgradeConfig).then(function(upgraded) {
console.log(upgraded);
// { oldVersion: 0, newVersion: 1 }
})
If you encounter any bugs or problems with this module, please sumit an issue. Pull requests with bugfixes are of course welcome.
FAQs
A simple MySQL database upgrade module based on plain SQL files
The npm package mysql-upgrade receives a total of 0 weekly downloads. As such, mysql-upgrade popularity was classified as not popular.
We found that mysql-upgrade 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
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.