Feedback wanted: Introspection
See original GitHub issueHey everyone,
in the last few releases we improved our Introspection feature prisma introspect
, most notably with “More robust introspection by keeping manual changes in the Prisma schema file” in 2.6.0 but also many smaller bug fixes. We think it is pretty stable now, and would love to hear from you, our users, how you have been using prisma introspect
recently!
- Did
prisma introspect
work for your database? - What is working well for you?
- What problems did you encounter? What functionality is still missing?
It would be awesome if you could leave your comments either on the messages linking to this issue on Twitter or Slack, or just as a comment below! ✍️
💚 By the way, we loooove to hear about positive experiences ✨ as well - which sometimes gets lost in GitHub issues where it is about bug and problems most of the time - so if you had a great experience and things just worked, please leave a comment below as well 💖
Thanks!
We are aware already of 2 big areas where improvements would help some users:
- Not all native database types and their attributes are supported yet by Introspection and Prisma in general, and we are going to on this via what we call "Native Database Types ".
- And some people wish for configuration option of the Introspection result and Schema. We are collecting these suggestions under the term and label “Introspection Configuration”.
Follow these issues for updates on these topics or leave your comments there as well.
Issue Analytics
- State:
- Created 3 years ago
- Comments:27 (10 by maintainers)
Top GitHub Comments
Generally I do like the introspection. However, there are still some corner cases I hate personally. I’ve yet found two things I miss the most.
Firstly the naming transformation. I would expect to have the ability to let prisma convert snake_case to camelCase automatically and change plural to singular table names. Though I understand this is not something deal breaking and one can use prisma-schema-transformer.
What I’ve found to be deal breaking for me, is the the way relation naming is handled. It seems prisma uses the referenced table name as the field name. What I would expect, would be to use the relation name from sql field {{relationName}}_id.
gets transfomed into:
without naming transformation I would expect the result to be:
I do understand that everyone names their fields differently. In that case, could we perhaps specify a relation name template string? Or give prisma a transformer function to rename the fields ourselves? A wiki page with recommended foreign key naming scheme would suffice too.
I was having the similar issue where some of the models are ok but some models’ relation field names get overwritten by introspect.
I solved it by setting a name for all the relation fields. e.g.