mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update migration
This commit is contained in:
parent
898911f9a9
commit
bf86ed6ff7
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ return new class extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Hashtag::withoutEvents(function() {
|
Hashtag::withoutEvents(function() {
|
||||||
Hashtag::chunkById(50, function($hashtags) {
|
Hashtag::whereNotNull('cached_count')->chunkById(50, function($hashtags) {
|
||||||
foreach($hashtags as $hashtag) {
|
foreach($hashtags as $hashtag) {
|
||||||
$count = DB::table('status_hashtags')->whereHashtagId($hashtag->id)->count();
|
$count = DB::table('status_hashtags')->whereHashtagId($hashtag->id)->count();
|
||||||
$hashtag->cached_count = $count;
|
$hashtag->cached_count = $count;
|
||||||
|
|
Loading…
Reference in a new issue