Browse Source

fix: use decrypted config for update, update upgrader version, pass ncMeta reference

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5718/head
Pranav C 2 years ago
parent
commit
0eccc15074
  1. 2
      packages/nocodb/src/services/app-init.service.ts
  2. 14
      packages/nocodb/src/version-upgrader/ncProjectConfigUpgrader.ts

2
packages/nocodb/src/services/app-init.service.ts

@ -35,7 +35,7 @@ export const appInitServiceProvider: Provider = {
metaService: MetaService, metaService: MetaService,
eventEmitter: IEventEmitter, eventEmitter: IEventEmitter,
) => { ) => {
process.env.NC_VERSION = '0105004'; process.env.NC_VERSION = '0107004';
await NocoCache.init(); await NocoCache.init();

14
packages/nocodb/src/version-upgrader/ncProjectConfigUpgrader.ts

@ -36,11 +36,15 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {
// Update the base config with the new secret key // Update the base config with the new secret key
actions.push( actions.push(
Base.updateBase(base.id, { Base.updateBase(
id: base.id, base.id,
projectId: base.project_id, {
config: base.config, id: base.id,
}), projectId: base.project_id,
config,
},
ncMeta,
),
); );
} }
await Promise.all(actions); await Promise.all(actions);

Loading…
Cancel
Save