fikurimax's avatar

Laravel Pest testing error table already exists with SQLite

I have a SQLite database that I used for part of my application, mainly I used MySQL. But whenever I run a test I always get an error said that the table is already exists in the SQLite database. Is there any specific things to do if I wanna use SQLite?

0 likes
2 replies
webrobert's avatar

You can actually define a whole separate database in your laravel database config. Then reference it in your php unit xml file.

fikurimax's avatar
fikurimax
OP
Best Answer
Level 1

@webrobert Thanks for the reply, I ended up put Schema::dropIfExists(); before the Schema::create() function, and it works

Please or to participate in this conversation.