larvitdbmigration
Advanced tools
Comparing version 1.1.0 to 1.1.1
20
index.js
@@ -70,6 +70,3 @@ 'use strict'; | ||
db.query(sql, function(err) { | ||
if (err) { | ||
cb(err); | ||
return; | ||
} | ||
if (err) { cb(err); return; } | ||
@@ -123,6 +120,3 @@ runScripts(parseInt(startVersion) + 1, cb); | ||
db.query('DESCRIBE `' + options.tableName + '`', function(err, rows) { | ||
if (err) { | ||
cb(err); | ||
return; | ||
} | ||
if (err) { cb(err); return; } | ||
@@ -132,6 +126,3 @@ if (rows.length === 2 && rows[0].Field === 'version' && rows[1].Field === 'running') { | ||
db.query('ALTER TABLE `' + options.tableName + '` ADD `id` tinyint(1) unsigned NOT NULL DEFAULT \'1\' FIRST;', function(err) { | ||
if (err) { | ||
cb(err); | ||
return; | ||
} | ||
if (err) { cb(err); return; } | ||
@@ -158,6 +149,3 @@ db.query('ALTER TABLE `' + options.tableName + '` ADD PRIMARY KEY `id` (`id`);', cb); | ||
db.query('SELECT version FROM `' + options.tableName + '`;', function(err, rows) { | ||
if (err) { | ||
cb(err); | ||
return; | ||
} | ||
if (err) { cb(err); return; } | ||
@@ -164,0 +152,0 @@ curVer = parseInt(rows[0].version); |
@@ -38,3 +38,3 @@ { | ||
}, | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"readmeFilename": "README.md", | ||
@@ -41,0 +41,0 @@ "scripts": { |
@@ -66,3 +66,5 @@ 'use strict'; | ||
fs.stat(altConfFile, function(err) { | ||
assert( ! err, 'fs.stat failed: ' + err.message); | ||
if (err) { | ||
assert( ! err, 'fs.stat failed: ' + err.message); | ||
} | ||
@@ -110,10 +112,10 @@ if ( ! err) { | ||
/*it('Make sure function works', function(done) { | ||
db.query('SELECT multi_two(4)', function(err, rows) { | ||
it('Make sure function works', function(done) { | ||
db.query('SELECT multi_two(4) AS foo', function(err, rows) { | ||
assert( ! err, 'err should be negative'); | ||
assert.deepEqual(rows[0], 8); | ||
assert.deepEqual(rows[0].foo, 8); | ||
done(); | ||
}); | ||
});*/ | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14341
246