Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix migration to handle duplicates in entity_changes, #2534
zadam9df521109bd7
diff --git a/db/migrations/0187__add_changeId_to_entity_changes.sql b/db/migrations/0187__add_changeId_to_entity_changes.sqlindex 315d73f2ce..925db2eb74 100644--- a/db/migrations/0187__add_changeId_to_entity_changes.sql+++ b/db/migrations/0187__add_changeId_to_entity_changes.sql@@ -1,5 +1,5 @@-- delete duplicates https://github.com/zadam/trilium/issues/2534-DELETE FROM entity_changes WHERE id IN (+DELETE FROM entity_changes WHERE isErased = 0 AND id IN (SELECT id FROM entity_changes ecWHERE (SELECT COUNT(*) FROM entity_changes