[BUG]: pgEnum enumValues does not return as literal value #3926
Open
Description
What version of drizzle-orm
are you using?
0.38.3
What version of drizzle-kit
are you using?
0.22.7
Other packages
No response
Describe the Bug
import { z } from "zod";
import { pgEnum } from "drizzle-orm/pg-core";
export const genderEnum = pgEnum("gender", ["female", "male", "other"]);
export const testTable = pgTable("testTable ", {
id: uuid("id").defaultRandom().primaryKey(),
gender: genderEnum("gender"),
});
const testRow = await db.query.testTable.findFirst();
In this scenario testRow.gender would be typed as a string instead of ["female", "male", "other"]