© 2026 Hedgehog Software, LLC

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

`ADD COLUMN` and `RENAME COLUMN` migration issues

Ran migrations with
drizzle-kit push:pg
drizzle-kit push:pg
before, but that gives problems in our automated workflow because it asks interactively in case of deletions.

So now i want to run it with the drizzle migrator (from
node-postgres
node-postgres
) but that gives errors because columns already exist for
ADD COLUMN
ADD COLUMN
statements. I've searched the discord and followed the suggestion to edit the migration files and add
IF NOT EXISTS
IF NOT EXISTS
, that worked.

But now later migration files fail because there's
RENAME COLUMN
RENAME COLUMN
, and that operation doesn't have a
IF NOT EXISTS
IF NOT EXISTS
option.

What can I do here? If possible I prefer not to edit migration files or the db directly.
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

Rename conflicted column (postgres)
Drizzle TeamDTDrizzle Team / help
2y ago
Drizzle rename id column
Drizzle TeamDTDrizzle Team / help
3y ago
Migration issues
Drizzle TeamDTDrizzle Team / help
2y ago
Migration and existing policy issues
Drizzle TeamDTDrizzle Team / help
2y ago