Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

db-migrate-mysql

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

db-migrate-mysql - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

34

index.js

@@ -12,3 +12,3 @@ var util = require('util');

var MysqlDriver = Base.extend({
init: function(connection, internals) {
init: function(connection) {
this._escapeDDL = '`';

@@ -18,3 +18,2 @@ this._escapeString = '\'';

this.connection = connection;
this.internals = internals;
},

@@ -26,3 +25,3 @@

if(!this.internals.notransactions) {
if(!internals.notransactions) {

@@ -41,3 +40,3 @@ return this.runSql('SET AUTOCOMMIT=0;')

if(!this.internals.notransactions) {
if(!internals.notransactions) {

@@ -310,3 +309,3 @@ return this.runSql('COMMIT;').nodeify(cb);

var formattedDate = moment(new Date()).format('YYYY-MM-DD HH:mm:ss');
this.runSql('INSERT INTO `' + this.internals.migrationTable + '` (`name`, `run_on`) VALUES (?, ?)', [name, formattedDate], callback);
this.runSql('INSERT INTO `' + internals.migrationTable + '` (`name`, `run_on`) VALUES (?, ?)', [name, formattedDate], callback);
},

@@ -316,3 +315,3 @@

var formattedDate = moment(new Date()).format('YYYY-MM-DD HH:mm:ss');
this.runSql('INSERT INTO `' + this.internals.seedTable + '` (`name`, `run_on`) VALUES (?, ?)', [name, formattedDate], callback);
this.runSql('INSERT INTO `' + internals.seedTable + '` (`name`, `run_on`) VALUES (?, ?)', [name, formattedDate], callback);
},

@@ -362,3 +361,3 @@

log.sql.apply(null, arguments);
if(this.internals.dryRun) {
if(internals.dryRun) {
return Promise.resolve().nodeify(callback);

@@ -409,2 +408,7 @@ }

function dummy() {
arguments[arguments.length - 1]('not implemented');
}
exports.connect = function(config, intern, callback) {

@@ -414,5 +418,7 @@ var db;

internals = intern;
log = intern.mod.log;
type = intern.mod.type;
log = internals.mod.log;
type = internals.mod.type;
internals.interfaces.SeederInterface._makeParamArgs = dummy;
if (typeof(mysql.createConnection) === 'undefined') {

@@ -423,3 +429,11 @@ db = config.db || new mysql.createClient(config);

}
callback(null, new MysqlDriver(db, internals));
db.connect(function( err ) {
if( err ) {
return callback( err );
}
callback(null, new MysqlDriver(db));
} );
};
{
"name": "db-migrate-mysql",
"version": "1.1.3",
"version": "1.1.4",
"description": "db-migrate mysql driver",

@@ -29,4 +29,4 @@ "main": "index.js",

"dependencies": {
"bluebird": "^2.9.34",
"db-migrate-base": "^1.2.1",
"bluebird": "^3.1.1",
"db-migrate-base": "^1.2.4",
"moment": "^2.9.0",

@@ -33,0 +33,0 @@ "mysql": "^2.5.4"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc