So I was thinking of taking it out of _config.php and having it in _ss_environment.php
It seems to be working okay on my test machine but thought I would ask for any gotcha's
@nightjarnz I didn’t really understand what you were saying. Are you saying it is bad to have the DB name defined in _ss_environment.php?
hmm, hang on, my brain isn't straight, let me just finish what I'm doing so I can provide a more sensible answer
but from the looks of it, basically; yes.
not bad, just... it's easy to run into your exact problem if you do 😉
@ccburns code always speaks truth 🙂 https://github.com/silverstripe/silverstripe-framework/blob/3.5/conf/ConfigureFromEnv.php#L78-L88
So I have removed $database from the _config.php file and it will be ONLY set in _ss_environment.php. Okay so as long as we don’t try to include $database anywhere then we should be all good
$database is not set (to a sane value) in
_config.php, then it'll use the
SS_DATABASE_NAME, and if that isn't defined, and the option to
CHOOSE is, it'll use the (Nth) parent directory's name.