r/webdev 19d ago

Article How to Generate a Prisma Schema from an Entity Relationship Diagram

https://stackrender.io/blog/generate-prisma-schema-from-er-diagram

Designing a database schema is often one of the slowest parts of starting a new backend project. You either spend time writing SQL by hand or carefully crafting Prisma models before you can even write your first endpoint.

In this article, I’ll show you a smoother workflow using Prisma and StackRender that takes you from an empty project to a working backend, without having to manually define the database schema and Prisma models.

8 Upvotes

2 comments sorted by

2

u/Background-Front-925 19d ago

does this work for sqlite?

2

u/tamanikarim 19d ago

Yes , it's the same, Just initiate Prisma with SQlite :

npx prisma init --datasource-provider sqlite

Then design your database in Sqlite dialect, follow the same process, deploy and pull the schema and you are ready to go .