To autogenerate a new migration script, start the Docker container with the database and run: `flask db migrate`.
To migrate the database to a newer version manually, run: `flask db upgrade`
To migrate the database to a newer version manually, run: `flask db downgrade`
If it does nothing or fails, make sure that the environment variable FLASK_APP is set correctly (see https://flask.palletsprojects.com/en/1.1.x/cli/).
To autogenerate a new migration script:
1. Start the Docker container with the database: `docker-compose run -p 5432:5432 -d db`
2. Create a new migration: `flask db migrate`.
3. Perform a migration...
- ... to a newer version: `flask db upgrade`.
- ... to an older version: `flask db downgrade`.
- If it does nothing or fails, make sure that the environment variable FLASK_APP is set correctly (see https://flask.palletsprojects.com/en/1.1.x/cli/): `export FLASK_APP=app.py`
5. To finish the process, shut down the database container: `docker-compose down`
"""Initialize possible arguments for calls to the exercise REST API."""
# TODO: switch to other request parser, e.g. Marshmallow, because the one used by Flask-RESTful does not allow parsing arguments from different locations, e.g. one argument from 'location=args' and another argument from 'location=form'