© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago
kareulo

Custom type is unknown on Drizzle Studio

Hello,

I have created a custom type to store my database salt like this:

import { customType, pgTable, text } from "drizzle-orm/pg-core";

const bytea = customType<{ data: Buffer }>({
  dataType() {
    return "bytea";
  },
});

export const users = pgTable("users", {
  id: text("id").notNull().primaryKey(),
  email: text("email").notNull().unique(),
  passwordHash: text("password_hash").notNull(),
  salt: bytea("salt").notNull(),
});
import { customType, pgTable, text } from "drizzle-orm/pg-core";

const bytea = customType<{ data: Buffer }>({
  dataType() {
    return "bytea";
  },
});

export const users = pgTable("users", {
  id: text("id").notNull().primaryKey(),
  email: text("email").notNull().unique(),
  passwordHash: text("password_hash").notNull(),
  salt: bytea("salt").notNull(),
});


Later, I noticed an issue in the schema tab of Drizzle ORM where I found this:

export const users = pgTable("users", {
  id: text("id").primaryKey().notNull(),
  passwordHash: text("password_hash").notNull(),
  // TODO: failed to parse database type 'bytea'
  salt: unknown("salt").notNull(),
  email: text("email").notNull(),
});
export const users = pgTable("users", {
  id: text("id").primaryKey().notNull(),
  passwordHash: text("password_hash").notNull(),
  // TODO: failed to parse database type 'bytea'
  salt: unknown("salt").notNull(),
  email: text("email").notNull(),
});


Is this a normal occurrence or am I doing something wrong?
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Drizzle Studio "unknown is not defined"
Drizzle TeamDTDrizzle Team / help
2y ago
Drizzle Studio on postgres
Drizzle TeamDTDrizzle Team / help
3y ago
Use drizzle studio without local.drizzle.studio?
Drizzle TeamDTDrizzle Team / help
2y ago
Drizzle Studio hangs when visiting local.drizzle.studio
Drizzle TeamDTDrizzle Team / help
11mo ago