We use migrate-mongo to handle our
MongoDB database migrations.
Generate a New Migration script
Globally installmigrate-mongo to be able to generate migration scripts.
Replace
<name_of_migration> with the name of your own migration. Remember to use snake case.Structure of MongoDB Migration
Each migration script must include anup and down function that are included in the default exports.
migrations/20201106045436-name-of-migration.js
Here are all the examples of database
migrations for
the Igbo API.