-
Notifications
You must be signed in to change notification settings - Fork 968
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
Scaffold should not generate autogenerated fields #3783
Conversation
Signed-off-by: Moulik Aggarwal <qwertymoulik@gmail.com>
Signed-off-by: Moulik Aggarwal <qwertymoulik@gmail.com>
Ah, good catch @aggmoulik Ping'ing @cannikin for review. Thanks! |
Hmm, I'm not sure we always want to exclude all of these fields: just because the field is assigned a default value in the database doesn't mean you'll never provide a value to those fields. Just that if you do leave it I could see something similar for Some folks may even set their own |
Hey @cannikin, I understand your concerns here. I will remove the
I have tried to make it modular so that any change like this is automatically handled just by removing from constants. |
I don't think we should exclude fields marked as |
Howdy @aggmoulik hope you had a good holiday! What did you think about my last comment? |
Hello @cannikin Sorry for the late reply, as was stuck in personal problems. Will fix the PR after looking at your comments. |
…oodjsgh-3682 Signed-off-by: Moulik Aggarwal <qwertymoulik@gmail.com>
Signed-off-by: Moulik Aggarwal <qwertymoulik@gmail.com>
@cannikin Updated the PR after your review. |
Thanks! Are there any tests that can be updated to show that these fields are no longer generated? |
Hi @aggmoulik did you see my previous comment? This PR looks good but I'd love to get a test or two in there that confirms it's behaving as expected! |
@cannikin Ok I will add tests for the same. |
✅ Deploy Preview for redwoodjs-docs canceled.
|
Hey @aggmoulik, no worries if not, but still interested in this one? If not we'll get it to the finish line! Just wanted to give you the chance since you worked so hard on it 🦾 |
Thanks for the work on this @aggmoulik, you get all the credit! |
Fix #3682
While creating the smart way of filtering out autogenerated fields, I found there are certain functions that are used with the default function in Prisma schema that is autogenerated, and obviously we should not generate those fields as well.
Primsa Default Function
Signed-off-by: Moulik Aggarwal qwertymoulik@gmail.com