diff --git a/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250851-theme-editor.ts b/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250851-theme-editor.ts index 0b51f4183..3ca54b9ca 100644 --- a/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250851-theme-editor.ts +++ b/packages/plugins/@nocobase/plugin-theme-editor/src/server/migrations/202307250851-theme-editor.ts @@ -16,7 +16,13 @@ export default class ThemeEditorMigration extends Migration { return; } - this.db.getCollection('themeConfig').sync(); + const collection = this.db.getCollection('themeConfig'); + if (!collection.hasField('uid')) { + collection.addField('uid', { + type: 'uid', + }); + } + collection.sync(); const themes = { [defaultTheme.uid]: defaultTheme,