-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
better postgres uuid column handling #7298
Conversation
passing `{type: "uuid"}` to `PrimaryGeneratedColumn` is valid given the TS types. but strategy is set to `increment` instead of `uuid` this change fixes it. I think it would be worthwhile to tighten the parameters type definition instead of having a large union
lint the change
The typeorm/src/driver/types/ColumnTypes.ts Lines 1 to 19 in af2c5c4
|
do you prefer to fix the parameter type definition? would that be a breaking change ? |
It is technically a breaking change but unless someone has an example of how |
|
The correct way to use the |
Whats your recommendation on solving this issue?. just remove |
Any other changes would you like me to add? |
That's all, just squash your commits into one and make sure you follow the commit message format in CONTRIBUTING.md 🎉 |
It took me quite a while to figure out this small single-line change. I can't understand why we did this #4043 change (liked by 3 people) two years ago. |
This looks like an easy mistake to overlook, the type is |
Description of change
passing
{type: "uuid"}
as a parameter toPrimaryGeneratedColumn
is valid given the TS types. but strategy is set toincrement
instead ofuuid
this change fixes it. I think it would be worthwhile to tighten the parameters type definition instead of having a large union
Fixes #6039
Pull-Request Checklist
master
branchnpm run lint
passes with this changenpm run test
passes with this changeFixes #0000