mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
recalculate maxEntityChangeId after rollbacked transaction
This commit is contained in:
@@ -136,6 +136,10 @@ function fillAllEntityChanges() {
|
||||
});
|
||||
}
|
||||
|
||||
function recalculateMaxEntityChangeId() {
|
||||
maxEntityChangeId = sql.getValue("SELECT COALESCE(MAX(id), 0) FROM entity_changes");
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
addNoteReorderingEntityChange,
|
||||
moveEntityChangeToTop,
|
||||
@@ -143,5 +147,6 @@ module.exports = {
|
||||
addEntityChangeWithInstanceId,
|
||||
fillAllEntityChanges,
|
||||
addEntityChangesForSector,
|
||||
getMaxEntityChangeId: () => maxEntityChangeId
|
||||
getMaxEntityChangeId: () => maxEntityChangeId,
|
||||
recalculateMaxEntityChangeId
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user