Clone the project
git clone git@github.com:GymSquad/integrate-database.gitGo to the project directory
cd integrate-databaseInstall dependencies
pnpm installSet environment variables in .env file in /mysql and /postgres (mysql is the old database)
cp .env.example .envStart the server
cd ./postgres
pnpm devOpen another terminal and enter /mysql, then run the integrate script
cd mysql
pnpm startHit the API to write logs
curl http://localhost:3000/websiteWhen all the tasks are done, you will find /postgres/id-mapping.json, and you can run the move script to move the archive files
cd tools
pnpm move <path-to-your-json>