Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration script #82

Open
spelkey-ucd opened this issue Aug 1, 2024 · 2 comments
Open

Migration script #82

spelkey-ucd opened this issue Aug 1, 2024 · 2 comments
Assignees

Comments

@spelkey-ucd
Copy link
Member

We need to be able to move the current year's travel requests into the new system.

Basic steps should be as follows:

  1. Download sqldump of existing travel database
  2. Place dump in travel GC bucket
  3. Add dump file to gitignore
  4. Create a commented out line in /deploy/templates/local-dev.yaml forwarding port for db: ports: - 5432:5432
  5. Create new directory called migration at root of project for all your code.
  6. Create a simple dockerfile with node and postgres+mysql clients
  7. Create docker compose file that will have your node image and standard mysql image.
  8. mysql image should automatically load your sqldump file
  9. node image should have a bind mount with all your migration code
  10. forward postgres port from main docker compose stack to node container in migration stack
  11. Then to run migration script, should bash into container, and migrate a single request or all for a year. e.g. node ./run.js --single=2340 or node ./run.js --year=22024
  12. Make sure you have a good readme for running the migration

Let me know if you have questions.

@spelkey-ucd
Copy link
Member Author

@sbagg I merged the pr for this issue, but am unable to find the old data in google cloud, re step 2. Please upload, so I can run the code.

@sbagg
Copy link
Collaborator

sbagg commented Oct 29, 2024

I uploaded zip file of the old data to bucket in prod folder

spelkey-ucd added a commit that referenced this issue Oct 30, 2024
spelkey-ucd added a commit that referenced this issue Oct 30, 2024
spelkey-ucd added a commit that referenced this issue Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants