diff --git a/packages/nocodb/src/models/Base.ts b/packages/nocodb/src/models/Base.ts index 2846b3b7b4..92f04e4d18 100644 --- a/packages/nocodb/src/models/Base.ts +++ b/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,7 +145,8 @@ export default class Base implements BaseType { // call before reorder to update cache const returnBase = await this.get(oldBase.id, ncMeta); - await this.reorderBases(base.projectId, returnBase.id, ncMeta); + if (!base.skipReorder) + await this.reorderBases(base.projectId, returnBase.id, ncMeta); return returnBase; } diff --git a/packages/nocodb/src/version-upgrader/ncProjectConfigUpgrader.ts b/packages/nocodb/src/version-upgrader/ncProjectConfigUpgrader.ts index 875672a272..c4c3855018 100644 --- a/packages/nocodb/src/version-upgrader/ncProjectConfigUpgrader.ts +++ b/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, ),