Closed WebProviderNGO closed 7 months ago
@WebProviderNGO this is very odd, our default DB config hasn't changed in years: https://github.com/wintercms/winter/blob/develop/config/database.php#L35
@mjauvin are you able to replicate this?
@LukeTowers the difference is that you added the following to core composer.json
:
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
So even when selecting SQLite
as the database engine during the install, the database gets taken from the .env file (which contains mysql as the database).
@LukeTowers I think we should remove/comment out the DB_* settings in the .env.example file, that would resolve the issue.
I would probably prefer removing that script entirely. While I am all for environment files, Winter works fine without them, and some people prefer the config files.
I know this was added in https://github.com/wintercms/winter/pull/939 to support Laravel Sail, but I would imagine one could simply copy .env.example
to .env
as part of the bootstrap process and still achieve the same effect.
@bennothommo what does the web-installer do with the config? Does it fill-in the dotEnv file or the config/database.php
one ?
@mjauvin it fills out the config currently, using the Laravel Config Writer that @jaxwilko wrote.
@bennothommo So I assume you remove the script entry in the composer.json ?
My personal view would be to remove the script in composer.json
and either people can run cp .env.example .env
or ./artisan winter:env
@marvindurot Will this break your workflow if we remove the command from the composer script but leave the example file?
Winter CMS Build
1.2
PHP Version
8.1
Database engine
SQLite
Plugins installed
No response
Issue description
After installing v1.2.4, when accessing the Backend, the error is "Database missing".
In the console after executing
php artisan winter:up
error:I carry out the installation as always, there have never been any problems before. Tried it on several independent hosting providers.
In the new version, I noticed that it is now necessary to specify the path to the database. I tried in the root (by default) and the storage folder (as was the case in older versions).
To work around the bug, I install v1.2.2 first and then update. Everything works without errors.
Steps to replicate
Just install a new project with a new version :)
Workaround
To work around the bug, I install v1.2.2 first and then update. Everything works without errors.