Sequelize: how to import definitions from an existing database

node.js, sequelize.js

Solution

with Sequelize you have to define the structure of the model inside your code. Doing so, Sequelize assumes a specific database schema unless something is overwritten. So in short: No, sequelize cannot mirror the database.

Hope that helps :)

Problem

Am I required to handwrite the model definitions for Sequelize even if I'm working off of an existing database. If it's not required, then how does one go about using Sequelize with an existing database? I've already defined the database's schema in Doctrine, so I'd rather not have to write another set of model definitions again.

Original source