1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Merge pull request #52 from kezkankrayon/master

Fix comment count update in seed.
This commit is contained in:
Toby Zerner
2015-03-28 09:13:14 +10:30

View File

@@ -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\')'),
]);
}
}