From ad46991717cbe90f70e036130acd4a0b377214ae Mon Sep 17 00:00:00 2001 From: dhruv-goyal-10 Date: Sat, 29 Jun 2024 14:20:58 +0530 Subject: [PATCH] feat: added additional shortcuts to the makefile fixes #2208. --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 37bae1c950..549d86d8b7 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: build, re-build, up, down, list, logs, test, makemigrations +.PHONY: build, re-build, up, down, list, logs, test, makemigrations, reset_db DOCKER_VERSION := $(shell docker --version 2>/dev/null) @@ -47,3 +47,10 @@ test-coverage: docker compose exec backend bash -c "coverage run manage.py test --settings=config.settings.test --keepdb --parallel --shuffle" docker compose exec backend bash -c "coverage combine || true; coverage xml" docker compose cp backend:/app/coverage.xml coverage.xml + +reset_db: + docker compose exec backend bash -c "python manage.py reset_db --noinput" + docker compose exec backend bash -c "python manage.py migrate" + +%: + docker compose exec backend bash -c "python manage.py $*"