Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a prisma model from a SQL view

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

like image 884
user3545726 Avatar asked Oct 16 '25 11:10

user3545726


1 Answers

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.

like image 185
Ryan Avatar answered Oct 19 '25 12:10

Ryan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!