mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 02:30:42 +01:00
unify audit fields, fixes #102
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
const build = require('./build');
|
||||
const packageJson = require('../../package');
|
||||
|
||||
const APP_DB_VERSION = 93;
|
||||
const APP_DB_VERSION = 94;
|
||||
|
||||
module.exports = {
|
||||
appVersion: packageJson.version,
|
||||
|
||||
@@ -10,7 +10,7 @@ async function addNoteEvent(noteId, comment) {
|
||||
await sql.insert('event_log', {
|
||||
noteId : noteId,
|
||||
comment: comment,
|
||||
dateAdded: dateUtils.nowDate()
|
||||
dateCreated: dateUtils.nowDate()
|
||||
});
|
||||
|
||||
log.info("Event log for " + noteId + ": " + comment);
|
||||
|
||||
@@ -127,7 +127,7 @@ async function updateOptions(entity, sourceId) {
|
||||
async function updateRecentNotes(entity, sourceId) {
|
||||
const orig = await sql.getRowOrNull("SELECT * FROM recent_notes WHERE branchId = ?", [entity.branchId]);
|
||||
|
||||
if (orig === null || orig.dateAccessed < entity.dateAccessed) {
|
||||
if (orig === null || orig.dateCreated < entity.dateCreated) {
|
||||
await sql.transactional(async () => {
|
||||
await sql.replace('recent_notes', entity);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user