From 2ac377161f2dc45f0534d96096083ee676c8f77c Mon Sep 17 00:00:00 2001 From: chenos Date: Tue, 31 Oct 2023 12:22:31 +0800 Subject: [PATCH] fix(theme-editor): migration error --- ...50852-theme-editor.ts => 202307250853-theme-editor.ts} | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) rename packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/{202307250852-theme-editor.ts => 202307250853-theme-editor.ts} (94%) diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250852-theme-editor.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250853-theme-editor.ts similarity index 94% rename from packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250852-theme-editor.ts rename to packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250853-theme-editor.ts index 3ca54b9cad..c9423b788a 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250852-theme-editor.ts +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250853-theme-editor.ts @@ -17,12 +17,8 @@ export default class ThemeEditorMigration extends Migration { } const collection = this.db.getCollection('themeConfig'); - if (!collection.hasField('uid')) { - collection.addField('uid', { - type: 'uid', - }); - } - collection.sync(); + + await collection.sync(); const themes = { [defaultTheme.uid]: defaultTheme,