<filename>netbox/virtualization/migrations/0015_vminterface.py
# Generated by Django 3.0.6 on 2020-06-18 20:21

import dcim.fields
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import taggit.managers
import utilities.fields
import utilities.ordering
import utilities.query_functions


class Migration(migrations.Migration):

    dependencies = [
        ('ipam', '0036_standardize_description'),
        ('extras', '0042_customfield_manager'),
        ('virtualization', '0014_standardize_description'),
    ]

    operations = [
        migrations.CreateModel(
            name='VMInterface',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=64)),
                ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize_interface)),
                ('enabled', models.BooleanField(default=True)),
                ('mac_address', dcim.fields.MACAddressField(blank=True, null=True)),
                ('mtu', models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(65536)])),
                ('mode', models.CharField(blank=True, max_length=50)),
                ('description', models.CharField(blank=True, max_length=200)),
                ('tagged_vlans', models.ManyToManyField(blank=True, related_name='vminterfaces_as_tagged', to='ipam.VLAN')),
                ('tags', taggit.managers.TaggableManager(related_name='vminterface', through='extras.TaggedItem', to='extras.Tag')),
                ('untagged_vlan', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vminterfaces_as_untagged', to='ipam.VLAN')),
                ('virtual_machine', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='interfaces', to='virtualization.VirtualMachine')),
            ],
            options={
                'ordering': ('virtual_machine', utilities.query_functions.CollateAsChar('_name')),
                'unique_together': {('virtual_machine', 'name')},
                'verbose_name': 'interface',
            },
        ),
    ]

<filename>netbox/virtualization/migrations/0015_vminterface.py
# Generated by Django 3.0.6 on 2020-06-18 20:21

import dcim.fields
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import taggit.managers
import utilities.fields
import utilities.ordering
import utilities.query_functions


class Migration(migrations.Migration):

    dependencies = [
        ('ipam', '0036_standardize_description'),
        ('extras', '0042_customfield_manager'),
        ('virtualization', '0014_standardize_description'),
    ]

    operations = [
        migrations.CreateModel(
            name='VMInterface',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=64)),
                ('_name', utilities.fields.NaturalOrderingField('name', blank=True, max_length=100, naturalize_function=utilities.ordering.naturalize_interface)),
                ('enabled', models.BooleanField(default=True)),
                ('mac_address', dcim.fields.MACAddressField(blank=True, null=True)),
                ('mtu', models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(65536)])),
                ('mode', models.CharField(blank=True, max_length=50)),
                ('description', models.CharField(blank=True, max_length=200)),
                ('tagged_vlans', models.ManyToManyField(blank=True, related_name='vminterfaces_as_tagged', to='ipam.VLAN')),
                ('tags', taggit.managers.TaggableManager(related_name='vminterface', through='extras.TaggedItem', to='extras.Tag')),
                ('untagged_vlan', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vminterfaces_as_untagged', to='ipam.VLAN')),
                ('virtual_machine', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='interfaces', to='virtualization.VirtualMachine')),
            ],
            options={
                'ordering': ('virtual_machine', utilities.query_functions.CollateAsChar('_name')),
                'unique_together': {('virtual_machine', 'name')},
                'verbose_name': 'interface',
            },
        ),
    ]

# Generated by Django 3.0.6 on 2020-06-18 20:21