visuddhinanda 2 年之前
父節點
當前提交
d3f4bd1fbf
共有 1 個文件被更改,包括 2 次插入 和 2 次删除
  1. 2 2
      app/Console/Commands/UpgradePcdBookId.php

+ 2 - 2
app/Console/Commands/UpgradePcdBookId.php

@@ -51,12 +51,12 @@ class UpgradePcdBookId extends Command
             if($table === 'all' || $table ==='fts'){
             if($table === 'all' || $table ==='fts'){
                 FtsText::where('book',$value->book)
                 FtsText::where('book',$value->book)
                     ->where('paragraph','>=',$value->paragraph)
                     ->where('paragraph','>=',$value->paragraph)
-                    ->update(['pcd_book_id'=>$value->id]);
+                    ->update(['pcd_book_id'=>$value->sn]);
             }
             }
             if($table === 'all' || $table ==='wbw'){
             if($table === 'all' || $table ==='wbw'){
                 WbwTemplate::where('book',$value->book)
                 WbwTemplate::where('book',$value->book)
                     ->where('paragraph','>=',$value->paragraph)
                     ->where('paragraph','>=',$value->paragraph)
-                    ->update(['pcd_book_id'=>$value->id]);
+                    ->update(['pcd_book_id'=>$value->sn]);
             }
             }
             $bar->advance();
             $bar->advance();
         }
         }