Using DbSchema with Postgres & Sequelize
The road to using Postgres, Sequelize, Sequelize-Auto, and DbSchema have some bumps along the way. More specifically, these "bumps" have to do with automatic incrementing and audit fields. These are the steps I recommend when working with this combination.
Rule #1: Do not use Sync
Sequelize-Auto does not handle indexes. For this reason, any indexes created in DbSchema will be ignored. This is why we use DbSchema to work with database modifications. We only tweak enough of Sequelize's models to work with the columns. Since the models will not have indexes by default, we must never use Sequelize to push changes to the database.
The process...
1. Define Sequences