paljs / prisma-tools

Prisma tools to help you generate CRUD system for GraphQL servers
https://paljs.com
MIT License
684 stars 54 forks source link

Manually write schema.prisma is diffucult #120

Closed adnanfuat closed 4 years ago

adnanfuat commented 4 years ago

"after an update your schema.prisma run" https://prnt.sc/tkye8g

Is there a way easy way to update schema.prisma with my new database ?

Or I have to do only write manually? My database big. And write manually is diffucult

AhmedElywa commented 4 years ago

@adnanfuat yes if you have already existing DB you can use prisma introspect command to pull you DB into schema.prisma file but you need first to add your DB connection data into schema.prisma file All docs here https://www.prisma.io/docs/reference/tools-and-interfaces/introspection

If you DB is in Snake case like first_name and you want to convert into Camel case like firstName you can use my converter https://paljs.com/cli/schema#convert-to-camel-case

AhmedElywa commented 4 years ago

I will close this issue if you need any other thing please open a new one