*
* @var string
*/
- protected $signature = 'chatlib:database {which=de} {size=7}';
+ protected $signature = 'chatlib:database {which=de} {size=3}';
/**
* The console command description.
$query->whereNull('detected_language');
$query->orWhere('detected_language', '=', $lang);
})
- ->whereRaw('LENGTH(`text_content`) > 10')
+ ->orderBy('channel_id')
+ ->orderBy('created_at')
->chunk(5000, function ($msgs) use (&$count, $db) {
+ $previous = null;
foreach ($msgs as $msg) {
- $db->addMessage($msg);
+ $db->addMessage($msg, $previous);
+ $previous = $msg;
++$count;
}
$this->line($count);