Lab as a Service 2.0
[laas.git] / src / account / migrations / 0001_initial.py
1 # Generated by Django 2.1 on 2018-09-14 14:48
2
3 import account.models
4 from django.conf import settings
5 from django.db import migrations, models
6 import django.db.models.deletion
7
8
9 class Migration(migrations.Migration):
10
11     initial = True
12
13     dependencies = [
14         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
15     ]
16
17     operations = [
18         migrations.CreateModel(
19             name='Lab',
20             fields=[
21                 ('name', models.CharField(max_length=200, primary_key=True, serialize=False, unique=True)),
22                 ('contact_email', models.EmailField(blank=True, max_length=200, null=True)),
23                 ('contact_phone', models.CharField(blank=True, max_length=20, null=True)),
24                 ('status', models.IntegerField(default=0)),
25                 ('location', models.TextField(default='unknown')),
26                 ('api_token', models.CharField(max_length=50)),
27                 ('lab_user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
28             ],
29         ),
30         migrations.CreateModel(
31             name='UserProfile',
32             fields=[
33                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
34                 ('timezone', models.CharField(default='UTC', max_length=100)),
35                 ('ssh_public_key', models.FileField(blank=True, null=True, upload_to=account.models.upload_to)),
36                 ('pgp_public_key', models.FileField(blank=True, null=True, upload_to=account.models.upload_to)),
37                 ('email_addr', models.CharField(default='email@mail.com', max_length=300)),
38                 ('company', models.CharField(max_length=200)),
39                 ('oauth_token', models.CharField(max_length=1024)),
40                 ('oauth_secret', models.CharField(max_length=1024)),
41                 ('jira_url', models.CharField(default='', max_length=100)),
42                 ('full_name', models.CharField(default='', max_length=100)),
43                 ('booking_privledge', models.BooleanField(default=False)),
44                 ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
45             ],
46             options={
47                 'db_table': 'user_profile',
48             },
49         ),
50         migrations.CreateModel(
51             name='VlanManager',
52             fields=[
53                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
54                 ('vlans', models.TextField()),
55                 ('block_size', models.IntegerField()),
56                 ('allow_overlapping', models.BooleanField()),
57                 ('reserved_vlans', models.TextField()),
58             ],
59         ),
60         migrations.AddField(
61             model_name='lab',
62             name='vlan_manager',
63             field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='account.VlanManager'),
64         ),
65     ]