"drizzle-orm": "^0.28.6", "drizzle-zod": "^0.5.1", ```ts export const testTable = pgTable('accounts', { id: varchar('id').primaryKey(), optional: varchar('optional'), notOptional: varchar('not_optional').notNull(), unique: varchar('unique').unique().notNull(), }) const testSchema = createInsertSchema(testTable) type TestTypeWrong = z.infer<typeof testSchema> type TestTypeCorrect = typeof testTable.$inferInsert ``` Results ```ts type TestTypeWrong = { id?: string; optional?: string; notOptional?: string; unique?: string; } type TestTypeCorrect = { id: string; notOptional: string; unique: string; optional?: string; } ```