squash psql migration. add event_data migration

This commit is contained in:
Francis Cao committed 2023-07-10 23:08:57 -07:00
1 parent 3749e2a70d
commit 8abeba4c0d
6 files changed
+53 -38

No files matched your search

+2 -6
View File
@@ -20,12 +20,8 @@ export async function saveSessionData(data: {
sessionId,
key: a.key,
stringValue:
a.dynamicDataType === DATA_TYPE.string ||
a.dynamicDataType === DATA_TYPE.boolean ||
a.dynamicDataType === DATA_TYPE.array
? a.value
: null,
numericValue: a.dynamicDataType === DATA_TYPE.number ? a.value : null,
a.dynamicDataType === DATA_TYPE.number ? parseFloat(a.value).toFixed(4) : a.value.toString(),
numberValue: a.dynamicDataType === DATA_TYPE.number ? a.value : null,
dateValue: a.dynamicDataType === DATA_TYPE.date ? new Date(a.value) : null,
dataType: a.dynamicDataType,
}));