Files
Holger Sielaff 90c0ff61ed initial
2025-08-27 09:55:55 +02:00

49 lines
2.5 KiB
Python

# Generated by Django 5.2.4 on 2025-07-07 11:19
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('mikrotik', '0001_initial'),
('proxmox', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='CloneContainer',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(help_text='Will be used as hostname', max_length=150)),
('cpus', models.IntegerField(default=1)),
('memory', models.IntegerField(default=1024)),
('disksize', models.IntegerField(default=10, help_text='in GB')),
('as_regexp', models.BooleanField(choices=[(False, 'No'), (True, 'Yes')], default=True, help_text='Add a ".*<hostname>" instead of a hostname')),
('is_active', models.BooleanField(choices=[(False, 'No'), (True, 'Yes')], default=False)),
('status', models.CharField(blank=True, choices=[('pending', 'Pending'), ('running', 'Running'), ('success', 'Success'), ('error', 'Error')], default='pending', max_length=150, null=True)),
('network', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='clone_network', to='mikrotik.ipaddress')),
('template', models.ForeignKey(null=True, on_delete=django.db.models.deletion.RESTRICT, related_name='clone_template', to='proxmox.lxctemplate')),
('vm', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='clone_lxc', to='proxmox.lxc')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='DevContainer',
fields=[
('internal_id', models.BigAutoField(primary_key=True, serialize=False)),
('dns', models.OneToOneField(on_delete=django.db.models.deletion.RESTRICT, related_name='devcontainer_dns', to='mikrotik.dnsstatic')),
('lease', models.OneToOneField(on_delete=django.db.models.deletion.RESTRICT, related_name='devcontainer_lease', to='mikrotik.ipdhcplease')),
('lxc', models.OneToOneField(on_delete=django.db.models.deletion.RESTRICT, related_name='devcontainer_lxc', to='proxmox.lxc')),
],
options={
'abstract': False,
},
),
]