fix(cassandra): check column name correctly

This commit is contained in:
Nybkox
2025-02-06 11:05:24 +01:00
parent 13e4c2de03
commit 94cccf9e17

View File

@@ -35,7 +35,7 @@ function getShouldAddUuidPkInfo(tableInfo) {
const columnInfo = getColumnInfo(tableInfo, pkColumnName);
if (!columnInfo) return { shouldAddUuidPk: false };
const shouldAddUuidPk = writable.columnNames.every((i) => i !== columnInfo.columnName);
const shouldAddUuidPk = tableInfo.columns.every((i) => i.columnName !== columnInfo.columnName);
if (!shouldAddUuidPk) return { shouldAddUuidPk };
return { shouldAddUuidPk, pkColumnName };