fix(theme-editor): should add uid field in migration

This commit is contained in:
Rain 2023-10-30 11:26:39 +08:00
parent f42518b218
commit d871554bf1

View File

@ -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,