Skip to content

Commit

Permalink
added note history converter
Browse files Browse the repository at this point in the history
  • Loading branch information
e11sy committed Jul 24, 2024
1 parent 95a67bd commit 2b8e04e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions migrations/tenant/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- Insert note history records for notes that do not have them
INSERT INTO public.note_history (note_id, user_id, tools, content)
SELECT n.id, n.creator_id, n.tools, n.content
FROM public.notes n
LEFT JOIN public.note_history nh ON n.id = nh.note_id
WHERE nh.note_id IS NULL;

0 comments on commit 2b8e04e

Please sign in to comment.