Is there a way to generate models and associations (through automation) based on an existing database?
For example, take customers and orders:
Customer
---------
id, name
Order
---------
id, customerId, orderDate
Is there a way to generate models and associations (through automation) based on an existing database?
For example, take customers and orders:
Customer
---------
id, name
Order
---------
id, customerId, orderDate
I think you can use Sequelize-Auto for this
Automatically generate models for SequelizeJS via the command line.
Command for that :
[node] sequelize-auto -h <host> -d <database> -u <user> -x [password] -p [port] --dialect [dialect] -c [/path/to/config] -o [/path/to/models] -t [tableName] -C