{"id":15780450,"url":"https://github.com/ulisesgascon/poc-database-migration","last_synced_at":"2025-07-10T08:38:02.309Z","repository":{"id":72138396,"uuid":"241042330","full_name":"UlisesGascon/POC-Database-migration","owner":"UlisesGascon","description":"PoC Database migration","archived":false,"fork":false,"pushed_at":"2020-02-18T15:50:33.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T20:02:25.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UlisesGascon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-17T07:12:03.000Z","updated_at":"2020-02-18T15:50:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"70b0abe2-ab42-4f0f-b100-25738111dd44","html_url":"https://github.com/UlisesGascon/POC-Database-migration","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UlisesGascon%2FPOC-Database-migration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UlisesGascon%2FPOC-Database-migration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UlisesGascon%2FPOC-Database-migration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UlisesGascon%2FPOC-Database-migration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UlisesGascon","download_url":"https://codeload.github.com/UlisesGascon/POC-Database-migration/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246498543,"owners_count":20787338,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T18:41:36.377Z","updated_at":"2025-03-31T16:35:20.431Z","avatar_url":"https://github.com/UlisesGascon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# POC-Database-migration\nPoC Database migration\n\n## Requirements\n\n- Nodejs\n- NPM\n- Docker and Docker-compose\n\n\n## Manage a Migration\n\n1. Run environment\n\n```bash\ncd data-migration\nnpm run infra:start\n```\n\n_Note: All is dockerized. If you run `npm run infra:stop` all the containers will be removed as well the data (this is expected ;-))_\n\n2. Check the applications (optional)\n- New front: http://localhost:8080/ \n- New Api: http://localhost:8080/api/v1/quotes\n- Legacy: http://localhost:8081/quotes/\n\n_Note: No data in the database. So the quotes lists are not rendered (this is expected ;-))_\n\n\n3. Run the seed generator\n\nThis will populate the legacy database with fake data.\n\n```bash\ncd data-migration\nnpm run migration:seed\n```\n\n4. Check the applications again (optional)\n- New front (empty): http://localhost:8080/ \n- New Api (empty): http://localhost:8080/api/v1/quotes\n- Legacy (populated) : http://localhost:8081/quotes/\n\n5. Run the migration script\n\nThis will populate the new database with the legacy data (no fake).\n\n```bash\ncd data-migration\nnpm run migration:start\n```\n\nNow all the platforms (old and new) are populated\n\n6. Run the validation script\n\nThis will run a fast DB vs DB validation and a quite long e2e tests with Cypress.\n\n```bash\ncd data-migration\nnpm run migration:validation\n```\n\n_Note: Check the migration logs at `/data-migration/logs`_\n\n7. Congratulations! :tada: \n\nYou made it!\n\n## Run the platforms alone\n\nBoth platform are using seed fake data\n\n### Manage the old server project\n\n#### Start\n\n```bash\ncd old-server\nnpm run infra:build\nnpm run infra:start\n```\n\n#### Check response\n\nEnter to `localhost:8081/quotes`\n\n#### Stop\n\n```bash\nnpm run infra:stop\n```\n\n\n### Manage the new server project\n\n#### Start\n\n```bash\ncd new-server\nnpm run infra:build\nnpm run infra:start\n```\n\n#### Check response\n\n- Enter to `localhost:8081/` for ajax render\n- Enter to `localhost:8081/api/v1/quotes` for API response\n\n#### Stop\n\n```bash\nnpm run infra:stop\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulisesgascon%2Fpoc-database-migration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fulisesgascon%2Fpoc-database-migration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulisesgascon%2Fpoc-database-migration/lists"}