OperationCode / operationcode_backend

This is the backend repo for the Operation Code website
https://operationcode.org
MIT License
62 stars 110 forks source link

Add a step to check for migrations and migrate DB if needed #434

Open valeriecodes opened 5 years ago

valeriecodes commented 5 years ago

Description of changes

Adds a step to the deploy process which would run migrations on the docker container before it is published.

Note: The original issue requested a test, but I'm not sure how to write an automated test for something like a Makefile task. I also am not sure how best to test locally, beyond running the new task in isolation (which I have done)

Issue Resolved

Fixes #429

apex-omontgomery commented 5 years ago

https://github.com/OperationCode/operationcode_backend/wiki/Performing-Production-DB-Migration

Here's a wiki article I created now that our former lead has explained our previous steps, you can look for the details but it's as simple as:

  1. connect to kubectl
  2. get rails console
  3. rake db:migrate