small fixes to migration scripts

This commit is contained in:
zadam 2021-01-30 22:00:09 +01:00
parent 69bdcdd74a
commit 61ddd8afc6
2 changed files with 3 additions and 0 deletions

View file

@ -14,6 +14,8 @@ SELECT entityName, entityId, '', sourceId, isSynced, 'now', 0 FROM entity_change
UPDATE 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 isErased
FROM attributes

View file

@ -1 +1,2 @@
UPDATE options SET name = 'eraseEntitiesAfterTimeInSeconds' WHERE name = 'eraseNotesAfterTimeInSeconds';
UPDATE entity_changes SET entityName = 'eraseEntitiesAfterTimeInSeconds' WHERE entityName = 'eraseNotesAfterTimeInSeconds';