mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-22 19:48:45 -06:00
Reorder migrations
This commit is contained in:
@@ -145,8 +145,8 @@ class IPRangeSerializer(PrimaryModelSerializer):
|
||||
model = IPRange
|
||||
fields = [
|
||||
'id', 'url', 'display_url', 'display', 'family', 'prefix', 'start_address', 'end_address', 'size', 'vrf',
|
||||
'tenant', 'status', 'role', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created', 'last_updated',
|
||||
'mark_populated', 'mark_utilized',
|
||||
'tenant', 'status', 'role', 'description', 'owner', 'comments', 'tags', 'custom_fields', 'created',
|
||||
'last_updated', 'mark_populated', 'mark_utilized',
|
||||
]
|
||||
brief_fields = ('id', 'url', 'display', 'family', 'prefix', 'start_address', 'end_address', 'description')
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ from django.db import migrations, models
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('ipam', '0082_add_prefix_network_containment_indexes'),
|
||||
('ipam', '0086_gfk_indexes'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
@@ -95,10 +95,8 @@ def set_prefix_parent(apps, schema_editor):
|
||||
for address in addresses:
|
||||
i += 1
|
||||
prefixes = Prefix.objects.exclude(pk=address.pk).filter(
|
||||
models.Q(
|
||||
vrf=address.vrf,
|
||||
prefix__net_contains=str(address.prefix.ip)
|
||||
) | models.Q(
|
||||
models.Q(vrf=address.vrf, prefix__net_contains=str(address.prefix.ip))
|
||||
| models.Q(
|
||||
vrf=None,
|
||||
status=PrefixStatusChoices.STATUS_CONTAINER,
|
||||
prefix__net_contains=str(address.prefix.ip),
|
||||
@@ -123,7 +121,7 @@ def unset_prefix_parent(apps, schema_editor):
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('ipam', '0083_ipaddress_iprange_prefix_parent'),
|
||||
('ipam', '0087_ipaddress_iprange_prefix_parent'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
@@ -7,7 +7,7 @@ from django.db import migrations, models
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('ipam', '0084_prefix_ipam_prefix_delete_prefix_ipam_prefix_insert'),
|
||||
('ipam', '0089_prefix_ipam_prefix_delete_prefix_ipam_prefix_insert'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
@@ -8,7 +8,7 @@ from django.db import migrations
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('ipam', '0083_ipaddress_iprange_prefix_parent_data'),
|
||||
('ipam', '0088_ipaddress_iprange_prefix_parent_data'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
@@ -8,7 +8,7 @@ from django.db import migrations
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('ipam', '0085_alter_prefix_parent'),
|
||||
('ipam', '0089_alter_prefix_parent'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
@@ -369,7 +369,7 @@ class IPAddressTable(TenancyColumnsMixin, ContactsColumnMixin, PrimaryModelTable
|
||||
model = IPAddress
|
||||
fields = (
|
||||
'pk', 'id', 'address', 'vrf', 'prefix', 'status', 'role', 'tenant', 'tenant_group', 'nat_inside',
|
||||
'nat_outside', 'assigned', 'dns_name', 'description', 'comments', 'contacts','tags', 'created',
|
||||
'nat_outside', 'assigned', 'dns_name', 'description', 'comments', 'contacts', 'tags', 'created',
|
||||
'last_updated',
|
||||
)
|
||||
default_columns = (
|
||||
|
||||
Reference in New Issue
Block a user