Daniel Sheppard 4 лет назад
Родитель
Сommit
fff124ebb1
2 измененных файлов с 2 добавлено и 21 удалено
  1. 2 2
      netbox/ipam/migrations/0052_asn_model.py
  2. 0 19
      netbox/ipam/migrations/0052_unique_asn.py

+ 2 - 2
netbox/ipam/migrations/0051_asn_model.py → netbox/ipam/migrations/0052_asn_model.py

@@ -13,7 +13,7 @@ class Migration(migrations.Migration):
         ('extras', '0062_clear_secrets_changelog'),
         ('extras', '0062_clear_secrets_changelog'),
         ('tenancy', '0003_contacts'),
         ('tenancy', '0003_contacts'),
         ('dcim', '0137_relax_uniqueness_constraints'),
         ('dcim', '0137_relax_uniqueness_constraints'),
-        ('ipam', '0050_iprange'),
+        ('ipam', '0051_extend_tag_support'),
     ]
     ]
 
 
     operations = [
     operations = [
@@ -24,7 +24,7 @@ class Migration(migrations.Migration):
                 ('last_updated', models.DateTimeField(auto_now=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)),
                 ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=django.core.serializers.json.DjangoJSONEncoder)),
                 ('id', models.BigAutoField(primary_key=True, serialize=False)),
                 ('id', models.BigAutoField(primary_key=True, serialize=False)),
-                ('asn', dcim.fields.ASNField(blank=True, null=True)),
+                ('asn', dcim.fields.ASNField(blank=True, null=True, unique=True)),
                 ('description', models.CharField(blank=True, max_length=200)),
                 ('description', models.CharField(blank=True, max_length=200)),
                 ('rir', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='asns', to='ipam.rir')),
                 ('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')),
                 ('sites', models.ManyToManyField(blank=True, related_name='asns', to='dcim.Site')),

+ 0 - 19
netbox/ipam/migrations/0052_unique_asn.py

@@ -1,19 +0,0 @@
-# Generated by Django 3.2.8 on 2021-10-28 15:03
-
-import dcim.fields
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        ('ipam', '0051_asn_model'),
-    ]
-
-    operations = [
-        migrations.AlterField(
-            model_name='asn',
-            name='asn',
-            field=dcim.fields.ASNField(blank=True, null=True, unique=True),
-        ),
-    ]