Does your seeder work if you call it in the console with php artisan db:seed?
Sep 24, 2019
9
Level 5
"$this->artisan('db:seed');" not seeding properly!
Hello everyone,
I am starting to use Laravels HTTP requests to test our back end API. However, I am running into an issue that I understand but am unable to fix.
The issue:
1) Tests\Unit\WorkspaceListTest::testListWorkspaces
Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such table: main.user (SQL: insert into "collections" (blah blah blah)
First off, the database is not meant to be main and the table is meant to be users and not user! It seems as if the database is not being seeded properly, but I have no idea why :/
The stack trace leads me back to this line of code:
$this->artisan('db:seed');
If anyone could help me understand the underlying problem and possibly help fix this I would be very grateful as I have been stuck on this for quite some time!
Thank you! :)
Level 28
1 like
Please or to participate in this conversation.