From 8820330ff57dc28a79e779acf1a0d57b1e851afc Mon Sep 17 00:00:00 2001 From: towards-a-new-leftypol Date: Fri, 10 Nov 2023 02:22:35 -0500 Subject: [PATCH] return site_id from query_catalog --- sql/initialize.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/initialize.sql b/sql/initialize.sql index 184659d..dc25f56 100644 --- a/sql/initialize.sql +++ b/sql/initialize.sql @@ -217,7 +217,8 @@ RETURNS TABLE ( thread_id bigint, board_thread_id bigint, pathpart text, - name text + site_name text, + site_id int ) AS $$ WITH top AS @@ -257,7 +258,8 @@ RETURNS TABLE ( op_posts.*, threads.board_thread_id, boards.pathpart, - sites."name" + sites."name", + sites.site_id FROM op_posts JOIN post_counts ON op_posts.thread_id = post_counts.thread_id JOIN threads ON op_posts.thread_id = threads.thread_id