forked from mirror/pixelfed
Update migration
This commit is contained in:
parent
9dd58bbbc3
commit
3f9e113cb7
|
@ -15,14 +15,16 @@ return new class extends Migration
|
||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Hashtag::chunkById(100, function($hashtags) {
|
Hashtag::withoutEvents(function() {
|
||||||
foreach($hashtags as $hashtag) {
|
Hashtag::chunkById(50, function($hashtags) {
|
||||||
$count = DB::table('status_hashtags')->whereHashtagId($hashtag->id)->count();
|
foreach($hashtags as $hashtag) {
|
||||||
$hashtag->cached_count = $count;
|
$count = DB::table('status_hashtags')->whereHashtagId($hashtag->id)->count();
|
||||||
$hashtag->can_trend = true;
|
$hashtag->cached_count = $count;
|
||||||
$hashtag->can_search = true;
|
$hashtag->can_trend = true;
|
||||||
$hashtag->save();
|
$hashtag->can_search = true;
|
||||||
}
|
$hashtag->save();
|
||||||
|
}
|
||||||
|
}, 'id');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue