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 $*"