-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
[Suggestion] Generate table names #223
Comments
@gaetschwartz This seems to be a requirement request, we need to talk about the necessity of the use case. In addition, if you need to make a program like CRUD, you may need to use it, and you can also generate table fields. Another, is it necessary for us to disclose DMMF, because DMMF contains more database information. |
Well, I was thinking about that and actually exposing DMMF is an option I really like! It would allow users to plug-in their own logic etc based on it. |
I understand, because I have similar needs, I added it to #216, the current available version I use https://pub.dev/packages/prisma_generator_helper to get DMMF, just write simple code, and then in But I'm taking your advice and adding dmmf to the default build in the next version. |
Thanks, I'll look into that ! Could you elaborate ? I'm not sure to understand your instructions ? |
`OnGenerate 'will pass in an instance of' GeneratorOptions' as a parameter, which contains DMMF. You only need to call the 'toJson' method to convert it into a JSON object. You can create a file that contains DMMF content. |
@gaetschwartz Already supported in v4 version |
It would be helpful if table names could be generates as well ! Something like
The text was updated successfully, but these errors were encountered: