2024-05-11 03:22:01 +00:00
|
|
|
# Generated by Django 4.1.13 on 2024-05-09 03:16
|
2021-06-03 06:54:41 +00:00
|
|
|
|
2024-05-11 03:22:01 +00:00
|
|
|
import json
|
|
|
|
import assets.models.asset.common
|
|
|
|
from django.db.models import F, Q
|
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
2021-06-03 06:54:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
2024-05-11 03:22:01 +00:00
|
|
|
initial = True
|
2021-06-03 06:54:41 +00:00
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
('assets', '0001_initial'),
|
2024-05-11 03:22:01 +00:00
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
2021-06-03 06:54:41 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
2024-05-11 03:22:01 +00:00
|
|
|
migrations.AddField(
|
|
|
|
model_name='favoriteasset',
|
|
|
|
name='user',
|
|
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
|
2021-06-03 06:54:41 +00:00
|
|
|
),
|
2024-05-11 03:22:01 +00:00
|
|
|
migrations.AlterUniqueTogether(
|
|
|
|
name='domain',
|
|
|
|
unique_together={('org_id', 'name')},
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='baseautomation',
|
|
|
|
name='assets',
|
|
|
|
field=models.ManyToManyField(blank=True, to='assets.asset', verbose_name='Assets'),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='baseautomation',
|
|
|
|
name='nodes',
|
|
|
|
field=models.ManyToManyField(blank=True, to='assets.node', verbose_name='Node'),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='automationexecution',
|
|
|
|
name='automation',
|
|
|
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='executions', to='assets.baseautomation', verbose_name='Automation task'),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='asset',
|
|
|
|
name='domain',
|
2024-05-13 07:28:11 +00:00
|
|
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='assets', to='assets.domain', verbose_name='Zone'),
|
2024-05-11 03:22:01 +00:00
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='asset',
|
|
|
|
name='nodes',
|
|
|
|
field=models.ManyToManyField(default=assets.models.asset.common.default_node, related_name='assets', to='assets.node', verbose_name='Nodes'),
|
2021-06-03 06:54:41 +00:00
|
|
|
),
|
2024-05-11 03:22:01 +00:00
|
|
|
migrations.AddField(
|
|
|
|
model_name='asset',
|
|
|
|
name='platform',
|
|
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='assets', to='assets.platform', verbose_name='Platform'),
|
2021-06-03 06:54:41 +00:00
|
|
|
),
|
2024-05-11 03:22:01 +00:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='AssetBaseAutomation',
|
|
|
|
fields=[
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
'verbose_name': 'Asset automation task',
|
|
|
|
'proxy': True,
|
|
|
|
'indexes': [],
|
|
|
|
'constraints': [],
|
|
|
|
},
|
|
|
|
bases=('assets.baseautomation',),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='GatherFactsAutomation',
|
|
|
|
fields=[
|
|
|
|
('baseautomation_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='assets.baseautomation')),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
'verbose_name': 'Gather asset facts',
|
|
|
|
},
|
|
|
|
bases=('assets.assetbaseautomation',),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='PingAutomation',
|
|
|
|
fields=[
|
|
|
|
('baseautomation_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='assets.baseautomation')),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
'verbose_name': 'Ping asset',
|
|
|
|
},
|
|
|
|
bases=('assets.assetbaseautomation',),
|
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
|
|
|
name='favoriteasset',
|
|
|
|
unique_together={('user', 'asset')},
|
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
|
|
|
name='baseautomation',
|
|
|
|
unique_together={('org_id', 'name', 'type')},
|
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
|
|
|
name='asset',
|
|
|
|
unique_together={('org_id', 'name')},
|
2021-06-03 06:54:41 +00:00
|
|
|
),
|
2024-05-11 03:22:01 +00:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='Gateway',
|
|
|
|
fields=[
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
'verbose_name': 'Gateway',
|
|
|
|
'proxy': True,
|
|
|
|
'indexes': [],
|
|
|
|
'constraints': [],
|
|
|
|
},
|
|
|
|
bases=('assets.host',),
|
2021-06-03 06:54:41 +00:00
|
|
|
),
|
|
|
|
]
|