diff --git a/packages/tools/src/diffTools.ts b/packages/tools/src/diffTools.ts index 57301ede..c68d015f 100644 --- a/packages/tools/src/diffTools.ts +++ b/packages/tools/src/diffTools.ts @@ -69,12 +69,12 @@ export function generateDbPairingId(db: DatabaseInfo): DatabaseInfo { return { ...db, // ..._.mapValues(db, v => (_.isArray(v) ? v.map(generateObjectPairingId) : v)), - tables: (db.tables || []).map(generateTablePairingId), - views: (db.views || []).map(generateObjectPairingId), - procedures: (db.procedures || []).map(generateObjectPairingId), - functions: (db.functions || []).map(generateObjectPairingId), - triggers: (db.triggers || []).map(generateObjectPairingId), - matviews: (db.matviews || []).map(generateObjectPairingId), + tables: db.tables?.map(generateTablePairingId), + views: db.views?.map(generateObjectPairingId), + procedures: db.procedures?.map(generateObjectPairingId), + functions: db.functions?.map(generateObjectPairingId), + triggers: db.triggers?.map(generateObjectPairingId), + matviews: db.matviews?.map(generateObjectPairingId), }; }