Cant get custom type to work with default value

I made a custom type for the interval type in postgres default values keep writing [object Object] to the migration file regardless of what I output in toDriver
No description
2 Replies
CC
CCOP3w ago
turns out this simply isn't a feature right now from what I understand from reading the code: https://github.com/drizzle-team/drizzle-orm/blob/b762f63843848a82fae97688db01033e092c98d1/drizzle-kit/src/serializer/pgSerializer.ts#L239
Angelelz
Angelelz3w ago
You can pass the sql operator to the default method with what you want to have as default
isoInterval().notNull().default(sql`<sql goes here>`)
isoInterval().notNull().default(sql`<sql goes here>`)
Want results from more Discord servers?
Add your server