From f54b1e62735ca89f82850bde681eb490b6884969 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 1 Nov 2024 11:33:42 +0000 Subject: [PATCH] refactor: improved logs --- .../upgraders/0227002_ncBrokenLinkRecovery.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/nocodb/src/version-upgrader/upgraders/0227002_ncBrokenLinkRecovery.ts b/packages/nocodb/src/version-upgrader/upgraders/0227002_ncBrokenLinkRecovery.ts index d3f567eb75..f58541b6c0 100644 --- a/packages/nocodb/src/version-upgrader/upgraders/0227002_ncBrokenLinkRecovery.ts +++ b/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}')`); } } }