Lab as a Service 2.0
[laas.git] / src / booking / migrations / 0001_initial.py
1 # Generated by Django 2.1 on 2018-09-14 14:48
2
3 from django.conf import settings
4 from django.db import migrations, models
5 import django.db.models.deletion
6
7
8 class Migration(migrations.Migration):
9
10     initial = True
11
12     dependencies = [
13         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
14         ('account', '0001_initial'),
15         ('resource_inventory', '__first__'),
16     ]
17
18     operations = [
19         migrations.CreateModel(
20             name='Booking',
21             fields=[
22                 ('id', models.AutoField(primary_key=True, serialize=False)),
23                 ('start', models.DateTimeField()),
24                 ('end', models.DateTimeField()),
25                 ('reset', models.BooleanField(default=False)),
26                 ('jira_issue_id', models.IntegerField(blank=True, null=True)),
27                 ('jira_issue_status', models.CharField(blank=True, max_length=50)),
28                 ('purpose', models.CharField(max_length=300)),
29                 ('ext_count', models.IntegerField(default=2)),
30                 ('project', models.CharField(blank=True, default='', max_length=100, null=True)),
31                 ('collaborators', models.ManyToManyField(related_name='collaborators', to=settings.AUTH_USER_MODEL)),
32                 ('config_bundle', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.ConfigBundle')),
33                 ('lab', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='account.Lab')),
34                 ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='owner', to=settings.AUTH_USER_MODEL)),
35                 ('resource', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='resource_inventory.ResourceBundle')),
36             ],
37             options={
38                 'db_table': 'booking',
39             },
40         ),
41         migrations.CreateModel(
42             name='Installer',
43             fields=[
44                 ('id', models.AutoField(primary_key=True, serialize=False)),
45                 ('name', models.CharField(max_length=30)),
46             ],
47         ),
48         migrations.CreateModel(
49             name='Opsys',
50             fields=[
51                 ('id', models.AutoField(primary_key=True, serialize=False)),
52                 ('name', models.CharField(max_length=100)),
53                 ('sup_installers', models.ManyToManyField(blank=True, to='booking.Installer')),
54             ],
55         ),
56         migrations.CreateModel(
57             name='Scenario',
58             fields=[
59                 ('id', models.AutoField(primary_key=True, serialize=False)),
60                 ('name', models.CharField(max_length=300)),
61             ],
62         ),
63         migrations.AddField(
64             model_name='installer',
65             name='sup_scenarios',
66             field=models.ManyToManyField(blank=True, to='booking.Scenario'),
67         ),
68     ]