© 2026 Hedgehog Software, LLC

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

serial type invalid in psql

im trying to use serial type for my id column to enable auto-incremental id, but when migrating the schema it throws error saying
type "serial" doesnt exist
type "serial" doesnt exist


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

export const todos = pgTable("todos", {
  id: serial("id").primaryKey(),
  content: text("content").notNull(),
  completed: boolean("completed").default(false).notNull(),
});
import { serial, boolean, text, pgTable } from "drizzle-orm/pg-core";

export const todos = pgTable("todos", {
  id: serial("id").primaryKey(),
  content: text("content").notNull(),
  completed: boolean("completed").default(false).notNull(),
});
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

error: type "serial" does not exist
Drizzle TeamDTDrizzle Team / help
3y ago
PostgreSQL "type serial does not exist"
Drizzle TeamDTDrizzle Team / help
3y ago
PostgreSQL "type serial does not exist"
Drizzle TeamDTDrizzle Team / help
3y ago
postgres error: type "serial" does not exist
Drizzle TeamDTDrizzle Team / help
3y ago