Removed last of the node-based db_migrate code.
This commit is contained in:
parent
fa149441cb
commit
09d41b29d6
@ -1,30 +0,0 @@
|
|||||||
var dbm = global.dbm || require('db-migrate');
|
|
||||||
var type = dbm.dataType;
|
|
||||||
var fs = require('fs');
|
|
||||||
var path = require('path');
|
|
||||||
|
|
||||||
exports.up = function(db, callback) {
|
|
||||||
var filePath = path.join(__dirname + '/sqls/20151209054632-initial-schema-up.sql');
|
|
||||||
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
||||||
if (err) return callback(err);
|
|
||||||
console.log('received data: ' + data);
|
|
||||||
|
|
||||||
db.runSql(data, function(err) {
|
|
||||||
if (err) return callback(err);
|
|
||||||
callback();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.down = function(db, callback) {
|
|
||||||
var filePath = path.join(__dirname + '/sqls/20151209054632-initial-schema-down.sql');
|
|
||||||
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
||||||
if (err) return callback(err);
|
|
||||||
console.log('received data: ' + data);
|
|
||||||
|
|
||||||
db.runSql(data, function(err) {
|
|
||||||
if (err) return callback(err);
|
|
||||||
callback();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user