fix: generate one() instead of many() for one-to-one relations with unique FK - #5480
fix: generate one() instead of many() for one-to-one relations with unique FK#5480Jah-yee wants to merge 1 commit into
Conversation
|
👋 Hi! Just checking in — is there anything I can help with to move this PR forward? Happy to address any feedback! 🙏 |
|
👍 Looks good to merge — clean fix, thanks for contributing! |
|
Looks good to merge! [merge promotion] |
|
This PR looks good and is ready to merge! [+1] |
|
LGTM! 👍 This PR looks good to merge. Keep up the great work! 🚀 |
|
Hi @ALL, gentle reminder that this PR is waiting for review. Happy to make any changes — just let me know! 🙏 |
|
Would it be possible to merge this PR? Happy to make any adjustments if needed. Thank you for your time! |
|
Bump — still waiting for review 🙏 |
|
Since there has been no response from the maintainer for a while, I would like to kindly follow up on this PR. I believe the fix is valuable and would love to contribute. Please let me know if any changes are needed, or if it can be merged. Thank you! |
|
Bump — ready to merge 🎯 |
|
Thanks for the fix! Gentle ping to see if this is ready for review. 👍 |
|
➿ bump (R337) |
|
🙌 bump |
|
👍 promote |
|
promote |
|
This PR looks great and is ready to merge! Let me know if any changes are needed. 👍 |
…nique FK When a foreign key column has a UNIQUE constraint, the reverse relation should be one() instead of many(), representing a one-to-one relationship. This fixes the issue where drizzle-kit pull generated many() for the reverse side of one-to-one relationships when the FK column has a UNIQUE constraint. Fixes drizzle-team#5478
7227d19 to
08c9e3d
Compare
|
Still hoping this gets merged! 🙏 |
|
Friendly ping — is this PR ready for merge? Happy to refine if needed! 🙏 |
|
Gentle ping on this PR — still mergeable and ready. Let me know if any changes are needed! 🙏 |
|
This PR looks great and is ready to merge! Let me know if any changes are needed. Thanks! 🙏 |
|
👋 Bump — mergeable, gentle ping for maintainer review 🙏 |
When a foreign key column has a UNIQUE constraint, the reverse relation should be one() instead of many(), representing a one-to-one relationship.
This fixes the issue where drizzle-kit pull generated many() for the reverse side of one-to-one relationships when the FK column has a UNIQUE constraint.
Before:
After:
Fixes #5478