aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/migrations/0004_snapshotconfig_snapshotrelation.py
blob: 62bc7afe094825208d0e31e2e35b135fdc8317f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Generated by Django 2.1 on 2019-01-17 15:54

import api.models
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('resource_inventory', '0004_auto_20181017_1532'),
        ('api', '0003_auto_20190102_1956'),
    ]

    operations = [
        migrations.CreateModel(
            name='SnapshotConfig',
            fields=[
                ('taskconfig_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='api.TaskConfig')),
                ('image', models.IntegerField(null=True)),
                ('dashboard_id', models.IntegerField()),
                ('host', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='resource_inventory.Host')),
            ],
            bases=('api.taskconfig',),
        ),
        migrations.CreateModel(
            name='SnapshotRelation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.IntegerField(default=0)),
                ('task_id', models.CharField(default=api.models.get_task_uuid, max_length=37)),
                ('lab_token', models.CharField(default='null', max_length=50)),
                ('message', models.TextField(default='')),
                ('config', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='api.SnapshotConfig')),
                ('job', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Job')),
                ('snapshot', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resource_inventory.Image')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]