mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #11519: Add a SQL index for IPAddress host value
This commit is contained in:
20
netbox/ipam/migrations/0067_ipaddress_index_host.py
Normal file
20
netbox/ipam/migrations/0067_ipaddress_index_host.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# Generated by Django 4.1.10 on 2023-08-02 12:43
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.functions.comparison
|
||||
import ipam.fields
|
||||
import ipam.lookups
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('ipam', '0066_iprange_mark_utilized'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddIndex(
|
||||
model_name='ipaddress',
|
||||
index=models.Index(django.db.models.functions.comparison.Cast(ipam.lookups.Host('address'), output_field=ipam.fields.IPAddressField()), name='ipam_ipaddress_host'),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user