mirror of
https://github.com/flarum/framework.git
synced 2024-11-24 06:19:58 +08:00
Merge pull request #52 from kezkankrayon/master
Fix comment count update in seed.
This commit is contained in:
commit
3f6931b580
|
@ -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