1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #3392: Add database index for ObjectChange time

This commit is contained in:
Jeremy Stretch
2019-08-28 10:48:19 -04:00
parent 3078e366e2
commit 5a911aa5a1
3 changed files with 21 additions and 1 deletions

View File

@ -2,6 +2,7 @@ v2.6.3 (FUTURE)
## Bug Fixes ## Bug Fixes
* [#3392](https://github.com/netbox-community/netbox/issues/3392) - Add database index for ObjectChange time
* [#3420](https://github.com/netbox-community/netbox/issues/3420) - Serial number filter for racks, devices, and inventory items is now case-insensitive * [#3420](https://github.com/netbox-community/netbox/issues/3420) - Serial number filter for racks, devices, and inventory items is now case-insensitive
* [#3428](https://github.com/netbox-community/netbox/issues/3428) - Fixed cache invalidation issues ([#3300](https://github.com/netbox-community/netbox/issues/3300), [#3363](https://github.com/netbox-community/netbox/issues/3363), [#3379](https://github.com/netbox-community/netbox/issues/3379), [#3382](https://github.com/netbox-community/netbox/issues/3382)) by switching to `prefetch_related()` instead of `select_related()` and removing use of `update()` * [#3428](https://github.com/netbox-community/netbox/issues/3428) - Fixed cache invalidation issues ([#3300](https://github.com/netbox-community/netbox/issues/3300), [#3363](https://github.com/netbox-community/netbox/issues/3363), [#3379](https://github.com/netbox-community/netbox/issues/3379), [#3382](https://github.com/netbox-community/netbox/issues/3382)) by switching to `prefetch_related()` instead of `select_related()` and removing use of `update()`
* [#3421](https://github.com/netbox-community/netbox/issues/3421) - Fix exception when ordering power connections list by PDU * [#3421](https://github.com/netbox-community/netbox/issues/3421) - Fix exception when ordering power connections list by PDU

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2 on 2019-08-28 14:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0024_scripts'),
]
operations = [
migrations.AlterField(
model_name='objectchange',
name='time',
field=models.DateTimeField(auto_now_add=True, db_index=True),
),
]

View File

@ -882,7 +882,8 @@ class ObjectChange(models.Model):
""" """
time = models.DateTimeField( time = models.DateTimeField(
auto_now_add=True, auto_now_add=True,
editable=False editable=False,
db_index=True
) )
user = models.ForeignKey( user = models.ForeignKey(
to=User, to=User,