© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
10 replies
Pure

bit type goes to postgresql as a string

Hello!
I was recently creating my schemas for a project (I am using postgresql) and I set a column as bit(10), but drizzle-kit push passes it to postgresql as a string so that postgresql gives an error.

export const users = pgTable(
  "user",
  {
    id: bigint("id", { mode: "bigint" }).primaryKey(),
    test: bit("test", { dimensions: 10 }),
  }
);
export const users = pgTable(
  "user",
  {
    id: bigint("id", { mode: "bigint" }).primaryKey(),
    test: bit("test", { dimensions: 10 }),
  }
);

->
CREATE TABLE IF NOT EXISTS "formatting" (
             "id" bigint PRIMARY KEY NOT NULL,
            "test" "bit(10)",
);
CREATE TABLE IF NOT EXISTS "formatting" (
             "id" bigint PRIMARY KEY NOT NULL,
            "test" "bit(10)",
);

ERROR:  type "bit(10)" does not exist at character 161
ERROR:  type "bit(10)" does not exist at character 161
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

Custom Type interpreted as String
Drizzle TeamDTDrizzle Team / help
3y ago
Json as a string
Drizzle TeamDTDrizzle Team / help
8mo ago
Json column type returning as plain string?
Drizzle TeamDTDrizzle Team / help
16mo ago
Timestamp as string
Drizzle TeamDTDrizzle Team / help
3y ago