Sequelize Database Migrations and Models With Nodejs

Koray Göçmen
Nov 21, 2020 · 4 min read
Nodejs + Sequelize

After using Sequelize in my Express applications for the past 6 years, this is how I write my migrations and models for all my Nodejs applications.

Install sequelize with npm first and initialize the project with “sequelize init”. That should create the “models”, “migrations” and “seeders” folders as well as create the “config/config.json” file.