mirror of
https://github.com/flarum/framework.git
synced 2024-11-24 11:32:40 +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();
|
$prefix = DB::getTablePrefix();
|
||||||
DB::table('users')->update([
|
DB::table('users')->update([
|
||||||
'discussions_count' => DB::raw('(SELECT COUNT(id) FROM '.$prefix.'discussions WHERE start_user_id = '.$prefix.'users.id)'),
|
'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