Open glacius-mitchell opened 1 week ago
Hi @RobinBlomberg, I see you've already addressed this in https://github.com/RobinBlomberg/kysely-codegen/commit/e4f54f4b41a8d4a7833ae9409ce97c12512c701b. Is there any chance that commit will make its way into a release soon? We're unable to upgrade at the moment due to the type regressions above. Thanks!
I believe the
ColumnType
type argument deduplication logic in https://github.com/RobinBlomberg/kysely-codegen/commit/ad03d2ef67f40c7d22df27e30a16bcf6083da463 was incorrect.In particular, it assumed an omitted update type would default to the insert type, when in fact Kysely's update type defaults to the select type (see https://github.com/kysely-org/kysely/blob/0.27.4/src/util/column-type.ts#L41).
This led to some regressions in the types generated by
kysely-codegen
.For instance, where we previously had these generated types
which expanded to
we now have these generated types
which expand to
The new column types are overly strict on what types of values can be specified for an update.
Upvote & Fund