Download the PHP package christyoga123/db-structure-viewer without Composer
On this page you can find all versions of the php package christyoga123/db-structure-viewer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download christyoga123/db-structure-viewer
More information about christyoga123/db-structure-viewer
Files in christyoga123/db-structure-viewer
Package db-structure-viewer
Short Description Laravel package to view database structure and related migrations
License
Informations about the package db-structure-viewer
DB Structure Viewer (Laravel)
A lightweight Laravel console tool to inspect your database schema from the terminal. It shows columns and indexes for one or all tables, and can help you find related migration files.
Requirements
- PHP >= 8.1
- Laravel 10, 11, or 12
- MySQL/MariaDB (uses
information_schema,SHOW COLUMNS, andSHOW INDEXES)
Installation
The service provider is auto-discovered; no manual registration is required.
Command Overview
table?(optional): Show structure for the given table--all: Show structure for every table--list: List all tables in the current database--migrations: Try to locate related migration files for the selected table(s)-v|--verbose: Also print full file paths for related migrations
If no arguments/options are provided, an interactive prompt will guide you.
Usage
List all tables
Show a specific table
Show a specific table and related migrations
Show all tables
Show all tables and related migrations
Interactive mode
Simply run without args and choose from the menu:
What you’ll see
For each table:
- Columns: name, type, nullability, key, default, extra
- Indexes: name, column, uniqueness, type
- (Optional) Related migration files, with an inferred type such as "Create Table", "Add Column(s)", etc. Use
-vto include full file paths and optionally print file contents on confirmation.
How migrations are detected
The command scans database/migrations and matches common filename patterns that include the table name (plural and singular variations), such as:
create_{table}_table*_to_{table}_table*_in_{table}_table*_{table}_*
Notes and limitations
- Currently tailored for MySQL/MariaDB dialects via
information_schema,SHOW COLUMNS, andSHOW INDEXES. - Migration detection is filename- and simple content-based and may not catch every edge case.
Troubleshooting
- Ensure your
.envdatabase connection points to the intended schema. - Make sure tables exist and your DB user has access to
information_schema. - For large schemas, consider using
tableor--listfirst to scope output.
License
This package is open source software. If a LICENSE file is not present, please open an issue to clarify licensing terms.
All versions of db-structure-viewer with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0