A Flask app which allows users to browse anime, track their favorites, and leave reviews.
Web app currently deployed at http://kaguya-net.herokuapp.com
python run.py
- Install Elasticsearch for website search functionality.
- Run Elasticsearch as instructed (prior to launching the web application).
If 'migrations' directory doesn't exist...
-
Initialize environment variable in project directory:
WINDOWS:
$ set FLASK_APP=run.py
LINUX:
$ export FLASK_APP=run.py
-
Run the following to create
/migrations
directory:
$ flask db init
-
Initialize environment variable like above.
-
Generate migration script. (Records database transformations).
$ flask db migrate -m "[OPTIONAL_MIGRATION_MESSAGE]"
-
Apply new changes to database:
$ flask db upgrade
-
Undo the last migration:
$ flask db downgrade
After downgrading, DELETE the migration script if the newest migration isn't as expected.
When there are structural changes to the database schema (e.g. added/removed columns or tables or relationships).