mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
99 lines
4.8 KiB
Python
99 lines
4.8 KiB
Python
|
# Generated by Django 3.2.8 on 2021-10-18 16:12
|
||
|
|
||
|
import django.core.serializers.json
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
import mptt.fields
|
||
|
import taggit.managers
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('extras', '0062_clear_secrets_changelog'),
|
||
|
('contenttypes', '0002_remove_content_type_name'),
|
||
|
('tenancy', '0002_tenant_ordering'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='Contact',
|
||
|
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)),
|
||
|
('name', models.CharField(max_length=100)),
|
||
|
('title', models.CharField(blank=True, max_length=100)),
|
||
|
('phone', models.CharField(blank=True, max_length=50)),
|
||
|
('email', models.EmailField(blank=True, max_length=254)),
|
||
|
('address', models.CharField(blank=True, max_length=200)),
|
||
|
('comments', models.TextField(blank=True)),
|
||
|
],
|
||
|
options={
|
||
|
'ordering': ['name'],
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='ContactRole',
|
||
|
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)),
|
||
|
('name', models.CharField(max_length=100, unique=True)),
|
||
|
('slug', models.SlugField(max_length=100, unique=True)),
|
||
|
('description', models.CharField(blank=True, max_length=200)),
|
||
|
],
|
||
|
options={
|
||
|
'ordering': ['name'],
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='ContactGroup',
|
||
|
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)),
|
||
|
('name', models.CharField(max_length=100, unique=True)),
|
||
|
('slug', models.SlugField(max_length=100, unique=True)),
|
||
|
('description', models.CharField(blank=True, max_length=200)),
|
||
|
('lft', models.PositiveIntegerField(editable=False)),
|
||
|
('rght', models.PositiveIntegerField(editable=False)),
|
||
|
('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
|
||
|
('level', models.PositiveIntegerField(editable=False)),
|
||
|
('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='tenancy.contactgroup')),
|
||
|
],
|
||
|
options={
|
||
|
'ordering': ['name'],
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='ContactAssignment',
|
||
|
fields=[
|
||
|
('created', models.DateField(auto_now_add=True, null=True)),
|
||
|
('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
||
|
('id', models.BigAutoField(primary_key=True, serialize=False)),
|
||
|
('object_id', models.PositiveIntegerField()),
|
||
|
('priority', models.CharField(blank=True, max_length=50)),
|
||
|
('contact', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='assignments', to='tenancy.contact')),
|
||
|
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
|
||
|
('role', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='assignments', to='tenancy.contactrole')),
|
||
|
],
|
||
|
options={
|
||
|
'ordering': ('priority', 'contact'),
|
||
|
},
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='contact',
|
||
|
name='group',
|
||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='contacts', to='tenancy.contactgroup'),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='contact',
|
||
|
name='tags',
|
||
|
field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
|
||
|
),
|
||
|
]
|