Reputation: 713
I'm studying laravel then I switched mysql from sqlite. I deleted the database.sqlite file, configure the database.php to mysql and .env file.
I'm having a error "Database (database.sqlite) does not exist". How to fix this error?
Upvotes: 4
Views: 9992
Reputation: 1702
If the above solution can not handle the current issue. click here
Issue with SQLite and Laravel on Heroku
Upvotes: 0
Reputation: 384
You don't need anything in the .env file except the DB_CONNECTION key/value pair. When you are using SQLite, remove all of the following keys:
DB_HOST
DB_PORT
DB_DATABASE
DB_USERNAME
DB_PASSWORD
Upvotes: 2
Reputation: 4234
The sqlite driver doesn't create the database file if it doesn't exist.
The simple solution is to create an empty file just before migrating the database into it (filling the file with schemas and data)
Simply put, this command will fix it:
touch database/database.sqlite
Upvotes: 10