mirror of
https://gitlab.com/commento/commento.git
synced 2026-09-12 09:05:30 -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