mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
force note sync now syncs also note revision contents and attributes
This commit is contained in:
parent
69b53fdfb3
commit
d93b9b8a23
@ -77,12 +77,17 @@ async function forceNoteSync(req) {
|
|||||||
await syncTableService.addNoteSync(noteId);
|
await syncTableService.addNoteSync(noteId);
|
||||||
await syncTableService.addNoteContentSync(noteId);
|
await syncTableService.addNoteContentSync(noteId);
|
||||||
|
|
||||||
for (const branchId of await sql.getColumn("SELECT branchId FROM branches WHERE isDeleted = 0 AND noteId = ?", [noteId])) {
|
for (const branchId of await sql.getColumn("SELECT branchId FROM branches WHERE noteId = ?", [noteId])) {
|
||||||
await syncTableService.addBranchSync(branchId);
|
await syncTableService.addBranchSync(branchId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const attributeId of await sql.getColumn("SELECT attributeId FROM attributes WHERE noteId = ?", [noteId])) {
|
||||||
|
await syncTableService.addAttributeSync(attributeId);
|
||||||
|
}
|
||||||
|
|
||||||
for (const noteRevisionId of await sql.getColumn("SELECT noteRevisionId FROM note_revisions WHERE noteId = ?", [noteId])) {
|
for (const noteRevisionId of await sql.getColumn("SELECT noteRevisionId FROM note_revisions WHERE noteId = ?", [noteId])) {
|
||||||
await syncTableService.addNoteRevisionSync(noteRevisionId);
|
await syncTableService.addNoteRevisionSync(noteRevisionId);
|
||||||
|
await syncTableService.addNoteRevisionContentSync(noteRevisionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
await syncTableService.addRecentNoteSync(noteId);
|
await syncTableService.addRecentNoteSync(noteId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user