|
|
@ -67,7 +67,7 @@ http GET http://localhost:5000/api/users/1 "Authorization:Bearer <token>" |
|
|
|
# The Database |
|
|
|
|
|
|
|
## Workflow for updating database (new table/field/etc) |
|
|
|
1. Export the flask app: `export FLASK_APP=stockpyle.py` |
|
|
|
1. Export the flask app: `export FLASK_APP=run.py` |
|
|
|
2. Create/modify class for table in `app/models.py` |
|
|
|
3. Create migration script: `flask db migrate -m "<class/table> table"` |
|
|
|
4. Commit migration script to repo (for upgrading other environments) |
|
|
|