Skip to content

Commit 2b8e04e

Browse files
committed
added note history converter
1 parent 95a67bd commit 2b8e04e

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)