改进
This commit is contained in:
parent
fd4b9b8d72
commit
8ae7a7865e
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user