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
small fixes to migration scripts
zadam61ddd8afc6b1
diff --git a/db/migrations/0173__isErased_in_entity_changes.sql b/db/migrations/0173__isErased_in_entity_changes.sqlindex 1d8e505234..714a973f7b 100644--- a/db/migrations/0173__isErased_in_entity_changes.sql+++ b/db/migrations/0173__isErased_in_entity_changes.sql@@ -14,6 +14,8 @@ SELECT entityName, entityId, '', sourceId, isSynced, 'now', 0 FROM entity_changeUPDATE mig_entity_changes SET isErased = (SELECT isErased FROM notes WHERE noteId = entityId) WHERE entityName = 'notes';UPDATE mig_entity_changes SET utcDateChanged = COALESCE((SELECT utcDateModified FROM notes WHERE noteId = entityId), '2020-12-14 14:07:05.165Z') WHERE entityName = 'notes';+UPDATE mig_entity_changes SET isErased = (SELECT isErased FROM notes WHERE noteId = entityId) WHERE entityName = 'note_contents';+UPDATE mig_entity_changes SET isErased = (SELECT isErasedFROM attributesdiff --git a/db/migrations/0175__rename_eraseNotesAfterTimeInSeconds.sql b/db/migrations/0175__rename_eraseNotesAfterTimeInSeconds.sqlindex 03499379b9..ebdbc314f1 100644--- a/db/migrations/0175__rename_eraseNotesAfterTimeInSeconds.sql+++ b/db/migrations/0175__rename_eraseNotesAfterTimeInSeconds.sql@@ -1 +1,2 @@UPDATE options SET name = 'eraseEntitiesAfterTimeInSeconds' WHERE name = 'eraseNotesAfterTimeInSeconds';+UPDATE entity_changes SET entityName = 'eraseEntitiesAfterTimeInSeconds' WHERE entityName = 'eraseNotesAfterTimeInSeconds';