We use only mysql, so updating this means a lot of unused db backends like sqlite do not need to be built with gyp anymore. Note that this version is not yet released as stable, but works fine for us. The outstanding issues are not related to our use-case from what I can tell. Fixes #82
18 lines
454 B
JavaScript
18 lines
454 B
JavaScript
'use strict';
|
|
|
|
var async = require('async');
|
|
|
|
exports.up = function(db, callback) {
|
|
async.series([
|
|
db.runSql.bind(db, 'DELETE FROM clients'),
|
|
db.runSql.bind(db, 'ALTER TABLE clients ADD COLUMN type VARCHAR(16) NOT NULL'),
|
|
], callback);
|
|
};
|
|
|
|
exports.down = function(db, callback) {
|
|
db.runSql('ALTER TABLE clients DROP COLUMN type', function (error) {
|
|
if (error) console.error(error);
|
|
callback(error);
|
|
});
|
|
};
|