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