drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
24.67k stars 650 forks source link

[FEATURE]: support citext on introspection #602

Open andresribeiro opened 1 year ago

andresribeiro commented 1 year ago

Describe want to want

actually it's not able to introspect a citext column

// TODO: failed to parse database type 'citext'
email: unknown("email").notNull(),
rainum commented 8 months ago

Is there any progress on this feature?

rainum commented 8 months ago

As an alternative, is there a way to tap into a field-type generator during introspection? So I can convert this:

// TODO: failed to parse database type 'citext'
some_field: unknown("some_field")

Into this:

some_field: my_custom_type("some_field")

unknown(...) makes generated schema invalid

anthonyalayo commented 2 days ago

This probably falls under custom types in general, and someone filed an issue for that more recently: https://github.com/drizzle-team/drizzle-orm/issues/3446

Hopefully we can get a workaround in the meantime.