52 lines
1.8 KiB
Python
52 lines
1.8 KiB
Python
|
# Generated by Django 2.1.3 on 2018-11-25 13:45
|
||
|
|
||
|
from django.conf import settings
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='Device',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('curip', models.CharField(blank=True, max_length=15, null=True)),
|
||
|
('secret', models.CharField(max_length=128)),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Network',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('extip', models.CharField(max_length=15)),
|
||
|
('intip', models.CharField(max_length=15)),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Organization',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=300)),
|
||
|
('users', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
|
||
|
],
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='device',
|
||
|
name='network',
|
||
|
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='manager.Network'),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='device',
|
||
|
name='organization',
|
||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='manager.Organization'),
|
||
|
),
|
||
|
]
|