Re-arrange sequence to avoid recursive make.

Nothing wrong with recursive make; it just wasn't essential
here.  `migrate` is just a build target, not a task.
This commit is contained in:
Ken Sternberg 2023-09-25 13:05:44 -07:00
parent f691c6896f
commit 7cc7484932
1 changed files with 11 additions and 3 deletions

View File

@ -218,10 +218,18 @@ ci-pending-migrations: ci--meta-debug
install: web-install website-install install: web-install website-install
poetry install poetry install
dev-reset:
.PHONY: dev-drop-db dev-create-db dev-reset
dev-drop-db:
dropdb -U $${PG_USER:-postgres} -h $${PG_HOST:-localhost} $${PG_DB:-authentik} dropdb -U $${PG_USER:-postgres} -h $${PG_HOST:-localhost} $${PG_DB:-authentik}
# Also remove the test-db if it exists # Also remove the test-db if it exists
dropdb -U $${PG_USER:-postgres} -h $${PG_HOST:-localhost} test_authentik || true dropdb -U $${PG_USER:-postgres} -h $${PG_HOST:-localhost} test_authentik || true
createdb -U $${PG_USER:-postgres} -h $${PG_HOST:-localhost} $${PG_DB:-authentik}
redis-cli -n 0 flushall redis-cli -n 0 flushall
make migrate
dev-create-db:
createdb -U $${PG_USER:-postgres} -h $${PG_HOST:-localhost} $${PG_DB:-authentik}
dev-reset: dev-drop-db dev-create-db migrate ## Drop and restore the Authentik PostgreSQL instance to a "fresh install" state.