Amazing, thank you. Quick Q: If I already have a DB Table, how do I scaffold just the code portion? I am looking through the docs and can't find anything but the full cycle npx shadriz scaffold -c. Can I skip the -c part if I have the db table (with data) already created. Thanks in advance. Amazing tool! I appreciate the love you put into this.
@fullstackbook4 ай бұрын
Good question. Currently there isn't a way to generate the code portion without the db portion. However, one possible workaround is you can run the scaffold command, and after running it, use git to revert anything you don't need.
@universalproblemsolver3 ай бұрын
@@fullstackbook Thank you for that, beautiful mind. One more follow-up question, I come from a C#/ASP/PHP background. Really trying to get this NextJS stuff down and I am learning a lot from your scaffolding code. To my Q: Can you point me to a decent demo of how a server action called "get-customers" could be called by a shadcn dropdown that can be used in the Create and Edit parent record. Thank you for saving my time.
@fullstackbook3 ай бұрын
I believe server actions are typically used for mutations, for example a post request that can change some state on the server. It sounds like your intent is fetching some data and displaying it in the dropdown. The recommended way to do this is to fetch the data in the server component or page, and then pass it to a client component. The latest version of shadriz has a new automation that might help with this. See the foreign key constraints section.