ERD Viewer
The ERD Viewer draws your tables and their relationships from the live
schema. It uses introspect to read the actual database, so it reflects what
exists — not just your code.
Open the ERD
Section titled “Open the ERD”- Open Studio (
mountsqli dev). - Go to the ERD view.
- See tables as boxes with columns, and foreign keys as connectors.
What it shows
Section titled “What it shows”- Tables and columns with types.
- Primary keys (highlighted).
- Foreign-key relationships between tables.
- Nullability and uniqueness per column.
Why live schema?
Section titled “Why live schema?”The ERD reads the database so it matches what migrate apply produced. If code
and DB have drifted, the ERD shows the real state — pair it with
mountsqli analyze to catch the gap.
Best practices
Section titled “Best practices”- Use the ERD to sanity-check relationships after adding FKs.
- Cross-check it against
analyzeoutput during reviews.
Common mistakes
Section titled “Common mistakes”- Assuming the ERD reflects code-only tables not yet migrated.
Related
Section titled “Related”- Migrations → Introspect — the data source.
- Overview — other Studio views.
