mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-19 01:58:43 -06:00
* Closes #18191: Remove redundant SQL indexes * Update developer documentation * Add a system check for duplicate indexes
This commit is contained in:
17
netbox/dcim/migrations/0207_remove_redundant_indexes.py
Normal file
17
netbox/dcim/migrations/0207_remove_redundant_indexes.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 5.2b1 on 2025-04-03 18:32
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('dcim', '0206_load_module_type_profiles'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveIndex(
|
||||
model_name='cabletermination',
|
||||
name='dcim_cablet_termina_884752_idx',
|
||||
),
|
||||
]
|
||||
@@ -299,9 +299,6 @@ class CableTermination(ChangeLoggedModel):
|
||||
|
||||
class Meta:
|
||||
ordering = ('cable', 'cable_end', 'pk')
|
||||
indexes = (
|
||||
models.Index(fields=('termination_type', 'termination_id')),
|
||||
)
|
||||
constraints = (
|
||||
models.UniqueConstraint(
|
||||
fields=('termination_type', 'termination_id'),
|
||||
|
||||
Reference in New Issue
Block a user