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
When using enum column types in a model that also uses an explicit schema, it generates the wrong sql... #3171
Comments
Thanks for the report. |
Thanks for the tip... still learning. I'll try to figure out the fix too... I know it's in query-generator.js, but it looks pretty complicated. |
This problem applies in several places:
|
I updated to 3.11.0 and still get errors |
@marcingasior please show a reproducible test case then |
if you use it from node cluster or restart 2 times your app models.sequelize.sync().then(function () {
|
@marcingasior Works fine for me, the second time it's run it finds the enum fine. Please create a SSCCE |
Hi Jan, I create a test and run it against local instance (9.3 and 9.4) and it looks it is working fine. Thank you. |
Example:
The sql generated for this model is
When it should probably be
"nature" "videoGames.enum_platforms_nature"(If the dot is inside double quotes, it becomes part of the name, and the enum is created without a schema...)
This is only in Postgres, I haven't tested it with other backends. I'll try to provide a fix for this later, if I can figure it out.
The text was updated successfully, but these errors were encountered: