fixup!: fix dbb

This commit is contained in:
jannyHou 2019-07-03 14:10:24 -04:00
parent c07f169ca1
commit 1334828bec
2 changed files with 6 additions and 2 deletions

View File

@ -50,7 +50,7 @@ printf "\n${CYAN}Clean up complete.${PLAIN}\n"
## Pin mysql docker image to version as `mysql` node.js driver does not support v8 yet
## See https://github.com/mysqljs/mysql/issues/2002
DOCKER_IMAGE=mysql:5.7.22
DOCKER_IMAGE=mysql:latest
## pull latest mysql image
printf "\n${RED}>> Pulling ${DOCKER_IMAGE} image${PLAIN} ${GREEN}...${PLAIN}"

View File

@ -28,9 +28,13 @@ global.getConfig = function(options) {
return dbConf;
};
let db;
global.getDataSource = global.getSchema = function(options, customClass) {
const ctor = customClass || DataSource;
const db = new ctor(require('../'), global.getConfig(options));
db = new ctor(require('../'), global.getConfig(options));
db.log = function(a) {
console.log(a);
}
// var db = new DataSource(require('../'), global.getConfig(options));
return db;
};