Prisma generator to create an ER Diagram every time you generate your prisma client.
Inspired by prisma-erd-generator
yarn add -D prisma-grapher
or
npm install -D prisma-grapher
Add to your schema.prisma
generator erd {
provider = "prisma-grapher"
}
Run the generator
npx prisma generate
generator erd {
provider = "prisma-grapher"
output = "./ERD.svg"
disabled = false
title = "Blog Schema"
ignoreEnums = false
lineColor = "#004cff"
headerBackgroundColor = "#bacefc"
headerForegroundColor = "black"
bodyBackgroundColor = "white"
bodyBackgroundColor2 = "#e8efff"
bodyForegroundColor = "black"
typeForegroundColor = "#4f83ff"
}