Problem/Motivation
Currently, the Database Browser module displays all database tables in a single
flat listing. As Drupal databases grow larger, it becomes increasingly difficult
for users to quickly identify related tables.
Drupal tables naturally belong to functional groups such as:
- Content tables
- Cache tables
- Node tables
- User tables
- Configuration tables
- Session tables
- Search tables
Without grouping, users must manually scan long table lists, which reduces
usability and slows down database inspection workflows.
Steps to reproduce
- Install and enable the Database Browser module
- Navigate to the database table listing page
- Observe that all tables appear in a single list
- Notice that related tables are not grouped together
Proposed resolution
Add table categorization and grouping support to the database table listing.
Proposed functionality:
- Automatically group tables by category
- Example categories:
- Cache
- Content
- Node
- User
- Configuration
- Search
- System
- Determine category using table name prefixes and Drupal conventions
- Add collapsible group sections
- Display table count per category
- Allow filtering by category
Potential future enhancements:
- Custom category mappings
- Color-coded categories
- Saved category filters
- Database analytics dashboard
Remaining tasks
- Create table categorization logic
- Implement category mapping service
- Update table listing render array
- Add grouped UI rendering
- Add category filters
- Add category statistics
- Write automated tests
- Update documentation and README
User interface changes
The database listing page will display grouped sections for related tables.
Example:
Cache Tables - cache_bootstrap - cache_config - cache_render Content Tables - node - node_field_data - node_revision User Tables - users - users_field_data
Additional UI improvements may include:
- Collapsible category sections
- Category filter dropdown
- Category statistics badges
API changes
New helper/service methods may be added:
getTableCategory(string $table): stringPossible future extensibility:
- Alter table category mappings
- Custom category providers
Data model changes
No database schema changes are proposed.
Issue fork database_browser-3589709
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 #4
mohnish s. yadavComment #6
oshi02 commented