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)?
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 $NAMEwill return withTypeError: 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)?