Skip to content

UlisesGascon/POC-Database-migration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

POC-Database-migration

PoC Database migration

Requirements

  • Nodejs
  • NPM
  • Docker and Docker-compose

Manage a Migration

  1. 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 ;-))

  1. Check the applications (optional)

Note: No data in the database. So the quotes lists are not rendered (this is expected ;-))

  1. Run the seed generator

This will populate the legacy database with fake data.

cd data-migration
npm run migration:seed
  1. Check the applications again (optional)
  1. 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

  1. 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

  1. Congratulations! 🎉

You made it!

Run the platforms alone

Both platform are using seed fake data

Manage the old server project

Start

cd old-server
npm run infra:build
npm run infra:start

Check response

Enter to localhost:8081/quotes

Stop

npm run infra:stop

Manage the new server project

Start

cd new-server
npm run infra:build
npm run infra:start

Check response

  • Enter to localhost:8081/ for ajax render
  • Enter to localhost:8081/api/v1/quotes for API response

Stop

npm run infra:stop

About

PoC Database migration

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published