Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually write schema.prisma is diffucult #120

Closed
adnanfuat opened this issue Jul 20, 2020 · 2 comments
Closed

Manually write schema.prisma is diffucult #120

adnanfuat opened this issue Jul 20, 2020 · 2 comments
Labels
question Further information is requested

Comments

@adnanfuat
Copy link

"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
Copy link
Collaborator

@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 AhmedElywa added the question Further information is requested label Jul 20, 2020
@AhmedElywa
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants