Facing an issue with bytea in drizzle-orm #5157
Replies: 1 comment 2 replies
-
|
The If you are on drizzle-orm 0.36+
import { pgTable, bytea, text, uuid } from 'drizzle-orm/pg-core';
const files = pgTable('files', {
id: uuid('id').primaryKey().defaultRandom(),
name: text('name').notNull(),
data: bytea('data', { mode: 'buffer' }).notNull(),
});The
If
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was using bytea with drizzle-orm to ensure storage of my image files, and when I was designing its schema, I was facing an issue where there was no export named bytea in drizzle-orm/pg-core, however in documentation, it was listed as correct export. I also tried custom bytea export, still it was not working, kindly guide me how to fix this issue.
Beta Was this translation helpful? Give feedback.
All reactions