© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•13mo ago•
2 replies
ac222222222222

drizzle-kit generate keeps trying to recreate enum value that already exists

I recently created a migration using
drizzle-kit generate
drizzle-kit generate
after replacing a pg enum value. the generated migration was incorrect as it added the new value but never removed the old one. Hence, I manually edited the migration to look like this:
ALTER TYPE job_status RENAME VALUE 'completed' TO 'successful';
ALTER TYPE job_status RENAME VALUE 'completed' TO 'successful';


however, now whenever I run generate for subsequent migrations, it keeps trying to create the new enum value:
ALTER TYPE "job_status" ADD VALUE 'successful';--> statement-breakpoint
ALTER TYPE "job_status" ADD VALUE 'successful';--> statement-breakpoint


is there a way to stop it from doing so?
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

enum label already exists
Drizzle TeamDTDrizzle Team / help
2y ago
drizzle-kit push keeps trying to drop and recreate the same constraints
Drizzle TeamDTDrizzle Team / help
16mo ago
issue drizzle-kit pull -> drizzle-kit-generate -> drizzle-kit migrations
Drizzle TeamDTDrizzle Team / help
9mo ago
drizzle-kit generate error
Drizzle TeamDTDrizzle Team / help
8mo ago