mirror of
https://github.com/flarum/core.git
synced 2025-06-17 06:50:58 +02:00
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")
This commit is contained in:
@ -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\')'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user