
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
sequelize-migration-wrapper
Advanced tools
A wrapper for migrating databases using Sequelize and Umzug.
A wrapper for migrating databases using Sequelize and Umzug.
This module is tested with Node.js 14. It might work with Node.js >= 12, but is not tested.
npm install --save sequelize-migration-wrapper
import { setupMigration } from 'sequelize-migration-wrapper'; // TypeScript
const { setupMigration } = require('sequelize-migration-wrapper'); // CommonJS
const sequelize = new Sequelize({...});
setupMigration({
sequelize,
path: 'path/to/migration/scripts',
filePattern: /\.js$/
});
/\.js$/
)Runs through all migration scripts in the configured folder. Umzug automatically saves which migration scripts have already been run, so it will not re-run those.
await migrateDb.migrate();
Get the current status of the migration
const status = await migrateDb.getStatus();
Iteratively run through migration scripts.
for (const i in numberOfScriptsOrSomething) {
await migrateDb.migrateNext();
}
Undo the last migration using Umzug's down
function. This will only work if your migration scripts provide a down
function. See Umzug's documentation for more details.
await migrateDb.reset();
Iteratively undo a migration. This will only work if your migration scripts provide a down
function. See Umzug's documentation for more details.
for (const i in numberOfScriptsOrSomething) {
await migrateDb.resetPrev();
}
This modules is maintained by Alex Seifert (Website, Github).
FAQs
A wrapper for migrating databases using Sequelize and Umzug.
We found that sequelize-migration-wrapper 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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.