Closes #14436: Add indexes for all GenericForeignKey fields (#14463)

* Closes #14436: Add PostgreSQL indexes for all GenericForeignKeys

* Add note about GFK indexes to developer docs
This commit is contained in:
Jeremy Stretch
2023-12-07 14:02:51 -05:00
committed by GitHub
parent 2d1f882724
commit b532435a6d
22 changed files with 208 additions and 15 deletions

View File

@@ -0,0 +1,25 @@
# Generated by Django 4.2.7 on 2023-12-07 16:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dcim', '0183_protect_child_interfaces'),
]
operations = [
migrations.AddIndex(
model_name='cabletermination',
index=models.Index(fields=['termination_type', 'termination_id'], name='dcim_cablet_termina_884752_idx'),
),
migrations.AddIndex(
model_name='inventoryitem',
index=models.Index(fields=['component_type', 'component_id'], name='dcim_invent_compone_0560bb_idx'),
),
migrations.AddIndex(
model_name='inventoryitemtemplate',
index=models.Index(fields=['component_type', 'component_id'], name='dcim_invent_compone_77b5f8_idx'),
),
]