Creating and saving canned data - sdurbin1/safe-rest GitHub Wiki

Currently, we have a set of data used to seed our database. This data is stored in data/safe. Each collection is stored in a separate json file. Here are the scripts that are used to manage that seed data:

Drop database:

./scripts/db/dropDb.sh <DB NAME> 

Remove all json files from data/safe and re-create seed data based upon current contents of database:

./scripts/db/exportDb.sh <DB NAME> 

Populate database with seed data. You probably won't use this script directly, instead you will use resetDb.sh

./scripts/db/importDb.sh <DB NAME> 

Drop database and populate database with seed data

./scripts/db/resetDb.sh <DB NAME> 
⚠️ **GitHub.com Fallback** ⚠️