From 42d857d26162a5881db81d0612f08126df394662 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Tue, 6 Dec 2022 09:07:41 -0500 Subject: [PATCH] meta: Add database makefile recipes Allows for generation of migrations and automatic upgrading of the database with `make make_migrations` and `make run_migrations` --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index c0c2ac7..7e92d7b 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,12 @@ init_env: upgrade_env: source .venv/bin/activate && pip3 install --upgrade -r requirements.txt txt +make_migrations: + source .venv/bin/activate && flask db migrate + +run_migrations: + source .venv/bin/activate && flask db upgrade + daemon: @echo "--- STARTING UWSGI DAEMON ---" @echo ""