-- Add original Word comment timestamp persistence for Comments & Issues. -- created_at is the database insertion time. -- commented_at is the original timestamp from word/comments.xml when available. alter table public.document_comment_threads add column if not exists commented_at timestamptz; alter table public.document_comment_replies add column if not exists commented_at timestamptz; create index if not exists document_comment_threads_commented_at_idx on public.document_comment_threads(document_id, commented_at); create index if not exists document_comment_replies_commented_at_idx on public.document_comment_replies(thread_id, commented_at);