You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Referencing column 'city_id' and referenced column 'id' in foreign key constraint 'users_city_id_cities_id_fk' are incompatible.
because serial in MySQL is a BigInt Unsigned, not an int.
When I manually change the city_id to BigInt 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?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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