fix: db.sync

This commit is contained in:
chenos 2023-09-13 22:47:33 +08:00
parent 6058850db1
commit 282645ed8b

View File

@ -9,6 +9,18 @@ export default class AddBasicAuthMigration extends Migration {
drop: false,
},
});
await this.db.getCollection('tokenBlacklist').sync({
force: false,
alter: {
drop: false,
},
});
await this.db.getCollection('usersAuthenticators').sync({
force: false,
alter: {
drop: false,
},
});
const repo = this.context.db.getRepository('authenticators');
const existed = await repo.count();
if (existed) {