I want to use sqlite in my local environment and mysql on production. How do I do that?
I cannot run my migrations if I remove the "default" in database.php where I also set up the array with "local" and "production" under "connections" with the appropriate driver.
I would not recommend this. Keep your production and local development environment as equal as possible.
Is there a specific reason you want to do this?
But if you still want to do it, can't you do this with an ENV setting?
Put different values in the .env file on your computer and the production server. That’s what it’s for. And if you do this, you need some way to check your migrations etc against something more realistic before you deploy to prod.
did you create your database/database.sqlite file and create the database accordingly?
As all said, you really need not make any change on database.php file but just update the .env database value for different environment will do.