New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

prisma-markdown

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prisma-markdown

Prisma Markdown documents generator including ERD diagrams and comment descriptions

  • 0.2.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
decreased by-25.31%
Maintainers
1
Weekly downloads
 
Created
Source

Prisma Markdown

Outline

GitHub license npm version Downloads Build Status Example

Prisma markdown documents generator.

  • Mermaid ERD diagrams
  • Descriptions written by /// comments
  • Separations by @tag comments

If you want to see how markdown document being generated, read below examples:

Setup

At first, install NPM package.

npm i -D prisma-markdown

At next, add the generator to the schema file.

generator markdown {
  provider = "prisma-markdown"
  output   = "./ERD.md"
}

At last, run below command, than ERD.md file would be generated.

npx prisma generate

@tag and @erdTag

If your database has over hundreds of models, none of automatic ERD generators can express them perfect. In that case, prisma-migration recommends you to separate hundreds of models to multiple paginated diagrams by using /// @tags <name> comments.

When you write /// @tags <name> comment on models, they would be separated to proper sections of markdown document. For reference, you can assign multiple @tags to a model, and if you do not assign any @tag to a model, it would be assigned to default tag.

Also, if you use @erdTag instead of @tag, target model would be expressed only at ERD. It would not be appeared to the markdown content section.

/// @tag Actors
/// @erdTag Articles
/// @erdTag Orders
/// @erdTag Deposits
model shopping_customers {}

/// @tag Articles
model shopping_questions {}

/// @tag Orders
model shopping_orders {}

/// @tag Deposits
model shopping_deposits {}

Keywords

FAQs

Package last updated on 13 Sep 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc