69 lines
3.7 KiB
Python
69 lines
3.7 KiB
Python
# Generated by Django 3.2.8 on 2021-12-17 10:11
|
|
|
|
import django.core.serializers.json
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import taggit.managers
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('virtualization', '0023_virtualmachine_natural_ordering'),
|
|
('extras', '0062_clear_secrets_changelog'),
|
|
('dcim', '0133_port_colors'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='SoftwareProduct',
|
|
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=128)),
|
|
('description', models.CharField(blank=True, max_length=255, null=True)),
|
|
('manufacturer', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='software_products', to='dcim.manufacturer')),
|
|
('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
|
|
],
|
|
options={
|
|
'abstract': False,
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='SoftwareProductVersion',
|
|
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=64)),
|
|
('software_product', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='softwareproduct_versions', to='netbox_slm.softwareproduct')),
|
|
('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
|
|
],
|
|
options={
|
|
'abstract': False,
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='SoftwareProductInstallation',
|
|
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)),
|
|
('device', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='softwareproduct_installations', to='dcim.device')),
|
|
('software_product', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='software_products', to='netbox_slm.softwareproduct')),
|
|
('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
|
|
('version', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='softwareproduct_versions', to='netbox_slm.softwareproductversion')),
|
|
('virtualmachine', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='softwareproduct_installations', to='virtualization.virtualmachine')),
|
|
],
|
|
options={
|
|
'abstract': False,
|
|
},
|
|
),
|
|
]
|