Skip to content
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

Does not pick up model details with Sequelize 5.x installed #46

Open
Xipooo opened this issue Mar 15, 2019 · 8 comments
Open

Does not pick up model details with Sequelize 5.x installed #46

Xipooo opened this issue Mar 15, 2019 · 8 comments

Comments

@Xipooo
Copy link

Xipooo commented Mar 15, 2019

With Sequelize 5.x installed the makemigration tool only seems to pick up on the model names but none of the property information.

@Restuta
Copy link

Restuta commented Mar 16, 2019

Same issue, during the start it outputs:

(sequelize) Warning: A boolean value was passed to options.operatorsAliases. This is a no-op with v5 and should be removed.
Cannot read property 'undefined' of undefined

@lukaskopenec
Copy link

This is actually pretty easy to fix. The issue is that in v5 they have renamed Model.attributes to Model.rawAttributes. I will create a PR for that, but I am not sure when the author merges it. I will however create my own fork temporarily as I need this to work now.

@lukaskopenec
Copy link

Hmm, it is actually already fixed, but the version has not been released yet 🤔

@ALiangLiang
Copy link

let attributes = models[model].attributes || models[model].rawAttributes;

@lukaskopenec Yes you are right. Already fixed.

@Xipooo
Copy link
Author

Xipooo commented Mar 25, 2019

@ALiangLiang any idea when this will be pushed to npm?

@ALiangLiang
Copy link

ALiangLiang commented Mar 25, 2019

@Xipooo idk. I'm not the author or collaborator of this project.

@flexxnn

@dhruvingbc
Copy link

I ran yarn add <repo-url> and it worked. for me. Thank you so much all

@staadecker
Copy link

For npm you can add this line to your dependencies.

"sequelize-auto-migrations": "git+https://github.com/flexxnn/sequelize-auto-migrations.git"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants