-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENUM error : synchroize doesn't check if enumtype already exists in postgres #5738
Comments
Duplicate of #5748 |
I still got this error in 0.2.29, and your linked dupliate issue is "Update dependency mkdirp to 1.x" |
Why is this closed? |
GitHub autocomplete seems to have a strange behavior where it selects a completely different issue number than the one you typed, and I presume that's what has happened here. Correct one is below. Duplicate of #5648. |
any fix for this yet? |
bump |
Also running into this issue after squashing migrations. Does anyone have solutions for a workaround? |
I have been manually editing the migrations files after generation |
@Distortedlogic for things like |
@sepiette If u use the same Enum in multiple tables, when the migration is generated, it will attempt to create the Enum multiple times, once per table it is used in. Simply remove the extra lines of As u can see in the screenshot, there is only one create line per Enum because I removed the duplicates after generating my migration which resolves the issue (or at least it does in my case). hope this helps |
Thanks @Distortedlogic! I might be dealing with something a little different - I'm currently trying to squash my migrations into 1 file as we're dealing with some performance issues, however the |
[ ] bug report
[ ]
postgres
when synchronise is on, typeorm doesn't check if a enum type already exists when using "enumName" .
I guess a IF NO EXISTS is missing somewhere
error is the following (type already exists)
The text was updated successfully, but these errors were encountered: