From 9a73eb362063d720654b0de91571aa128824cd7f Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Mon, 11 Nov 2024 13:20:04 +0100 Subject: [PATCH] fixed deploy --- packages/tools/src/structureTools.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/tools/src/structureTools.ts b/packages/tools/src/structureTools.ts index 1f5099c9..ba3c7d0f 100644 --- a/packages/tools/src/structureTools.ts +++ b/packages/tools/src/structureTools.ts @@ -231,13 +231,13 @@ export function skipNamesInStructureByRegex(db: DatabaseInfo, regex: RegExp) { export function detectChangesInPreloadedRows(oldTable: TableInfo, newTable: TableInfo): boolean { const key = - newTable.preloadedRowsKey || - oldTable.preloadedRowsKey || - newTable.primaryKey?.columns?.map(x => x.columnName) || - oldTable.primaryKey?.columns?.map(x => x.columnName); + newTable?.preloadedRowsKey || + oldTable?.preloadedRowsKey || + newTable?.primaryKey?.columns?.map(x => x.columnName) || + oldTable?.primaryKey?.columns?.map(x => x.columnName); const oldRows = oldTable?.preloadedRows || []; const newRows = newTable?.preloadedRows || []; - const insertOnly = newTable.preloadedRowsInsertOnly || oldTable.preloadedRowsInsertOnly; + const insertOnly = newTable?.preloadedRowsInsertOnly || oldTable?.preloadedRowsInsertOnly; if (newRows.length != oldRows.length) { return true;