© 2026 Hedgehog Software, LLC

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

error: type "serial" does not exist

I'm trying to push a generated migration:

ALTER TABLE "account" ALTER COLUMN "id" SET DATA TYPE serial;
ALTER TABLE "account" ALTER COLUMN "id" DROP DEFAULT;
ALTER TABLE "user" ALTER COLUMN "id" SET DATA TYPE serial;
ALTER TABLE "user" ALTER COLUMN "id" DROP DEFAULT;
DO $$ BEGIN
...

But getting this error. Any ideas what is happening ?

error: type "serial" does not exist
at /Users/sfs/Devel/eldorato/node_modules/drizzle-kit/bin.cjs:24462:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PgPostgres.query (/Users/sfs/Devel/eldorato/node_modules/drizzle-kit/bin.cjs:25423:21)
at async Command.<anonymous> (/Users/sfs/Devel/eldorato/node_modules/drizzle-kit/bin.cjs:63260:9) {
length: 89,
severity: 'ERROR',
code: '42704',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_type.c',
line: '270',
routine: 'typenameType'

I found a reference to this might be a problem for the ALTER statement?
image.png
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

postgres 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
Error migrating "type does not exist"
Drizzle TeamDTDrizzle Team / help
2y ago