Scripts to migrate Portal V1 deals, facilities, users, and banks (BSS/EWCS, GEF) to Portal V2.
npm install
Make sure Docker is running in the root directory of the repo. 🐳
To migrate a single user from V1 to V2 who belongs to a specific bank, you should create a JSON file containing the user's data and then use the following command:
node bss-ewcs/migrate-users.js --bankId=961 --file=./path/to/user.json
This script will map the V1 user's data to the V2 structure and add it to the users collection. Ensure that the user's bank is already in the banks collection.
To migrate multiple users from V1 to V2 along with their associated banks, create a JSON file containing the users' data and use the following command:
node bss-ewcs/migrate-users.js --file=./path/to/users.json
This script will map the V1 users' data to the V2 structure and add them to the users collection. Make sure that the user banks are already in the banks collection.
To migrate all BSS/EWCS deals from V1 to V2, the script grabs deals from an Azure fileshare (containing deals from Workflow) and adds them to the Portal/BSS database. Use the following command:
node bss-ewcs/migrate-deals.js
This script will map the V1 deals to the V2 structure and add them to the deals collection. Facilities associated with these deals will also be added to the facilities collection. mar
To migrate all GEF deals from V1 to V2, create JSON files containing the GEF deals' data and use the following command:
node gef/migrate-deals.js --path=./gef/dump
This script will map the V1 GEF deals' data to the V2 structure and add them to the deals collection. Facilities associated with these deals will also be added to the facilities collection.
To migrate a single GEF deal from V1 to V2, create a JSON file containing the deal's data and use the following command:
node gef/migrate-deal.js --file=./gef/dump/12345.json
This script will map the V1 GEF deal's data to the V2 structure and add it to the deals collection. Facilities associated with this deal will also be added to the facilities collection.
Make sure to follow the instructions and provide the required input data in JSON files as needed for each migration script.