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
Prisma introspect is deleting models I created for database views #5501
Comments
This will solve your problem: https://www.prisma.io/docs/concepts/components/preview-features/native-types/native-types-mappings#ignore-and-ignore Note this is currently just a preview feature that needs to be explicitly enabled. |
thank you @janpio. i will try to use this. |
hi @janpio , I just updated my prisma version to When i ran |
That is unexpected. I will try to reproduce this. |
Hey @jacky-lam Looks like this hasn't been implemented in reintrospection yet: #5331 Please wait on that here. |
I suggest you also not use |
That is actually true. So although you would keep the models, you would still not be able to use them. My bad, sorry. |
Closing this issue as #678 is the only way to make this nicer. |
Bug description
Action:
I have create a simple database view in Postgres and then manually add the model for the view as instructed here:
Bug:
prisma generate
it works perfectly fine.prisma introspect
, it deletes all my models that I had setup for the database views.How to reproduce
schema.prisma
manually add the model for that database view.yarn prisma introspect
.schema.prisma
file, the model for that database view is gone.Expected behavior
After running
yarn prisma introspect
, it would not delete the model for the database view.Prisma information
Environment & setup
The text was updated successfully, but these errors were encountered: