© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•17mo ago
regex

Type error in 0.33.0

export const cities = pgTable("cities", {
  id: serial("id").primaryKey(),
  name: varchar("name", { length: 256 }),
});
export const cities = pgTable("cities", {
  id: serial("id").primaryKey(),
  name: varchar("name", { length: 256 }),
});

Argument type {name: PgVarcharBuilder<{name: "name", dataType: "string", columnType: "PgVarchar", data: [string, ...string[]][number], driverParam: string, enumValues: [string, ...string[]], generated: undefined}>, id: PgSerialBuilder & {: {notNull: true}} & {: {isPrimaryKey: true}}} is not assignable to parameter type Record<string, PgColumnBuilderBase>


Setting the id with .primaryKey throws a type error.
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

Type inference breaking in drizzle-orm 0.32.0 ?
Drizzle TeamDTDrizzle Team / help
2y ago
Type error working with Postgres dates in v.0.30.1
Drizzle TeamDTDrizzle Team / help
2y ago
Type error?
Drizzle TeamDTDrizzle Team / help
3y ago
DB type error
Drizzle TeamDTDrizzle Team / help
3y ago