Migrating the Database

Migrating Database

The database has gone through many data migrations since the beginning of this project. Whenever the data schema of the Word or Example model need to change, the contributor making that schema change will create a new migration script following the migrate-mongo guides (opens in a new tab).

Once you've created a migration script, you can run the following command to apply the migration to your local MongoDB database:

npm run migrate-up

If you want to rollback your migration, you can run the following command:

npm run migrate-down