Database (database/database.sqlite) does not exist. (SQL: PRAGMA foreign_keys = ON;)
I have my database/database.sqlite created.
I have run php artisan make:auth successfully.
I have run php artisan migrate successfully.
Now, on clicking on register, I get the errors:
Database (database/database.sqlite) does not exist. (SQL: PRAGMA foreign_keys = ON;)
Kindly help with a fix please.
try put the full path of "database/database.sqlite" for DB_DATABASE in .env
DB_DATABASE=/home/projectname/database/database.sqlite
@siangboon I recently encountered the same problem and your suggestion worked. Thank you.
@joycey Sorry are you able to fix this issue, I have tried @siangboon suggestion but didn work still
Is possible has in .env file
DB_DATABASE=laravel # or other
Try use only
DB_CONNECTION=sqlite
Others values for DB_* comment.
Also
touch database/database.sqlite
why have the entire path of the SQLite database file for the app to work instead of only having the file name ?
"/home/username/Documents/apps/laravelApp/database/database.sqlite" instead of just "database.sql"
you can simply remove the line DB_DATABASE entirely from your .env file and laravel will figure it out for you.
Note that you should name the file like this
database/database.sqlite
Please or to participate in this conversation.