mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 12:55:55 +01:00
fix DB migration and consistency issues
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
const build = require('./build');
|
||||
const packageJson = require('../../package');
|
||||
|
||||
const APP_DB_VERSION = 116;
|
||||
const APP_DB_VERSION = 118;
|
||||
const SYNC_VERSION = 2;
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -275,8 +275,9 @@ async function runAllChecks() {
|
||||
LEFT JOIN notes AS sourceNote ON sourceNote.noteId = links.noteId AND sourceNote.isDeleted = 0
|
||||
LEFT JOIN notes AS targetNote ON targetNote.noteId = links.noteId AND targetNote.isDeleted = 0
|
||||
WHERE
|
||||
sourceNote.noteId IS NULL
|
||||
OR targetNote.noteId IS NULL`,
|
||||
links.isDeleted = 0
|
||||
AND (sourceNote.noteId IS NULL
|
||||
OR targetNote.noteId IS NULL)`,
|
||||
"Link to source/target note link is broken", errorList);
|
||||
|
||||
await runSyncRowChecks("notes", "noteId", errorList);
|
||||
|
||||
Reference in New Issue
Block a user