sequelize-migrate
Advanced tools
Comparing version 1.2.0 to 1.2.1
const Umzug = require('umzug'); | ||
const fs = require('fs'); | ||
@@ -8,2 +9,7 @@ function logMigrationName(name) { | ||
function migrate(persistence, config, action, migrationPath, migration, callback) { | ||
if(!fs.existsSync(migrationPath)){ | ||
console.log('No migrations to execute'); | ||
return callback(); | ||
} | ||
const sequelize = persistence.createConnection(); | ||
@@ -10,0 +16,0 @@ const umzug = new Umzug({ |
@@ -23,7 +23,7 @@ const mrPotatoHead = require('mr-potato-head'); | ||
kgo('lock', locking.lock)('migrate', ['!lock'], abbott(umzug[action](migrateTo)))( | ||
'unlock', | ||
['!migrate'], | ||
locking.close, | ||
)(['*', '!unlock'], error => { | ||
kgo | ||
('lock', locking.lock) | ||
('migrate', ['!lock'], abbott(umzug[action](migrateTo))) | ||
('unlock', ['!migrate'], locking.close, ) | ||
(['*', '!unlock'], error => { | ||
if (error) { | ||
@@ -30,0 +30,0 @@ console.log(`Error running migrations, exiting ${error}`); |
{ | ||
"name": "sequelize-migrate", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Sequelize Migration Tool", | ||
@@ -25,6 +25,7 @@ "main": "index.js", | ||
"command-line-usage": "^5.0.5", | ||
"fs-extra": "^6.0.1", | ||
"fs-extra": "^7.0.1", | ||
"kgo": "^4.0.3", | ||
"mr-potato-head": "^3.0.0", | ||
"umzug": "^2.1.0" | ||
"mr-potato-head": "^4.0.0", | ||
"mysql2": "^1.6.4", | ||
"umzug": "^2.2.0" | ||
}, | ||
@@ -31,0 +32,0 @@ "keywords": [ |
module.exports = { | ||
up: function (queryInterface, Sequelize) { | ||
up: function(queryInterface, Sequelize) { | ||
// Up things | ||
}, | ||
down: function (queryInterface, Sequelize) { | ||
down: function(queryInterface, Sequelize) { | ||
// Undo the up things | ||
}, | ||
}; | ||
}; |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
7185
153
8
6
+ Addedmysql2@^1.6.4
+ Addeddenque@1.5.1(transitive)
+ Addedfs-extra@7.0.1(transitive)
+ Addedgenerate-function@2.3.1(transitive)
+ Addediconv-lite@0.5.2(transitive)
+ Addedis-property@1.0.2(transitive)
+ Addedlong@4.0.0(transitive)
+ Addedlru-cache@5.1.17.18.3(transitive)
+ Addedmr-potato-head@4.0.1(transitive)
+ Addedmysql2@1.7.0(transitive)
+ Addednamed-placeholders@1.1.3(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedseq-queue@0.0.5(transitive)
+ Addedsqlstring@2.3.3(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedfs-extra@6.0.1(transitive)
- Removedmr-potato-head@3.0.0(transitive)
Updatedfs-extra@^7.0.1
Updatedmr-potato-head@^4.0.0
Updatedumzug@^2.2.0