craftcms/craft

Database driver is not a environment specific config

carlcs opened this issue · 1 comments

Unless I’m missing something it’s not really practicable to use 'mysql' in one environment and 'pgsql' in another.

'driver' => getenv('DB_DRIVER'),

The installer’s ability to define database connection settings (including the driver) only works if config/db.php is getting all its values from environment variables defined in .env (using the same variable names that this project uses).

Once connection settings are established, you’re correct that there’s not much value in defining the DB driver in .env versus just hard-coding it in config/db.php.