fix: original error: SQLITE_ERROR: no such column: options

This commit is contained in:
chenos 2023-09-11 14:17:12 +08:00
parent 74bd479de0
commit 6cc88dfa2b
2 changed files with 8 additions and 0 deletions

View File

@ -10,6 +10,10 @@ export default class extends Migration {
}
const uiRoutes = this.db.getRepository('uiRoutes');
const routes = await uiRoutes.find();
if (!uiRoutes) {
return;
}
await this.db.getCollection('systemSettings').sync();
for (const route of routes) {
if (route.uiSchemaUid && route?.options?.component === 'AdminLayout') {
const options = instance.options || {};

View File

@ -9,6 +9,10 @@ export default class extends Migration {
return;
}
const uiRoutes = this.db.getRepository('uiRoutes');
if (!uiRoutes) {
return;
}
await this.db.getCollection('systemSettings').sync();
const routes = await uiRoutes.find();
for (const route of routes) {
if (route.uiSchemaUid && route?.options?.component === 'MApplication') {