1eb8dc403SDave Cobbley# -*- coding: utf-8 -*-
2eb8dc403SDave Cobbleyfrom __future__ import unicode_literals
3eb8dc403SDave Cobbley
4eb8dc403SDave Cobbleyfrom django.db import migrations, models
5eb8dc403SDave Cobbley
6eb8dc403SDave Cobbley
7eb8dc403SDave Cobbleyclass Migration(migrations.Migration):
8eb8dc403SDave Cobbley
9eb8dc403SDave Cobbley    dependencies = [
10eb8dc403SDave Cobbley        ('orm', '0001_initial'),
11eb8dc403SDave Cobbley    ]
12eb8dc403SDave Cobbley
13eb8dc403SDave Cobbley    operations = [
14eb8dc403SDave Cobbley        migrations.CreateModel(
15eb8dc403SDave Cobbley            name='BRBitbake',
16eb8dc403SDave Cobbley            fields=[
17eb8dc403SDave Cobbley                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
18eb8dc403SDave Cobbley                ('giturl', models.CharField(max_length=254)),
19eb8dc403SDave Cobbley                ('commit', models.CharField(max_length=254)),
20eb8dc403SDave Cobbley                ('dirpath', models.CharField(max_length=254)),
21eb8dc403SDave Cobbley            ],
22eb8dc403SDave Cobbley        ),
23eb8dc403SDave Cobbley        migrations.CreateModel(
24eb8dc403SDave Cobbley            name='BRError',
25eb8dc403SDave Cobbley            fields=[
26eb8dc403SDave Cobbley                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
27eb8dc403SDave Cobbley                ('errtype', models.CharField(max_length=100)),
28eb8dc403SDave Cobbley                ('errmsg', models.TextField()),
29eb8dc403SDave Cobbley                ('traceback', models.TextField()),
30eb8dc403SDave Cobbley            ],
31eb8dc403SDave Cobbley        ),
32eb8dc403SDave Cobbley        migrations.CreateModel(
33eb8dc403SDave Cobbley            name='BRLayer',
34eb8dc403SDave Cobbley            fields=[
35eb8dc403SDave Cobbley                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
36eb8dc403SDave Cobbley                ('name', models.CharField(max_length=100)),
37eb8dc403SDave Cobbley                ('giturl', models.CharField(max_length=254)),
38eb8dc403SDave Cobbley                ('commit', models.CharField(max_length=254)),
39eb8dc403SDave Cobbley                ('dirpath', models.CharField(max_length=254)),
40*82c905dcSAndrew Geissler                ('layer_version', models.ForeignKey(to='orm.Layer_Version', null=True, on_delete=models.CASCADE)),
41eb8dc403SDave Cobbley            ],
42eb8dc403SDave Cobbley        ),
43eb8dc403SDave Cobbley        migrations.CreateModel(
44eb8dc403SDave Cobbley            name='BRTarget',
45eb8dc403SDave Cobbley            fields=[
46eb8dc403SDave Cobbley                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
47eb8dc403SDave Cobbley                ('target', models.CharField(max_length=100)),
48eb8dc403SDave Cobbley                ('task', models.CharField(max_length=100, null=True)),
49eb8dc403SDave Cobbley            ],
50eb8dc403SDave Cobbley        ),
51eb8dc403SDave Cobbley        migrations.CreateModel(
52eb8dc403SDave Cobbley            name='BRVariable',
53eb8dc403SDave Cobbley            fields=[
54eb8dc403SDave Cobbley                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
55eb8dc403SDave Cobbley                ('name', models.CharField(max_length=100)),
56eb8dc403SDave Cobbley                ('value', models.TextField(blank=True)),
57eb8dc403SDave Cobbley            ],
58eb8dc403SDave Cobbley        ),
59eb8dc403SDave Cobbley        migrations.CreateModel(
60eb8dc403SDave Cobbley            name='BuildEnvironment',
61eb8dc403SDave Cobbley            fields=[
62eb8dc403SDave Cobbley                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
63eb8dc403SDave Cobbley                ('address', models.CharField(max_length=254)),
64eb8dc403SDave Cobbley                ('betype', models.IntegerField(choices=[(0, b'local'), (1, b'ssh')])),
65eb8dc403SDave Cobbley                ('bbaddress', models.CharField(max_length=254, blank=True)),
66eb8dc403SDave Cobbley                ('bbport', models.IntegerField(default=-1)),
67eb8dc403SDave Cobbley                ('bbtoken', models.CharField(max_length=126, blank=True)),
68eb8dc403SDave Cobbley                ('bbstate', models.IntegerField(default=0, choices=[(0, b'stopped'), (1, b'started')])),
69eb8dc403SDave Cobbley                ('sourcedir', models.CharField(max_length=512, blank=True)),
70eb8dc403SDave Cobbley                ('builddir', models.CharField(max_length=512, blank=True)),
71eb8dc403SDave Cobbley                ('lock', models.IntegerField(default=0, choices=[(0, b'free'), (1, b'lock'), (2, b'running')])),
72eb8dc403SDave Cobbley                ('created', models.DateTimeField(auto_now_add=True)),
73eb8dc403SDave Cobbley                ('updated', models.DateTimeField(auto_now=True)),
74eb8dc403SDave Cobbley            ],
75eb8dc403SDave Cobbley        ),
76eb8dc403SDave Cobbley        migrations.CreateModel(
77eb8dc403SDave Cobbley            name='BuildRequest',
78eb8dc403SDave Cobbley            fields=[
79eb8dc403SDave Cobbley                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
80eb8dc403SDave Cobbley                ('state', models.IntegerField(default=0, choices=[(0, b'created'), (1, b'queued'), (2, b'in progress'), (3, b'completed'), (4, b'failed'), (5, b'deleted'), (6, b'archive')])),
81eb8dc403SDave Cobbley                ('created', models.DateTimeField(auto_now_add=True)),
82eb8dc403SDave Cobbley                ('updated', models.DateTimeField(auto_now=True)),
83*82c905dcSAndrew Geissler                ('build', models.OneToOneField(null=True, to='orm.Build', on_delete=models.CASCADE)),
84*82c905dcSAndrew Geissler                ('environment', models.ForeignKey(to='bldcontrol.BuildEnvironment', null=True, on_delete=models.CASCADE)),
85*82c905dcSAndrew Geissler                ('project', models.ForeignKey(to='orm.Project', on_delete=models.CASCADE)),
86eb8dc403SDave Cobbley            ],
87eb8dc403SDave Cobbley        ),
88eb8dc403SDave Cobbley        migrations.AddField(
89eb8dc403SDave Cobbley            model_name='brvariable',
90eb8dc403SDave Cobbley            name='req',
91*82c905dcSAndrew Geissler            field=models.ForeignKey(to='bldcontrol.BuildRequest', on_delete=models.CASCADE),
92eb8dc403SDave Cobbley        ),
93eb8dc403SDave Cobbley        migrations.AddField(
94eb8dc403SDave Cobbley            model_name='brtarget',
95eb8dc403SDave Cobbley            name='req',
96*82c905dcSAndrew Geissler            field=models.ForeignKey(to='bldcontrol.BuildRequest', on_delete=models.CASCADE),
97eb8dc403SDave Cobbley        ),
98eb8dc403SDave Cobbley        migrations.AddField(
99eb8dc403SDave Cobbley            model_name='brlayer',
100eb8dc403SDave Cobbley            name='req',
101*82c905dcSAndrew Geissler            field=models.ForeignKey(to='bldcontrol.BuildRequest', on_delete=models.CASCADE),
102eb8dc403SDave Cobbley        ),
103eb8dc403SDave Cobbley        migrations.AddField(
104eb8dc403SDave Cobbley            model_name='brerror',
105eb8dc403SDave Cobbley            name='req',
106*82c905dcSAndrew Geissler            field=models.ForeignKey(to='bldcontrol.BuildRequest', on_delete=models.CASCADE),
107eb8dc403SDave Cobbley        ),
108eb8dc403SDave Cobbley        migrations.AddField(
109eb8dc403SDave Cobbley            model_name='brbitbake',
110eb8dc403SDave Cobbley            name='req',
111*82c905dcSAndrew Geissler            field=models.OneToOneField(to='bldcontrol.BuildRequest', on_delete=models.CASCADE),
112eb8dc403SDave Cobbley        ),
113eb8dc403SDave Cobbley    ]
114