createInsertSchema wrong type (drizzle-zod 0.3.1, sqlite))
After upgrading to 0.3.1, all of the fields changed to ZodTypeAny
![](https://utfs.io/f/c85e8af0-c1f5-47cd-a66c-863dddcdbfe6-s2nlts.20.25.png)
![](https://utfs.io/f/9b12e6d8-ca07-4fdd-81c3-a7df13309bbb-s2nlts.21.18.png)
6 Replies
did you update drizzle-orm as well?
Yes, to 0.24.1
could you post your table definition?
export const StatusUpdate = sqliteTable("StatusUpdate", {
id: cuid2("id").primaryKey(),
author: text("author")
.notNull()
.references(() => User.id),
createDate: now("date").notNull(),
applicationId: text("applicationId")
.notNull()
.references(() => Application.id),
type: text("type", { enum: statusUpdateTypes }).notNull(),
statusDate: text("statusDate").notNull(),
note: text("note").notNull(),
});
export const statusUpdateInsertSchema = createInsertSchema(StatusUpdate).omit({
id: true,
author: true,
createDate: true,
});
yep, confirmed the issue
happens in mysql, too
tests were too broad and didn't catch this
working on the fix
@tacomanator fixed in
0.3.2
confirmed, thank you!