JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 829
  • Score
    100M100P100Q107031F
  • License MIT

Entity-relationship diagram (ERD) generator for Drizzle.

Package Exports

  • drizzle-erd
  • drizzle-erd/dist/index.cjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (drizzle-erd) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Drizzle ERD

A super-simple way to generate Entity-Relationship Diagrams (ERDs) from your Drizzle schema. Use case (CLI or in-code) and dialect (PG, MySQL, SQLite) agnostic!

COMING SOON!

Currently in-progress, but releasing shortly!

Alpha usage

If you'd like to use this package right now, in lieu of any proper documentation, here's how to get started:

{
  //...Rest of package.json
  "scripts": {
    //...Other scripts
    "db:generate-erd": "drizzle-erd --in ./src/or/path/to/schema.ts --out erd.svg"
  }
}

You basically just call the drizzle-erd binary / CLI tool with two arguments for now:

  • --in :: the path to your TS schema file
  • --out :: what you want your SVG to be called

Add your ERD to your README

Add your ERD to your readme like this:

<img src="./erd.svg" width=720 />

Make it all automatic

Call the db:generate-erd script you defined earlier from a Git pre-commit hook to make sure your generated ERD is always up-to-date (especially if you're printing it out to your README as above).