Support the ongoing development of Laravel.io →
Database Eloquent

Hi. I'm migrating an old database to a Laravel-based app. One issue I'm coming across is that during the migration (a DB seeder), when deleted_at (and, in fact, all timestamp fields) does not have a value, it is being set at 0000-00-00 00:00:00. This breaks a lot of the functionality because those values are not null and their records are being treated as trashed incorrectly. Any idea on where to start tracking down the problem?

I should add that on the Model, $softDelete is set to true and the schema is using $table->softDeletes(). The DB Seeder is not setting deleted_at at all (unless it is actually deleted).

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

impleri impleri Joined 24 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.