4 ms·
I use Prisma and it’s far from perfect but what I love about it is you can introspect a legacy database and generate a Prisma schema, and use the database as th
by joshribakoff 5y ago
I use Prisma and it’s far from perfect but what I love about it is you can introspect a legacy database and generate a Prisma schema, and use the database as the source of truth. You’re not tied to a 1:1 relationship between classes and tables, and the correctness of the types do not depend on tediously annotating code correctly. Excited to see more languages supported!
- post-it 5y agoAre there any ORMs that do that currently? That sounds awesome
- ParetoOptimal 5y agoSee F# and it's type providers.
- probablyrobert 5y agoIf you're wanting to automatically generate the Prisma Schema then all you have to do is create the schema file, define the datasource connection and then run `prisma db pull`
- ChibiJoel 5y agoIndeed! https://www.prisma.io/docs/concepts/components/introspection https://www.prisma.io/docs/concepts/components/introspection
- camdenreslink 5y agoEntity Framework allows you to do that (if you are coding for .NET). It is the best ORM I've encountered. The option to do it is called "Code First from Database".
- dpacmittal 5y agoMikroORM can also auto generate schema from an existing database