Specify VARCHAR Length On @belongsTo/hasOne #8680
Unanswered
A-Corregidor
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Possible referenced question: #8388 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @A-Corregidor, does #8476 (comment) help answer your question? In this case, it should be something like this: @belongsTo(
() => User,
undefined,
{
mysql: {
dataType: 'varchar',
dataLength: 36,
},
},
)
userId: number; |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there!
When you create some model relation field (userId), using these syntax
It's created on DB like a VARCHAR(512) (at least, on MySQL).
How could I modify that length? My UUID's real length is 36
Thanks
Beta Was this translation helpful? Give feedback.
All reactions