Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Db Draw Laravel Package

jawira/db-draw

Generate ER diagrams from SQL files without a database connection. jawira/db-draw parses MySQL and PostgreSQL dumps to produce database structure diagrams via Graphviz in SVG, PNG, or PDF formats. Ideal for documentation and quick schema reviews.

Deep Wiki
Context7

PHP library to generate ER database diagrams

Frequently asked questions about Db Draw
What is jawira/db-draw and what does it do?
jawira/db-draw is a Composer-installable CLI tool that parses SQL schema dumps and generates PlantUML entity-relationship diagrams. It is aimed at documentation, code reviews, and understanding legacy schemas without connecting to a live database. The resulting diagrams are plain-text PlantUML files that can be versioned alongside your code.
How do I use jawira/db-draw in a Laravel project?
It is not Laravel-native, so you typically add it as a development dependency and invoke it from a Composer script or a thin Artisan command. Keep it out of production runtime and point it at a SQL dump or a safe local or CI database. Wrap the call so connection details come from configuration or environment variables rather than hard-coded credentials.
How do I install jawira/db-draw with Composer?
Install it as a development dependency with composer require --dev jawira/db-draw, then run its CLI binary from vendor/bin. Pin the version in composer.lock and document any system packages the renderer needs. Check Packagist or the repository for the exact binary name and current PHP version constraints.
Which database engines and SQL dump formats does jawira/db-draw support?
The package description focuses on parsing MySQL and PostgreSQL SQL dumps, so those are the engines to validate first. Because database dialect and schema-object coverage can vary, test with a representative dump from your Laravel fleet. If you use another database engine, confirm support before relying on it.
Do I need a live database connection to generate diagrams with jawira/db-draw?
No. The core workflow parses a SQL schema dump file, so you can generate diagrams without connecting to a database. That makes it useful for legacy schemas, archived dumps, and CI jobs where a database may not be available. You still need a dump that contains the tables, columns, and constraints you want to visualize.
What output formats does jawira/db-draw produce, and does it require Graphviz?
It generates PlantUML ER diagrams and can render them to formats such as SVG, PNG, or PDF via Graphviz. That means CI runners and developer laptops may need Graphviz installed and available on the PATH. If you only need versionable text, keeping the PlantUML source may be enough.
Can I run jawira/db-draw in a CI pipeline?
Yes, it is CLI-first and fits a CI job or scheduled documentation pipeline. Use an ephemeral database or a read-only replica, generate the dump, run db-draw, and publish the artifacts. Make sure the CI image includes any required rendering binaries and that output is deterministic enough for diffs.
How do I wrap jawira/db-draw in an Artisan command?
Create a thin dev-only command that shells out to the package binary or calls its API, passing the SQL dump path and output options. Read connection settings from config but default to a local or CI-safe database, and never use production credentials. Keep the command out of production deployments or gate it behind the local environment.
Is it safe to generate diagrams from production schemas?
Treat generated diagrams as sensitive documentation because table and column names can reveal internal data models. Prefer read-only credentials, a replica, or an anonymized dump, and store artifacts in internal documentation rather than public repositories. Review what gets committed and redact anything that should not leave the team.
What are the maintenance risks and alternatives to jawira/db-draw?
The main risks are low adoption, unknown repository provenance, and limited community signal, so treat it as a bounded pilot rather than a team standard. Validate PHP versions, database dialect coverage, Graphviz dependencies, and release history before adopting it widely. Alternatives include Laravel-specific schema diagram tools, Doctrine-based generators, or maintaining PlantUML by hand for small schemas.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections