We use the rethink-migrate module.
Run:
npm install -g rethink-migrate
Run:
rethink-migrate create [migrationName] --root db
Edit the newly created file as you wish.
Delete the content of the file 'db/database.json'.
Explanation: It holds SSL certificate, and is used only for production.
Run:
npm run upgrade-db -- --db=test
Notice! Before committing, make sure the file 'db/database.json' is not committed!