Sequelize is a promise-based Node.js ORM. This fork supports Postgres only — the MySQL, SQLite and MSSQL dialects have been removed. It features solid transaction support, relations, read replication and more.
$ npm install --save sequelize
# And the Postgres driver:
$ npm install --save pg pg-hstoreRequires Node v20.20.0 or above.
- Schema definition
- Schema synchronization/dropping
- 1:1, 1:M & N:M Associations
- Through models
- Promises
- Hooks/callbacks/lifecycle events
- Prefetching/association including
- Transactions
- Migrations
- CLI (sequelize-cli)