Search code examples
viewintrospectionprisma

How to create a prisma model from a SQL view


Is it possible to have 'prisma introspect' create models for views in Postgres ?


Solution

  • Currently not, but we have a request for that here that you can follow for more updates. As a workaround, you can manually add that view to schema.prisma as a model and then query as you do for normal models.