Column of relation already exists
I have a couple of tables
I went to add a new column
name
to the school_references
table & remove a column from transfer_portal_entries
and ran drizzle-kit generate
followed by drizzle-kit migrate
. However, when I run the migrate
command I get applying migrations...PostgresError: column "name" of relation "school_references" already exists
. I previously added name
via the Supabase dashboard to test something and then removed it but it was back after running generate
and migrate
the other day (which I want). I'm not sure why it's complaining now.5 Replies
I am running into something similar due to the
IF NOT EXISTS
being removed I think https://github.com/drizzle-team/drizzle-orm/releases/tag/drizzle-kit%400.30.0GitHub
Release [email protected] · drizzle-team/drizzle-orm
Starting from this update, the PostgreSQL dialect will align with the behavior of all other dialects. It will no longer include IF NOT EXISTS, $DO, or similar statements, which could cause incorrec...
I just upgraded from
0.36.4
to 0.38.1
of drizzle-orm
and 0.28.1
to 0.30.0
of drizzle-kit
and now I can't even do drizzle-kit generate
😠I get
@Spark @jsingleton37 sorry for mention but have you guys find any solution?
I don't have this problem anymore, but I don't remember if I just started a new project so that is why? Are you adding a default to the new fields?
i just made a basic change to my schema and then i got "PostgresError: relation "authenticator" already exists" this error, but my change doesnt have anything to do with it, here is my migration file
i fixed it by downgrading drizzle-kit to 0.30.0
i was using 0.30.1