fix: db:sync not working (#348)
This commit is contained in:
parent
eb49849803
commit
8ee25e1109
@ -73,8 +73,17 @@ export class Database extends EventEmitter implements AsyncEmitter {
|
|||||||
if (options instanceof Sequelize) {
|
if (options instanceof Sequelize) {
|
||||||
this.sequelize = options;
|
this.sequelize = options;
|
||||||
} else {
|
} else {
|
||||||
this.sequelize = new Sequelize(options);
|
const opts = {
|
||||||
this.options = options;
|
sync: {
|
||||||
|
alter: {
|
||||||
|
drop: false,
|
||||||
|
},
|
||||||
|
force: false,
|
||||||
|
},
|
||||||
|
...options,
|
||||||
|
};
|
||||||
|
this.sequelize = new Sequelize(opts);
|
||||||
|
this.options = opts;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.collections = new Map();
|
this.collections = new Map();
|
||||||
|
Loading…
Reference in New Issue
Block a user