Commit 530c3741 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix visible_comments view definition.

parent 16e290e3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -77,5 +77,6 @@ CREATE VIEW visible_comments AS SELECT * FROM comments WHERE deleted = 0;
CREATE VIEW voted_comments AS SELECT
    c.*,
    SUM(v.value) AS vote
FROM visible_comments c LEFT JOIN votes v ON c.id = v.comment_id;
FROM visible_comments c LEFT JOIN votes v ON c.id = v.comment_id
GROUP BY c.id;