API REST Em Nodejs

A ideia desse projeto é construir uma arquitetura de software utilizando os conceitos REST e Clean Code.

Migrations

  • Gerar um esqueleto de migration: npx sequelize-cli migration:generate --name migration-skeleton
  • Executar migrations: npx sequelize-cli db:migrate
  • Desfazer migrations: npx sequelize-cli db:migrate:undo
  • Desfazer migration específica: npx sequelize-cli db:migrate:undo:all --to XXXXXXXXXXXXXX-create-posts.js

Seeders

  • Criar seeders: npx sequelize-cli seed:generate --name demo-user
  • Executar seeders: npx sequelize-cli db:seed:all
  • Desfazer seeders: npx sequelize-cli db:seed:undo
  • Desfazer seeder específica: npx sequelize-cli db:seed:undo --seed name-of-seed-as-in-data
Mais detalhes sobre migrations e seeders: https://sequelize.org/master/manual/migrations.html