From be067ae1b6dcde79e8045d8d0a97cb17e53bc10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciara=CC=81n=20O=27Mara?= Date: Sat, 28 Mar 2015 05:35:09 +1100 Subject: [PATCH] Fix comment count update. Addresses the following error when using pqsql. [PDOException] SQLSTATE[42703]: Undefined column: 7 ERROR: column "comment" does not exist LINE 1: ...d) FROM posts WHERE user_id = users.id and type = "comment") --- src/Core/Seeders/DiscussionsTableSeeder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Seeders/DiscussionsTableSeeder.php b/src/Core/Seeders/DiscussionsTableSeeder.php index 951ce6939..81041e5c0 100644 --- a/src/Core/Seeders/DiscussionsTableSeeder.php +++ b/src/Core/Seeders/DiscussionsTableSeeder.php @@ -131,7 +131,7 @@ class DiscussionsTableSeeder extends Seeder $prefix = DB::getTablePrefix(); DB::table('users')->update([ 'discussions_count' => DB::raw('(SELECT COUNT(id) FROM '.$prefix.'discussions WHERE start_user_id = '.$prefix.'users.id)'), - 'comments_count' => DB::raw('(SELECT COUNT(id) FROM '.$prefix.'posts WHERE user_id = '.$prefix.'users.id and type = "comment")'), + 'comments_count' => DB::raw('(SELECT COUNT(id) FROM '.$prefix.'posts WHERE user_id = '.$prefix.'users.id and type = \'comment\')'), ]); } }