I am new to Sequelize
and my current project requires me to use it with migrations. I am familiar with migrations what they do and how.
I am coming from Django
background where each sub app has modals, views, apis, urls and migrations in the same folder. i like the structure and want to keep the same in my nodejs app. i am trying to put a feature at one place. it makes more sense to me.
my structure
|---api
|---user
| |--- api.js
| |--- utils.js
| |--- models.js
| |--- index.js
| |--- migrations
| |--- xxx123-migration.js
| |--- xxx1235-migration.js
|---payment
|--- api.js
|--- utils.js
|--- models.js
|--- index.js
|--- migrations
|--- xxx123-migration.js
|--- xxx1235-migration.js
now my problem is that i dont know how to m make Sequelize-cli
point to my folders and look for migrations to generate and run.
Sequelize-cli
generates their own folders for models, config, seeds etc. which I don't want to follow.
any help is appreciated.
user
,auth
,payment
, etc. how can i point to all folders inside api ? – Cismontane