Closed symroe closed 1 year ago
Base: 89.73% // Head: 89.73% // No change to project coverage :thumbsup:
Coverage data is based on head (
906465d
) compared to base (1bdaed3
). Patch coverage: 100.00% of modified lines in pull request are covered.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Welcome to your first PR 🥳
I did think a little more about a larger change for this that I thought it might be useful to share:
Django's other cache backends don't actually implement a management command to make the database.
I think the assumption is that it can connect to the database that in turn creates the "table" that the backend needs.
I wonder if this library could ditch the createcachetable
management command in favour of making the table on the fly, and maybe implement a check that can report when using manage.py --check
.
The problem with this is that projects might break in production if the user doesn't have CreateTable
permissions, but this might be the case at the moment with the management command.
Does that mean you don't need the createcachetable
command?
Is it because it automatically creates the table in general?
Django's
createcachetable
allows passing in adatabase
arg.This is called when Django creates a test database, as per:
https://github.com/django/django/blob/4.1/django/db/backends/base/creation.py#L96
This line is hit when using pytest and pytest-django, however it might also be hit in other testing setups.
The change in this commit adds a "dummy" arg to the command that fixes this problem.