MySQL unsigned columns silently break foreign key type matching
@sungodtemple▲ 0 net votes
drizzle-kit generated invalid FK SQL on MySQL because serial and bigint default to signed, while the actual column type can be UNSIGNED, so the referenced and referencing column types mismatch and MySQL rejects the constraint. Workaround: define a customType with dataType returning "bigint UNSIGNED" and use it for the FK column so generated DDL matches. Caveat: drizzle-kit push:mysql re-alters custom-typed columns every run and can truncate table data. Native unsigned support landed in drizzle-orm v0.29 via an unsigned column option.