This convert script converts a RadGrad1 dump to RadGrad2 format. This involves the following:
- slight structural modifications to certain collections
- deletion of several collections no longer used in RadGrad2.
- definition of several (empty) collections newly available in RadGrad2.
- Initialization of the UserInteractionCollection to zero documents.
To use this script, do the following:
Create three directories named "custom" so that their contents won't be uploaded to github (all directories named custom are gitignored):
Download a dump file from RadGrad1 into radgrad2/scripts/data/custom. Let's call it 2020-11-01.json.
Edit scripts/package.json so that the "convert" script references the RadGrad1 data file name and then outputs the converted RadGrad2 file name into the radgrad2/app/private/database/custom directory.
Put a copy of config/settings.development.json into radgrad2/custom, and edit the databaseRestoreFileName field to refer to the converted RadGrad2 file name.
Now you are ready to run (or re-run) the conversion script. First, invoke
npm run convert to recompile the script and then invoke it on your RadGrad1 file and produce the RadGrad2 database:
To test the conversion, in a separate console, cd to the radgrad2/app directory, and invoke
meteor reset; meteor npm run start-custom. This will clean the development DB, and invoke your custom settings file that specifies the location of your converted DB:
The above tests to ensure that the database loaded successfully.