Skip to content

jason-cls/project-himawari

Repository files navigation

Project-Himawari

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

How to run kaguya locally:

python run.py

External Prerequisites:

  1. Install Elasticsearch for website search functionality.
  2. Run Elasticsearch as instructed (prior to launching the web application).

How to initialize database migrations:

If 'migrations' directory doesn't exist...

  1. Initialize environment variable in project directory:

    WINDOWS:

    $ set FLASK_APP=run.py

    LINUX:

    $ export FLASK_APP=run.py
  2. Run the following to create /migrations directory:

$ flask db init

How to use database migrations:

  1. Initialize environment variable like above.

  2. Generate migration script. (Records database transformations).

    $ flask db migrate -m "[OPTIONAL_MIGRATION_MESSAGE]"
  3. Apply new changes to database:

    $ flask db upgrade
  4. Undo the last migration:

    $ flask db downgrade

    After downgrading, DELETE the migration script if the newest migration isn't as expected.

When to use database migrations:

When there are structural changes to the database schema (e.g. added/removed columns or tables or relationships).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published