mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-12 04:00:02 +02:00
Add default ordering index for ipam.VLANGroup
This commit is contained in:
@@ -36,6 +36,10 @@ class Migration(migrations.Migration):
|
||||
model_name='service',
|
||||
index=models.Index(fields=['protocol', 'ports', 'id'], name='ipam_servic_protoco_687d13_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='vlangroup',
|
||||
index=models.Index(fields=['name', 'id'], name='ipam_vlangr_name_ffa83e_idx'),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name='vlan',
|
||||
index=models.Index(fields=['site', 'group', 'vid', 'id'], name='ipam_vlan_site_id_985573_idx'),
|
||||
|
||||
@@ -76,6 +76,7 @@ class VLANGroup(OrganizationalModel):
|
||||
class Meta:
|
||||
ordering = ('name', 'pk') # Name may be non-unique
|
||||
indexes = (
|
||||
models.Index(fields=('name', 'id')), # Default ordering
|
||||
models.Index(fields=('scope_type', 'scope_id')),
|
||||
)
|
||||
constraints = (
|
||||
|
||||
Reference in New Issue
Block a user