- Issue created by @clemorphy
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
The database needs to be called "default". For the actual code, see
::validateIsSupported()
. Looking at
validateIsSupported()
, why does it look for$database['default']['prefix']['default']
?
Shouldn't it look for$database['default']['default']['prefix']
?Looking at
validateIsSupported()
it seems to look for
$database['default']['prefix']['default']
.
Shouldn't it look for$database['default']['default']['prefix']
?My db infos are defined like this :
$databases['default']['default']['database'] = "db"; $databases['default']['default']['username'] = "db"; $databases['default']['default']['password'] = "db"; $databases['default']['default']['host'] = $host; $databases['default']['default']['driver'] = $driver; $databases['default']['default']['port'] = $port; $databases['default']['default']['prefix'] = '';
Drupal is ok with this, and it seems to be the recommended format.
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
Yes, it looks like it is not checking correctly. I would welcome a patch to fix it.
It should allow for the prefix setting to be either empty or a string. Look at
default.settings.php
as it comes from Drupal core and configure your site to use$databases
exactly as it appears there, but with your config, and then make it work with that. - 🇳🇱Netherlands Web-Beest
I've created a patch that fixes the compatibility check and the dropDatabase command.
- Status changed to Needs work
about 1 year ago 2:33am 24 August 2023 - 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
Thanks for the patch.
It should be OK for the prefix to not be set.