Skip to content

Commit a891800

Browse files
authored
Merge pull request #270 from codex-team/add-converter-for-note-history
chore(note-history): Add converter for note history
2 parents 95a67bd + 2b8e04e commit a891800

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- Insert note history records for notes that do not have them
2+
INSERT INTO public.note_history (note_id, user_id, tools, content)
3+
SELECT n.id, n.creator_id, n.tools, n.content
4+
FROM public.notes n
5+
LEFT JOIN public.note_history nh ON n.id = nh.note_id
6+
WHERE nh.note_id IS NULL;

0 commit comments

Comments
 (0)