You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not presenting any actually "new" idea or feature, rather pointing to a small output consistency gap that I think would be better to be addressed..that's why chose the "general" category.
Running php artisan db:seed prints per-seeder progress for every seeder the DatabaseSeeder calls:
but, running php artisan db:seed --class=UserSeeder (or the positional form- db:seed UserSeeder) doesn't show that progress. rather just shows:
that means.. in this case, no confirmation shown for the seeder started, finished, or how long it took. In a large DB, this makes it difficult to track whether the command is still working or has silently hung..
Root cause of the inconsistency: the two paths dont go through the same code. The default path (db:seed without specific class requested) resolves DatabaseSeeder, whose run() typically calls $this->call([...]), and Seeder::call() renders the
RUNNING/DONE lines for each child seeder. but when a specific class is specified/passed, SeedCommand::handle() resolves and invokes that seeder directly, never goes through the call(), and thus never gets the same treatment.
Expected: db:seed --class=SpecificSeeder also should show the same RUNNING/DONE feedback for the SpecificSeeder, like it would show if it were invoked from inside the DatabaseSeeder::run(), so that users can track seeder progress easily.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
opened PR #61186 addressing this.