can you generate prisma-client based on preexistin...
# orm-help
k
can you generate prisma-client based on preexisting database thats not generated/migrated using prisma?
m
Hey Kay 👋🏻 You’re looking for this workflow https://www.prisma.io/docs/concepts/components/introspection#introspection-workflow You will run
prisma db pull
and then run
generate
k
Hey @Mahmoud Just a clarifying question when it says
Copy code
2. Run prisma db pull to update the Prisma schema
Does this mean it will generate for me a set of models based on my existing database, so i don't need to write them out?
m
Yup. So your
schema.prisma
file will be updated for you
k
thanks!
m
You’re welcome! 😄
k
@Mahmoud Just a followup question regarding this, how do you connect to a view using the prisma client?
m
k
ye ive actually added a new comment to the general channel regarding this