make migration more robust, fixes #1271

This commit is contained in:
zadam 2020-09-26 23:25:35 +02:00
parent 9de51c8b9e
commit 8f68b4f298

View File

@ -11,7 +11,7 @@ INSERT INTO note_contents_mig (noteId, content, hash, dateModified, utcDateModif
SELECT noteId,
content,
hash,
(SELECT dateModified FROM notes WHERE noteId = note_contents.noteId),
COALESCE((SELECT dateModified FROM notes WHERE noteId = note_contents.noteId), utcDateModified),
utcDateModified
FROM note_contents;