fix: never use Eloquent in migration

This commit is contained in:
Phan An 2024-07-11 17:21:56 +02:00
parent c656eac5a5
commit 9f414be1f3

View file

@ -16,7 +16,7 @@ return new class extends Migration {
$table->timestamps();
});
Playlist::query()->get()->each(static function (Playlist $playlist): void {
DB::table('playlists')->get()->each(static function ($playlist): void {
DB::table('playlist_song')->where('playlist_id', $playlist->id)->update([
'user_id' => $playlist->user_id,
'created_at' => now(),