Sequelize Guides
Sequelize is a popular ORM widely used in the Node.js community. Sequelize supports automatic database schema management using its sync feature, which is not considered safe for production use.
The Sequelize project recommends using versioned migrations
for production workloads, using the sequelize-cli
tool. However, sequelize-cli
relies on manual planning of
migrations which can be error-prone and time-consuming.
Atlas provides automatic migration planning which seamlessly integrates with Sequelize. This allows you to keep your Sequelize schema in sync with your database without the need to manually plan migrations.
Quick Start
Get started with Atlas and Sequelize.
Loading Sequelize Models Into Atlas
To use Atlas with Sequelize, there are two modes in which the Atlas Sequelize Provider can load your schema. Choose the one that suits your project setup.Standalone Mode
If all of your Sequelize models exist in a single Node moudle, you can use the provider directly to load your Sequelize schema into Atlas.
Script Mode
Use in more advanced scenarios where you need more control specifying which models should be included.
Managing Database Objects
Like many ORMs, Sequelize provides a way to define the most common database objects, such as tables, columns, and indexes using Javascript. Atlas extends this capability by allowing you to define more advanced database objects such as composite types, domain types, and triggers.
Composite Types
Incorporate composite types into your Sequelize schema.
Domain Types
Define and use custom domain types within your Sequelize schema.
Row-Level Security
Apply RLS policies to safeguard data in your Sequelize schema.
Triggers
Automate actions in your Sequelize schema using triggers.
Views
Incorporate Views into your schemas.