feat: refs #6449 add summaryId
gitea/mylogger/pipeline/pr-master This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-04-11 15:19:24 +02:00
parent 2bb99bf093
commit 66e8f149ea
2 changed files with 6 additions and 3 deletions

View File

@ -23,6 +23,7 @@ logs:
- itemTag
- name: item
showField: name
showId: id
logFields:
- size
exclude:

View File

@ -80,7 +80,8 @@ module.exports = class MyLogger {
oldInstance = ?,
newInstance = ?,
changedModelId = ?,
changedModelValue = ?`
changedModelValue = ?,
summaryId = ?`
);
logInfo.fetchStmt = await db.prepare(
`SELECT id FROM ${sqlTable}
@ -512,7 +513,7 @@ module.exports = class MyLogger {
oldI = change.instance;
break;
}
const summaryId = row[tableInfo.conf.showId];
const modelId = row[tableInfo.idName];
const modelValue = change.modelValue ?? null;
const oldInstance = oldI ? JSON.stringify(oldI) : null;
@ -553,7 +554,8 @@ module.exports = class MyLogger {
oldInstance,
newI ? JSON.stringify(newI) : null,
modelId,
modelValue
modelValue,
summaryId
]);
}