PoC Database migration
- Nodejs
- NPM
- Docker and Docker-compose
- Run environment
cd data-migration
npm run infra:start
Note: All is dockerized. If you run npm run infra:stop
all the containers will be removed as well the data (this is expected ;-))
- Check the applications (optional)
- New front: http://localhost:8080/
- New Api: http://localhost:8080/api/v1/quotes
- Legacy: http://localhost:8081/quotes/
Note: No data in the database. So the quotes lists are not rendered (this is expected ;-))
- Run the seed generator
This will populate the legacy database with fake data.
cd data-migration
npm run migration:seed
- Check the applications again (optional)
- New front (empty): http://localhost:8080/
- New Api (empty): http://localhost:8080/api/v1/quotes
- Legacy (populated) : http://localhost:8081/quotes/
- Run the migration script
This will populate the new database with the legacy data (no fake).
cd data-migration
npm run migration:start
Now all the platforms (old and new) are populated
- Run the validation script
This will run a fast DB vs DB validation and a quite long e2e tests with Cypress.
cd data-migration
npm run migration:validation
Note: Check the migration logs at /data-migration/logs
- Congratulations! 🎉
You made it!
Both platform are using seed fake data
cd old-server
npm run infra:build
npm run infra:start
Enter to localhost:8081/quotes
npm run infra:stop
cd new-server
npm run infra:build
npm run infra:start
- Enter to
localhost:8081/
for ajax render - Enter to
localhost:8081/api/v1/quotes
for API response
npm run infra:stop