add relational migrations. update event_key references to data_key

This commit is contained in:
Francis Cao 2024-04-08 20:24:15 -07:00
parent cc834083d9
commit 7381254cc2
10 changed files with 73 additions and 33 deletions

View file

@ -36,7 +36,7 @@ async function relationalQuery(data: {
id: uuid(),
websiteEventId: eventId,
websiteId,
eventKey: a.key,
dataKey: a.key,
stringValue: getStringValue(a.value, a.dataType),
numberValue: a.dataType === DATA_TYPE.number ? a.value : null,
dateValue: a.dataType === DATA_TYPE.date ? new Date(a.value) : null,
@ -69,7 +69,7 @@ async function clickhouseQuery(data: {
event_id: eventId,
url_path: urlPath,
event_name: eventName,
event_key: a.key,
data_key: a.key,
string_value: getStringValue(a.value, a.dataType),
number_value: a.dataType === DATA_TYPE.number ? a.value : null,
date_value: a.dataType === DATA_TYPE.date ? getDateFormat(a.value) : null,