mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Initial work on #6732
This commit is contained in:
parent
a01068949c
commit
8b529abfe1
18
netbox/dcim/migrations/0138_remove_site_asn.py
Normal file
18
netbox/dcim/migrations/0138_remove_site_asn.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 3.2.8 on 2021-10-25 04:33
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('dcim', '0137_relax_uniqueness_constraints'),
|
||||||
|
('ipam', '0051_asn_model')
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='site',
|
||||||
|
name='asn',
|
||||||
|
),
|
||||||
|
]
|
40
netbox/ipam/migrations/0051_asn_model.py
Normal file
40
netbox/ipam/migrations/0051_asn_model.py
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# Generated by Django 3.2.8 on 2021-10-25 04:34
|
||||||
|
|
||||||
|
import dcim.fields
|
||||||
|
import django.core.serializers.json
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
import taggit.managers
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('extras', '0062_clear_secrets_changelog'),
|
||||||
|
('tenancy', '0003_contacts'),
|
||||||
|
('dcim', '0137_relax_uniqueness_constraints'),
|
||||||
|
('ipam', '0050_iprange'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='ASN',
|
||||||
|
fields=[
|
||||||
|
('created', models.DateField(auto_now_add=True, null=True)),
|
||||||
|
('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
||||||
|
('custom_field_data', models.JSONField(blank=True, default=dict, encoder=django.core.serializers.json.DjangoJSONEncoder)),
|
||||||
|
('id', models.BigAutoField(primary_key=True, serialize=False)),
|
||||||
|
('asn', dcim.fields.ASNField(blank=True, null=True)),
|
||||||
|
('description', models.CharField(blank=True, max_length=200)),
|
||||||
|
('rir', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='asns', to='ipam.rir')),
|
||||||
|
('sites', models.ManyToManyField(blank=True, related_name='asns', to='dcim.Site')),
|
||||||
|
('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
|
||||||
|
('tenant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='asns', to='tenancy.tenant')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'ASN',
|
||||||
|
'verbose_name_plural': 'ASNs',
|
||||||
|
'ordering': ['asn'],
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user