schemaviz

Draw a database schema as an interactive page, and see exactly what a migration changed. Point it at a repository, a SQL dump, a dbt project or a live database.

Samples

What a migration changed A made-up recipe app, before and after. A renamed table, a retyped column, a new table and a dropped one, marked in place. schemaviz diff A repository, scanned dbt Labs' open-source jaffle_shop, drawn from its folder with real warehouse types. schemaviz scan jaffle_shop_duckdb A big application GitLab: 1,459 tables, 14,700 columns and 1,950 foreign keys, read from its db/structure.sql in under a second. schemaviz sql structure.sql Migrations, replayed Ory Kratos: 624 Postgres migration files applied in order to get today's schema. schemaviz scan kratos A SQL dump Pagila, the PostgreSQL DVD-rental sample, from a pg_dump of the schema. schemaviz sql pagila-schema.sql A classic Northwind, the trading-company sample: orders, products, suppliers, employees and territories.

Try it

brew install phin-tech/tap/schemaviz

schemaviz scan ./your-repo --out schema.dbml
schemaviz open schema.dbml

Compare two points in history, with a revision picker in the page:

schemaviz open docs/schema.dbml --from v1.4 --to HEAD