mirror of
https://gitlab.com/commento/commento.git
synced 2026-06-17 09:55:27 -04:00
db: build the comments count column
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
-- Build the comments count column
|
||||
|
||||
UPDATE pages
|
||||
SET commentCount = subquery.commentCount
|
||||
FROM (
|
||||
SELECT COUNT(commentHex) as commentCount
|
||||
FROM comments
|
||||
WHERE state = 'approved'
|
||||
GROUP BY (domain, path)
|
||||
) as subquery;
|
||||
Reference in New Issue
Block a user