New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

drizzle-erd

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drizzle-erd

Entity-relationship diagram (ERD) generator for Drizzle.

latest
Source
npmnpm
Version
0.0.1-alpha.11
Version published
Weekly downloads
1.1K
17.5%
Maintainers
1
Weekly downloads
 
Created
Source

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!

Tests Downloads

[!IMPORTANT] Drizzle ERD is in pre-release and is not ready for production-reliant use cases.

Alpha usage

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

CLI

Call drizzle-erd directly from npm or pnpm from a script in your package.json like so:

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

Options

The following CLI flags are available to be used with drizzle-erd.

NameFlagDescription
[Required]
Schema source
--inThe path to your Drizzle schema.ts file.
[Required]
SVG output
--outThe destination path (and filename) of the output SVG. (Overwrites if already exists)
Debug logs--verboseProvide this flag to print the status of the schema generation with debug-level logging.

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).

Keywords

drizzle

FAQs

Package last updated on 10 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts