Browse Source

refactor: improved logs

pull/9684/head
Pranav C 4 weeks ago
parent
commit
f54b1e6273
  1. 7
      packages/nocodb/src/version-upgrader/upgraders/0227002_ncBrokenLinkRecovery.ts

7
packages/nocodb/src/version-upgrader/upgraders/0227002_ncBrokenLinkRecovery.ts

@ -3,7 +3,6 @@ import type { NcUpgraderCtx } from '~/version-upgrader/NcUpgrader';
import type { MetaService } from '~/meta/meta.service';
import { MetaTable } from '~/utils/globals';
import { Column } from '~/models';
import { parseMetaProp } from '~/utils/modelUtils';
import { isEE } from '~/utils';
/**
@ -35,7 +34,7 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {
// Recover broken link
for (const column of columns) {
logger.log(`Recovering column '${column.title}' with id '${column.id}'`);
logger.log(`Recovering column '${column.title}' (ID: '${column.id}')`);
let relatedTableId;
@ -279,7 +278,7 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {
if (!foundAndMapped) {
logger.error(
`Couldn't find any column which is related to the link column '${column.title}' with id '${column.id}'`,
`No related column found for link column '${column.title}' (ID: '${column.id}'). Deleting it.`,
);
// delete the link column since it's not useful anymore and not recoverable
@ -291,6 +290,8 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {
column.id,
ncMeta,
);
} else {
logger.log(`Recovered column '${column.title}' (ID: '${column.id}')`);
}
}
}

Loading…
Cancel
Save