FG
๐Ÿ’ป Software๐Ÿ—„๏ธ Databases

[BUG]: drizzle-kit push is not detecting Postgres enum label already exists

Freshover 1 year ago
Mar 14, 20260 views
Confidence Score81%
81%

Problem

What version of `drizzle-orm` are you using? 0.30.9 What version of `drizzle-kit` are you using? 0.21.2 Describe the Bug This bug happens every so often. Is there a work around? pnpm drizzle-kit push drizzle-kit: v0.21.2 drizzle-orm: v0.30.9 No config path provided, using default path Using 'pg' driver for database querying Warning You are about to execute current statements: ALTER TYPE "job_name" ADD VALUE 'SET_PCS_POWER_KW'; error: enum label "SET_PCS_POWER_KW" already exists kit@0.21.2/node_modules/drizzle-kit/bin.cjs:113632:7) { length: 102, severity: 'ERROR', code: '42710', detail: undefined, hint: undefined, position: undefined, internalPosition: undefined, internalQuery: undefined, where: undefined, schema: undefined, table: undefined, column: undefined, dataType: undefined, constraint: undefined, file: 'pg_enum.c', line: '293', routine: 'AddEnumLabel' } Expected behavior _No response_ Environment & setup _No response_

Error Output

error: enum label "SET_PCS_POWER_KW" already exists

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
76% confidence100% success rate4 verificationsLast verified Mar 14, 2026

Solution: [BUG]: drizzle-kit push is not detecting Postgres enum label already exists

Low Risk

I don't know how to fix it but I believe you can reproduce it by creating a Postgres enum, pushing it to the database, then if you add new items, or shuffle the tuple, then when you push again it will error.

76

Trust Score

4 verifications

100% success
  1. 1

    I don't know how to fix it but I believe you can reproduce it by creating a Post

    I don't know how to fix it but I believe you can reproduce it by creating a Postgres enum, pushing it to the database, then if you add new items, or shuffle the tuple, then when you push again it will error.

Validation

Resolved in drizzle-team/drizzle-orm GitHub issue #2389. Community reactions: 6 upvotes.

Verification Summary

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

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

drizzleormtypescriptbug