From 74d74fec904e57bcc513fd5740934aaf48d57ab8 Mon Sep 17 00:00:00 2001 From: retoor Date: Tue, 3 Dec 2024 04:21:25 +0100 Subject: [PATCH] Trigger. --- src/drstats/db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drstats/db.py b/src/drstats/db.py index 6e96f39..47e2ffe 100644 --- a/src/drstats/db.py +++ b/src/drstats/db.py @@ -199,11 +199,11 @@ def get_db(): ) db.query("DROP VIEW IF EXISTS rants_of_user") db.query( - "CREATE VIEW rants_of_user as SELECT user_username as username, GROUP_CONCAT(text) as text FROM rants" + "CREATE VIEW rants_of_user as SELECT user_username as username, GROUP_CONCAT(text) as text FROM rants GROUP BY username" ) db.query("DROP VIEW IF EXISTS posts_of_user") db.query( - "CREATE VIEW posts_of_user AS SELECT user_username as username, GROUP_CONCAT(body) as text FROM comments" + "CREATE VIEW posts_of_user AS SELECT user_username as username, GROUP_CONCAT(body) as text FROM comments GROUP BY username" ) db.query("DROP VIEW IF EXISTS contributions_extended_ranked") db.query(