Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ddl/migrations/0226_comment_threads_comment_id_idx.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- Supports deferred comment triggers that classify a freshly inserted comment
-- by checking whether it has a comment_threads row:
--
-- WHERE comment_id = ?
--
-- The primary key is ordered as (parent_comment_id, comment_id), which is ideal
-- for parent-thread lookups but not for this reverse lookup used during comment
-- create handling.
CREATE INDEX CONCURRENTLY IF NOT EXISTS comment_threads_comment_id_idx
ON public.comment_threads USING btree (comment_id);
Loading