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

File structure in /models folder #713

Open
holodnii opened this issue Jun 21, 2023 · 0 comments
Open

File structure in /models folder #713

holodnii opened this issue Jun 21, 2023 · 0 comments

Comments

@holodnii
Copy link

In my project I have models folder which consists of following: index.js and 2 folders with particular naming which represent different models for different db's (implementation of multi-tenancy), which also do not contain other index.js files, only models. It is quite obvious that sequelize-mig migration:make -n $NAME will return with TypeError: Cannot read property '__folderName' of undefined (probably because it is a folder). The file .sequelizerc contains: 'models-path': path.resolve('./database/models'), which I thought only searches for the index.js, but unfortunately as well sees folders. The question is: is there any way with structuring your models folder with folders or it should only contain .js files (quite sad tbh if so)?

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

1 participant