Requirements
Write a script to migrate all trainee data from the current MongoDB format to the new Porstgres format.
- The script should fetch all trainee from MongoDB, map the current fields, push the data to Postgres DB. The mapping is not 1:1 and will spread across different tables and fields in the Porstgres database.
- Migrate all profile pictures to the new backend as well. Check the Field mapping document below on instruction how to do it.
Guidance
- The script is for on-time use. We will no longer need it after completing the migration.
- Use the test database as your source for testing.
- Create a local Postgresql container to test the destination migration
- Pull and run the new Spring Boot backend with your database credentials. Spring Boot will automatically create the schema
- To interact with the API, you need to create a user and an API token in the database. You can do it manually or use the new setup python script that will do that for you (under
scripts/setup, run it only for the user and API token, skip trainee generation). The test api token is DOJOTEST.
Field mapping description (Private link)
The folder can be located in the following URL: https://drive.google.com/drive/u/0/folders/1yMcBY3GfWrFYr8gmtGmZPgv6l0Ra1Sio
It includes a visual Google doc and a markdown file in case you want to send to to an AI agent. Both have identical content.
Requirements
Write a script to migrate all trainee data from the current MongoDB format to the new Porstgres format.
Guidance
scripts/setup, run it only for the user and API token, skip trainee generation). The test api token is DOJOTEST.Field mapping description (Private link)
The folder can be located in the following URL: https://drive.google.com/drive/u/0/folders/1yMcBY3GfWrFYr8gmtGmZPgv6l0Ra1Sio
It includes a visual Google doc and a markdown file in case you want to send to to an AI agent. Both have identical content.