Explorar o código

Merge pull request #4022 from pixelfed/staging

Update migration
daniel %!s(int64=2) %!d(string=hai) anos
pai
achega
989f7f8386

+ 1 - 1
database/migrations/2022_12_27_102053_update_hashtag_count.php

@@ -16,7 +16,7 @@ return new class extends Migration
     public function up()
     {
         Hashtag::withoutEvents(function() {
-            Hashtag::chunkById(50, function($hashtags) {
+            Hashtag::whereNotNull('cached_count')->chunkById(50, function($hashtags) {
                 foreach($hashtags as $hashtag) {
                     $count = DB::table('status_hashtags')->whereHashtagId($hashtag->id)->count();
                     $hashtag->cached_count = $count;