fixup!: fix dbb
This commit is contained in:
parent
c07f169ca1
commit
1334828bec
2
setup.sh
2
setup.sh
|
@ -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}"
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue