@ -135,7 +123,7 @@ async function findBrokenReferenceIssues() {
}
}
asyncfunctionfindExistencyIssues(){
asyncfunctionfindExistencyIssues(){
// principle for fixing inconsistencies is that if the note itself is deleted (isDeleted=true) then all related entities should be also deleted (branches, links, attributes)
// principle for fixing inconsistencies is that if the note itself is deleted (isDeleted=true) then all related entities should be also deleted (branches, attributes)
// but if note is not deleted, then at least one branch should exist.
// but if note is not deleted, then at least one branch should exist.
// the order here is important - first we might need to delete inconsistent branches and after that
// the order here is important - first we might need to delete inconsistent branches and after that
@ -315,48 +303,6 @@ async function findLogicIssues() {
logFix(`Removed attribute ${attributeId} because target note ${targetNoteId} is also deleted.`);
logFix(`Removed attribute ${attributeId} because target note ${targetNoteId} is also deleted.`);
});
});
awaitfindIssues(`
SELECTlinkId
FROMlinks
WHEREtypeNOTIN('image','hyper','relation-map')`,
({linkId,type})=>`Link ${linkId} has invalid type '${type}'`);