mirror of
https://gitlab.com/commento/commento.git
synced 2025-04-28 18:40:29 -04:00
11 lines
224 B
SQL
11 lines
224 B
SQL
-- 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;
|