Replies: 1 comment
-
If anyone ends up on this one, you need to use it as such: // example with `userId` reference
...
{
userId: bigint("user_id", {
mode: "bigint",
unsigned: true,
}).references(() => usersTable.id).notNull()
} |
Beta Was this translation helpful? Give feedback.
0 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.
-
The recommended way to do a many-to-one relationship in the docs is
but this produces
which gives this error.
because serial in MySQL is a
BigInt Unsigned
, not anint
.When I manually change the
city_id
toBigInt Unsigned
in the raw SQL, the problem disappears. Unfortunately, I can't find a way to change bigint to unsigned using drizzle. Is there something I'm missing or has this not been implemented?Beta Was this translation helpful? Give feedback.
All reactions