feat: pass nullable into many-to-one custom relations#4895
feat: pass nullable into many-to-one custom relations#4895LucidityDesign wants to merge 15 commits into
Conversation
Adds properties like cascade, onDelete and onUpdate
Author: @coderabbitai Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| > = Omit<BaseTypedCustomFieldConfig<T, C>, 'nullable'> & { | ||
| list?: true; | ||
| defaultValue?: Array<DefaultValueType<T>>; | ||
| nullable?: never; |
There was a problem hiding this comment.
Not sure if this is overkill, but I find it useful to disallow options that will be ignored
Description
Adds the
nullableoption to ManyToOne relational custom fields.Please see @grolmus comments in #4448 regarding the nullable behaviour. the changes of the nullable options were removed from #4448 and moved into this PR as a separate change set.
Breaking changes
This can be seen as breaking because it was already possible to set
nullable: trueon custom fields of type "relation", but the option was silently ignore. There is a risk that users have already setnullable: trueon custom fields which will change DB behaviour after an upgrade.Screenshots
You can add screenshots here if applicable.
Checklist
📌 Always:
👍 Most of the time:
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.