mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +08: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:
parent
381c23894d
commit
b29d98adc4
|
@ -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\')'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user