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

Issue fork drupal-345747

Command icon 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

miro_dietiker’s picture

indeed. 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.

Crell’s picture

I'm cool with it if someone wants to roll a patch.

Crell’s picture

Version: 7.x-dev » 8.x-dev

I guess no one rolled a patch.

nestor.mata’s picture

Status: Active » Needs review
StatusFileSize
new1.3 KB

Here 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

nestor.mata’s picture

Issue tags: +dlatino, +drupalcr

Adding tags to the ticket.
This is a Costa Rican Team trying to fix as many tickets as possible today to contribute to the community.

-enzo-’s picture

Status: Needs review » Reviewed & tested by the community
nestor.mata’s picture

StatusFileSize
new17.33 KB

Here is a screenshot of how this modification looks like:
Database Connection Information

Nestor

Crell’s picture

Has 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.

nestor.mata’s picture

I will have to set up environments to test it, also if someone volunteers for testing it on those environments it would be great

Crell’s picture

Status: Reviewed & tested by the community » Needs review
valthebald’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: -dlatino, -drupalcr +Novice, +Needs reroll

This looks like a good novice issue

tim bozeman’s picture

Assigned: Unassigned » tim bozeman
tim bozeman’s picture

Assigned: tim bozeman » Unassigned
Status: Needs work » Needs review
Issue tags: -Novice, -Needs reroll
StatusFileSize
new1.3 KB
new181 bytes

I rerolled the patch from #4. Git fixed it with an automerge (yay!). It removed a $ from before a t();

<        'title' => $t('Database system version'),
---
>        'title' => t('Database system version'),

I don't have SQLite or PostgreSQL. I tried drush quick-drupal, but my SQLite doesn't work. : (

The last submitted patch, 13: add_database_connection_information-345747-13.patch, failed testing.

jhedstrom’s picture

Status: Needs review » Needs work

Needs a reroll, and testing on other DBs.

arla’s picture

  • Moved up a few lines to agree with the alphabetical order displayed (in English).
  • Added check for 'host' to work with sqlite\Connection.
  • Removed double-quotes since the % placeholder substitution already gives <em> markup for the variable values.
  • Split the variables into separate lines. (Using <br /> there, not sure if that is correct.)

I have only tested this with MySQL.
Screenshot

miro_dietiker’s picture

(Code) looks very nice for me.

Shivam Agarwal’s picture

Issue summary: View changes
Shivam Agarwal’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new32.69 KB
new39.21 KB

Patch applied cleanly. Screenshots attached showing changes after patch and missing feature before patch is applied.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

#8 points out that this needs postgres and sqlite testing - no one has provided any evidence of testing it on them.

alexpott’s picture

Version: 8.0.x-dev » 8.1.x-dev
Category: Feature request » Task
Status: Needs work » Postponed

Also 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.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

quietone’s picture

Status: Postponed » Active

No longer postponed.

daffie’s picture

Status: Active » Needs work
Issue tags: +Needs reroll

Somehow the patch from 2014 no longer applies.

raman.b’s picture

Issue tags: -Needs reroll
StatusFileSize
new1.24 KB
new2.06 KB

Re-rolled #16

daffie’s picture

Issue tags: +Needs tests

Reroll looks good. Now we need an automated test.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Issue summary: View changes
StatusFileSize
new27.19 KB

Not sure about the test.

quietone’s picture

Issue summary: View changes
daffie’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.
Testing has been added.
It is RTBC for me.
Nice to see that a Drupal 7 request made it.

godotislate’s picture

Status: Reviewed & tested by the community » Needs work
quietone’s picture

Status: Needs work » Needs review

And not just that, there was an error in they the prefix was gathered. I also significantly changed the test.

daffie’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.
Back to RTBC.