From 282645ed8b215713ca19a9f845d7b702e7434a96 Mon Sep 17 00:00:00 2001 From: chenos Date: Wed, 13 Sep 2023 22:47:33 +0800 Subject: [PATCH] fix: db.sync --- .../migrations/20230506152253-basic-authenticator.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230506152253-basic-authenticator.ts b/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230506152253-basic-authenticator.ts index c2f9b54ed..0a8be2b04 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230506152253-basic-authenticator.ts +++ b/packages/plugins/@nocobase/plugin-auth/src/server/migrations/20230506152253-basic-authenticator.ts @@ -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) {