FG
💻 Software🗄️ Databases

[BUG]: using `pgEnum` generates faulty sql migration

Freshover 2 years ago
Mar 14, 20260 views
Confidence Score83%
83%

Problem

What version of `drizzle-orm` are you using? 0.26.1 What version of `drizzle-kit` are you using? 0.18.1 Describe the Bug Creating a user schema with role enum [code block] generates this sql migration [code block] which fails when running with error `PostgresError: type "role" does not exist` unless i wrap `Role` in double quotes manually like this [code block] Expected behavior Double quotes should be added automatically Environment & setup node v18.16.0

Error Output

error `PostgresError: type "role" does not exist` unless i wrap `Role` in double quotes manually like this

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
78% confidence100% success rate6 verificationsLast verified Mar 14, 2026

Solution: [BUG]: using `pgEnum` generates faulty sql migration

Low Risk

In my latest usage, the ENUMs aren't even generated anymore... bump on this issue.

78

Trust Score

6 verifications

100% success
  1. 1

    In my latest usage, the ENUMs aren't even generated anymore... bump on this issu

    In my latest usage, the ENUMs aren't even generated anymore... bump on this issue.

Validation

Resolved in drizzle-team/drizzle-orm GitHub issue #646. Community reactions: 17 upvotes.

Verification Summary

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

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

drizzleormtypescriptbug