Write: Log also newly created id's

This commit is contained in:
ShootingStar91
2024-08-24 15:54:29 +03:00
parent ec1e3fdf41
commit 3e26a92d62
+3
View File
@@ -115,6 +115,9 @@ const writeTable = async <T extends CustomObject>(obj: T, tableName: AllowedTabl
)) as Record<string, string | number>[]
id = result[0][idFieldName]
type = 'add'
// Add the newly created id to list, so that it will be logged correctly
fieldsToWrite.push({ table: tableName, column: idFieldName, value: id })
}
writeContext.writeList.push({ items: fieldsToWrite, type, table: tableName })
}