This commit is contained in:
iVampireSP.com 2023-03-08 01:15:56 +08:00
parent fd4b9b8d72
commit 8ae7a7865e
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -5,7 +5,8 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
return new class extends Migration
{
/**
* Run the migrations.
*/
@ -32,7 +33,7 @@ public function up(): void
// 为已有的主机设置默认值
Host::chunk(100, function ($hosts) use (&$count) {
$hosts->each(function ($host) use (&$count) {
echo "Migrating {$host->id} ({$host->name})... {$count} left" . PHP_EOL;
echo "Migrating {$host->id} ({$host->name})... {$count} left".PHP_EOL;
$host->day_at = $host->created_at->day;