Open skks1212 opened 1 month ago
@skks1212 I think so the following code, covers the changes you suggested.
Commands like migrate, shell_plus & dbshell are covered under wildcard command. reset_test_db is covered separately.
# Reset the test database and apply migrations
reset_test_db:
docker compose exec backend bash -c "python manage.py reset_db --noinput"
docker compose exec backend bash -c "python manage.py migrate"
# Wildcard command to run any Django management command
%:
docker compose exec backend bash -c "python manage.py $*"
@dhruv-goyal-10 would flags and additional data be passed down? For example make migrate facility 0001
should convert to python manage.py migrate facility 0001
@skks1212 Yep, it will be passed down if the entire command is passed as string.
In your case, make "migrate facility 0001"
will work same as running python manage.py migrate facility 0001
.
@dhruv-goyal-10 Thats nice, should I assign you to this issue?
@skks1212 Yep, you can assign me this issue.
Is your feature request related to a problem? Please describe. Currently the
Makefile
only contains a limited number of commands. Commands likemake migrate
that are essential while development are not present.Describe the solution you'd like
If possible, a wildcard () command that would run `docker compose exec backend bash -c "python manage.py "
Other complex commands like
make testand
make test-coverage` can be kept the same as removing them for wildcards does not make sense.Additional
shell_plus
,db_shell
, andreset_test_db
and commands