diff --git a/packages/plugins/client/src/migrations/20230620203213-admin-ui-schema-uid.ts b/packages/plugins/client/src/migrations/20230620203214-admin-ui-schema-uid.ts similarity index 79% rename from packages/plugins/client/src/migrations/20230620203213-admin-ui-schema-uid.ts rename to packages/plugins/client/src/migrations/20230620203214-admin-ui-schema-uid.ts index a956d793eb..ef951cfbb0 100644 --- a/packages/plugins/client/src/migrations/20230620203213-admin-ui-schema-uid.ts +++ b/packages/plugins/client/src/migrations/20230620203214-admin-ui-schema-uid.ts @@ -8,7 +8,9 @@ export default class extends Migration { const routes = await uiRoutes.find(); for (const route of routes) { if (route.uiSchemaUid && route?.options?.component === 'AdminLayout') { - instance.set('options.adminSchemaUid', route.uiSchemaUid); + const options = instance.options || {}; + options['adminSchemaUid'] = route.uiSchemaUid; + instance.set('options', options); console.log('options.adminSchemaUid', route.uiSchemaUid); await instance.save(); return; diff --git a/packages/plugins/mobile-client/src/server/migrations/20230620203215-mobile-ui-schema-uid.ts b/packages/plugins/mobile-client/src/server/migrations/20230620203216-mobile-ui-schema-uid.ts similarity index 79% rename from packages/plugins/mobile-client/src/server/migrations/20230620203215-mobile-ui-schema-uid.ts rename to packages/plugins/mobile-client/src/server/migrations/20230620203216-mobile-ui-schema-uid.ts index a86662d8e0..fbf15f801c 100644 --- a/packages/plugins/mobile-client/src/server/migrations/20230620203215-mobile-ui-schema-uid.ts +++ b/packages/plugins/mobile-client/src/server/migrations/20230620203216-mobile-ui-schema-uid.ts @@ -8,7 +8,9 @@ export default class extends Migration { const routes = await uiRoutes.find(); for (const route of routes) { if (route.uiSchemaUid && route?.options?.component === 'MApplication') { - instance.set('options.mobileSchemaUid', route.uiSchemaUid); + const options = instance.options || {}; + options['mobileSchemaUid'] = route.uiSchemaUid; + instance.set('options', options); console.log('options.mobileSchemaUid', route.uiSchemaUid); await instance.save(); return;