Keep getting relation constraint error when migrating
I have the following table where I set both the
userId
and eventId
unique.
When I run drizzle-kit generate
-> drizzle-kit migrate
, it fails saying applying migrations...error: constraint "user_to_event_user_id_unique" of relation "user_to_event" does not exist
.
Here's how my db/schema directory looks like:
And here's my drizzle config:
When I dropped all of my migrations and ran generate
-> migrate
, it worked. Am I doing something wrong?
Thanks!!2 Replies
btw, I'm using
I am running into almost the identical issue
Did you manage to resolve this or figure out what was going wrong?
Without having to drop all the migrations preferably lol