-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an index to the timestamp column #364
Conversation
CHANGELOG.md
Outdated
@@ -1,10 +1,13 @@ | |||
# Changes | |||
|
|||
#### Improvements | |||
|
|||
- index added to the timestamp column |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduced a new schema for the database. I think it should be specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify what you mean when you ask for the new schema to be specified?
To my understanding, that is what I am saying here: I have added an index to the timestamp column.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a more explicit sentence could be great, something like: "feat(models): index added to LogEntry.timestamp
".
I like to see which part of the library is modified when I read changelogs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha, how about now?
Codecov Report
@@ Coverage Diff @@
## master #364 +/- ##
==========================================
+ Coverage 86.95% 87.04% +0.09%
==========================================
Files 22 23 +1
Lines 575 579 +4
==========================================
+ Hits 500 504 +4
Misses 75 75
Continue to review full report at Codecov.
|
Many queries, including the default ordering, for the LogEntry model rely on the timestamp field. Adding an index will ensure reasonable scalability for large audit logs.
@hramezani, this pull request seems to cause a new RuntimeWarning in the tests. Do you have an idea why? ..../django-auditlog/.tox/py37-django32/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1361: RuntimeWarning: DateTimeField LogEntry.timestamp received a naive datetime (2000-01-01 00:00:00) while time zone support is active. |
@alieh-rymasheuski Actually, it is because of 128555f I've prepared a PR to fix the warning. |
Many queries, including the default ordering, for the LogEntry
model rely on the timestamp field. Adding an index will ensure
reasonable scalability for large audit logs.