From 7cc74849322de637a03eb38288004037063526e3 Mon Sep 17 00:00:00 2001 From: Ken Sternberg Date: Mon, 25 Sep 2023 13:05:44 -0700 Subject: [PATCH] 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. --- Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 45e46e5a1..9c4079134 100644 --- a/Makefile +++ b/Makefile @@ -218,10 +218,18 @@ ci-pending-migrations: ci--meta-debug install: web-install website-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} # Also remove the test-db if it exists 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 - 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.