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(),
});


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(),
});


Is this a normal occurrence or am I doing something wrong?
Was this page helpful?