Problem/Motivation
List the actual name(s) of the connected database(s) on the status page. Could be very handy when copying sites for testing purposes. Can prevent changing the wrong database!
This can be checked by going through admin/reports/status reports
Steps to reproduce
Proposed resolution
Remaining tasks
Review
Run tests on all database types
User interface changes
After


Introduced terminology
API changes
Data model changes
Release notes snippet

| Comment | File | Size | Author |
|---|
Issue fork drupal-345747
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
miro_dietikerindeed. although not that popular in confusion, but the tuple (server, db_name) would be almost perfectly unique.
i'd appreciate to see that coming! Much better super admin usability.
Comment #2
Crell commentedI'm cool with it if someone wants to roll a patch.
Comment #3
Crell commentedI guess no one rolled a patch.
Comment #4
nestor.mata commentedHere is a patch that will show one of the following messages on the Status Report,
If the database is using a default prefix:
Database connection information Host: "localhost", Database: "my_database", Prefix: "_myprefix"
If the database does not use a default prefix:
Database connection information Host: "localhost", Database: "my_database", no prefix
Best regards,
Nestor
Comment #5
nestor.mata commentedAdding tags to the ticket.
This is a Costa Rican Team trying to fix as many tickets as possible today to contribute to the community.
Comment #6
-enzo- commentedComment #7
nestor.mata commentedHere is a screenshot of how this modification looks like:

Nestor
Comment #8
Crell commentedHas this been tested on SQLite or PostgreSQL yet? It looks fine to me from a MySQL perspective, but I don't think it will work for SQLite since it doesn't have a "host" key.
Comment #9
nestor.mata commentedI will have to set up environments to test it, also if someone volunteers for testing it on those environments it would be great
Comment #10
Crell commentedComment #11
valthebaldThis looks like a good novice issue
Comment #12
tim bozeman commentedComment #13
tim bozeman commentedI rerolled the patch from #4. Git fixed it with an automerge (yay!). It removed a $ from before a t();
I don't have SQLite or PostgreSQL. I tried drush quick-drupal, but my SQLite doesn't work. : (
Comment #15
jhedstromNeeds a reroll, and testing on other DBs.
Comment #16
arla commented'host'to work with sqlite\Connection.%placeholder substitution already gives<em>markup for the variable values.<br />there, not sure if that is correct.)I have only tested this with MySQL.

Comment #17
miro_dietiker(Code) looks very nice for me.
Comment #18
Shivam Agarwal commentedComment #19
Shivam Agarwal commentedPatch applied cleanly. Screenshots attached showing changes after patch and missing feature before patch is applied.
Comment #20
alexpott#8 points out that this needs postgres and sqlite testing - no one has provided any evidence of testing it on them.
Comment #21
alexpottAlso atm this is classed as a feature - I really don't think it is - it's more a task but even with the re-classification I don't think it meets that beta evaluation criteria. See https://www.drupal.org/core/beta-changes for more.
Comment #32
quietone commentedNo longer postponed.
Comment #33
daffie commentedSomehow the patch from 2014 no longer applies.
Comment #34
raman.b commentedRe-rolled #16
Comment #35
daffie commentedReroll looks good. Now we need an automated test.
Comment #43
quietone commentedNot sure about the test.
Comment #44
quietone commentedComment #45
daffie commentedLooks good to me.
Testing has been added.
It is RTBC for me.
Nice to see that a Drupal 7 request made it.
Comment #46
godotislateStatusTest changes fails on SQLite: https://git.drupalcode.org/project/drupal/-/jobs/11024816
Comment #47
quietone commentedAnd not just that, there was an error in they the prefix was gathered. I also significantly changed the test.
Comment #48
daffie commentedLooks good to me.
Back to RTBC.
Comment #49
catchThis is getting info for the default database connection, but the original feature request was for all database connections, should we be doing that? e.g. from https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Database%...
Comment #50
daffie commentedYes, we should do that!
Comment #51
quietone commentedAfter I updated this for all connections I read this
$databases['default']['replica'][] = $info_array;in settings.php. Unless that is incorrect, this needs to be updated to work with another level of nesting.Comment #52
quietone commentedComment #53
daffie commentedLooks good to me.
Back to RTBC.