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
commit 3f6931b580

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