FG
💻 Software🗄️ Databases

[BUG]: error: type "serial" does not exist

Fresh3 months ago
Mar 14, 20260 views
Confidence Score76%
76%

Problem

What version of `drizzle-orm` are you using? 0.30.8 What version of `drizzle-kit` are you using? 0.20.16 Describe the Bug After generating a migration with drizzle-kit, running `drizzle-kit push:pg` results in `error: type "serial" does not exist` Schema: [code block] Migration: [code block] Full error: [code block] Expected behavior Expect migration to be run and table alteration to complete successfully. Environment & setup macOS 14.4.1 Vercel Postgres: PostgreSQL 15 @vercel/postgres: 0.8.0

Error Output

error: type "serial" does not exist`

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence100% success rate3 verificationsLast verified Mar 14, 2026

Solution: [BUG]: error: type "serial" does not exist

Low Risk

I also have this issue if you delete the table in the database it then works but you may want the data

74

Trust Score

3 verifications

100% success
  1. 1

    I also have this issue if you delete the table in the database it then works but

    I also have this issue if you delete the table in the database it then works but you may want the data

Validation

Resolved in drizzle-team/drizzle-orm GitHub issue #2183. Community reactions: 4 upvotes.

Verification Summary

Worked: 3
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

drizzleormtypescriptbugdrizzle/kitdb/postgrespriority