Browse Source

fix: provide an option to skip base reordering while updating

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5718/head
Pranav C 1 year ago
parent
commit
49c2b8d424
  1. 2
      packages/nocodb/src/models/Base.ts
  2. 1
      packages/nocodb/src/version-upgrader/ncProjectConfigUpgrader.ts

2
packages/nocodb/src/models/Base.ts

@ -91,6 +91,7 @@ export default class Base implements BaseType {
base: BaseType & {
id: string;
projectId: string;
skipReorder?: boolean;
},
ncMeta = Noco.ncMeta,
) {
@ -144,6 +145,7 @@ export default class Base implements BaseType {
// call before reorder to update cache
const returnBase = await this.get(oldBase.id, ncMeta);
if (!base.skipReorder)
await this.reorderBases(base.projectId, returnBase.id, ncMeta);
return returnBase;

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

@ -42,6 +42,7 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {
id: base.id,
projectId: base.project_id,
config,
skipReorder: true,
},
ncMeta,
),

Loading…
Cancel
Save