How do i migrate when im altering a table

Hey im getting error that table already exists alhough im not even touching it
No description
3 Replies
Gurbinder
GurbinderOP3mo ago
help
✨✨✨
✨✨✨3mo ago
This can happen if: -Your database was modified outside drizzle -There are multiple tables called "accounts" -Migration related data was modified outside drizzle Fixes: -Check if there are more than 1 schema with the name "accounts" -If this is local development, clear the whole DB and try again -Replace "create table" with "create table if not exists" in your migration file -If you modified the migration files manually, make sure they reflect the schema and the snapshots (or revert to the last working commit (this will might require DB reset unless you know how migrations work))
Gurbinder
GurbinderOP3mo ago
none of first 3 things happend and i had to do 3rd thing replace table with if not exists so it worked out but this thing is still drizzle bug i think maybe

Did you find this page helpful?