You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an issue while running migrations for my PostgreSQL database using Drizzle Kit and Node.js. Recently, I had to restore my development database from a backup, but now I cannot apply any new migrations. The migration process fails with the following error: error: Typ »account_enum« already exists
What I Understand So Far:
The error message (Typ »account_enum« already exists) suggests that an enum type account_enum already exists in the database schema. The migration process is likely trying to create it again, leading to a conflict.
My Question:
How can I handle this situation where:
A migration attempts to create an enum (or other objects) that already exist after a database restore?
New migrations cannot be applied due to conflicts between the restored database schema and the migration system?
Is there a way to:
Mark existing migrations as applied?
Reconcile the database schema with the migration history in Drizzle ORM?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am encountering an issue while running migrations for my PostgreSQL database using Drizzle Kit and Node.js. Recently, I had to restore my development database from a backup, but now I cannot apply any new migrations. The migration process fails with the following error:
error: Typ »account_enum« already exists
What I Understand So Far:
The error message (
Typ »account_enum« already exists
) suggests that an enum type account_enum already exists in the database schema. The migration process is likely trying to create it again, leading to a conflict.My Question:
How can I handle this situation where:
Is there a way to:
Beta Was this translation helpful? Give feedback.
All reactions