Closed pruhstal closed 7 years ago
Thank you first for your praise. Yup, Hails is an incomplete hapijs abstraction of mine. Sequelize assumes that by default there is a model in the models directory, but Hails doesn't need these things because it assumes that the model is in src/server/*/model.js. If you are interested in this issue, I'll fix it right now so that you can run sequelize directly. Thanks
You can now execute
sequelize model:create --name Test --attributes name:string,description:text
then two file would be generated like below.
db/migrations/20170801100059-create-test.js
db/models/test.js
and you should put the contents of the generated model in the appropriate module. ex) src/server/core/model.js
Very nice, @eseom. Thank you for the quick response + patch!
I'm starting to get more familiar with the codebase, so it's helpful to know about things like .sequelizerc
.
Cheers
First off -- nice repo! Really digging the code structure.
One thing I'm mainly confused about is hails. So it seems like it's something you rolled on your own, and you reference it in this project. Specifically for some db migrations instead of using
sequelize
directly. (e.g. :sequelize model:create --name Test --attributes name:string,description:text
).If I ran that command in the root directory, I'd get something like:
I couldn't find out where hails was specifically calling
sequelize init
, so I'm curious how it works without callingsequelize init
?