Skip to content

File structure in /models folder #713

@holodnii

Description

@holodnii

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)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions