# Generated by Django 2.2.3 on 2019-07-10 20:21

from django.db import migrations, models
import django.db.models.deletion
import ipam.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('dcim', '0073_interface_form_factor_to_type'),
    ]

    operations = [
        migrations.CreateModel(
            name='DiscoveryRequest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
                ('created', models.DateField(auto_now_add=True, null=True)),
                ('last_updated', models.DateTimeField(auto_now=True, null=True)),
                ('prefix', ipam.fields.IPNetworkField()),
                ('update_existing', models.BooleanField(default=False)),
                ('status', models.PositiveSmallIntegerField(default=1)),
                ('job', models.CharField(blank=True, max_length=50, null=True)),
                ('device_role', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='dcim.DeviceRole')),
                ('platform', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='dcim.Platform')),
                ('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='dcim.Site')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DiscoveryResult',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
                ('address', ipam.fields.IPAddressField()),
                ('status', models.PositiveSmallIntegerField(default=0)),
                ('device', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='dcim.Device')),
                ('discovery_request', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='results', to='np_autodiscovery.DiscoveryRequest')),
            ],
        ),
    ]
