Create a commented out line in /deploy/templates/local-dev.yaml forwarding port for db: ports: - 5432:5432
Create new directory called migration at root of project for all your code.
Create a simple dockerfile with node and postgres+mysql clients
Create docker compose file that will have your node image and standard mysql image.
mysql image should automatically load your sqldump file
node image should have a bind mount with all your migration code
forward postgres port from main docker compose stack to node container in migration stack
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
Make sure you have a good readme for running the migration
We need to be able to move the current year's travel requests into the new system.
Basic steps should be as follows:
/deploy/templates/local-dev.yaml
forwarding port for db:ports: - 5432:5432
migration
at root of project for all your code.node ./run.js --single=2340
ornode ./run.js --year=22024
Let me know if you have questions.