kopia lustrzana https://github.com/pixelfed/pixelfed
Update migration
rodzic
9dd58bbbc3
commit
3f9e113cb7
|
|
@ -15,7 +15,8 @@ return new class extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
Hashtag::chunkById(100, function($hashtags) {
|
||||
Hashtag::withoutEvents(function() {
|
||||
Hashtag::chunkById(50, function($hashtags) {
|
||||
foreach($hashtags as $hashtag) {
|
||||
$count = DB::table('status_hashtags')->whereHashtagId($hashtag->id)->count();
|
||||
$hashtag->cached_count = $count;
|
||||
|
|
@ -23,6 +24,7 @@ return new class extends Migration
|
|||
$hashtag->can_search = true;
|
||||
$hashtag->save();
|
||||
}
|
||||
}, 'id');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue