0001_initial.py 11.1 KB
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
# Generated by Django 2.0.1 on 2018-01-12 18:05
Guilhem Saurel's avatar
Guilhem Saurel committed
2
3

import autoslug.fields
Guilhem Saurel's avatar
Guilhem Saurel committed
4
5
6
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
Guilhem Saurel's avatar
Guilhem Saurel committed
7
import ndh.models
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
8
9
10
11
12
13
14


class Migration(migrations.Migration):

    initial = True

    dependencies = [
Guilhem Saurel's avatar
Guilhem Saurel committed
15
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
16
17
18
    ]

    operations = [
Guilhem Saurel's avatar
Guilhem Saurel committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True)),
                ('year', models.PositiveSmallIntegerField()),
                ('url', models.URLField()),
                ('pdf', models.URLField()),
                ('authors', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
        migrations.CreateModel(
            name='Branch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=200, unique=True)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Commit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=200, unique=True)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Forge',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True)),
                ('source', models.PositiveSmallIntegerField(choices=[(1, 'github'), (2, 'gitlab'), (3, 'redmine'), (4, 'robotpkg')])),
                ('url', models.URLField()),
                ('token', models.CharField(blank=True, max_length=50, null=True)),
                ('verify', models.BooleanField(default=True)),
            ],
            options={
                'abstract': False,
            },
Guilhem Saurel's avatar
Guilhem Saurel committed
74
            bases=(ndh.models.Links, models.Model),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
75
76
77
78
79
        ),
        migrations.CreateModel(
            name='License',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
Guilhem Saurel's avatar
Guilhem Saurel committed
80
81
                ('name', models.CharField(max_length=200)),
                ('spdx_id', models.CharField(max_length=50, unique=True)),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
82
83
84
85
86
87
88
89
90
                ('url', models.URLField()),
            ],
        ),
        migrations.CreateModel(
            name='Namespace',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True)),
91
                ('group', models.BooleanField(default=False)),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=200, unique=True)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True)),
                ('private', models.BooleanField(default=False)),
                ('homepage', models.URLField(blank=True, null=True)),
Guilhem Saurel's avatar
Guilhem Saurel committed
107
                ('articles', models.ManyToManyField(to='rainboard.Article')),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
108
109
110
111
112
113
                ('license', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='rainboard.License')),
                ('main_namespace', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='rainboard.Namespace')),
            ],
            options={
                'abstract': False,
            },
Guilhem Saurel's avatar
Guilhem Saurel committed
114
            bases=(ndh.models.Links, models.Model),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
        ),
        migrations.CreateModel(
            name='Repo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=200)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name')),
                ('homepage', models.URLField(blank=True, null=True)),
                ('url', models.URLField(blank=True, null=True)),
                ('default_branch', models.CharField(max_length=50)),
                ('open_issues', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('open_pr', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('repo_id', models.PositiveIntegerField()),
Guilhem Saurel's avatar
Guilhem Saurel committed
130
                ('forked_from', models.PositiveIntegerField(blank=True, null=True)),
Guilhem Saurel's avatar
Guilhem Saurel committed
131
                ('clone_url', models.URLField(blank=True, null=True)),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
                ('forge', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Forge')),
                ('license', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='rainboard.License')),
                ('namespace', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Namespace')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Project')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Robotpkg',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True)),
                ('homepage', models.URLField(blank=True, null=True)),
                ('license', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='rainboard.License')),
                ('project', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Project')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='RobotpkgBuild',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('target', models.PositiveSmallIntegerField(choices=[(1, '12.04'), (2, '14.04'), (3, '16.04'), (4, 'dubnium')])),
                ('passed', models.BooleanField(default=False)),
                ('robotpkg', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Robotpkg')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='RobotpkgDependency',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Project')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SystemDependency',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', unique=True)),
                ('target', models.PositiveSmallIntegerField(choices=[(1, '12.04'), (2, '14.04'), (3, '16.04'), (4, 'dubnium')])),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Project')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Test',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('target', models.PositiveSmallIntegerField(choices=[(1, '12.04'), (2, '14.04'), (3, '16.04'), (4, 'dubnium')])),
                ('passed', models.BooleanField(default=False)),
                ('branch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Branch')),
                ('commit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Commit')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Project')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='commit',
            name='project',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Project'),
        ),
        migrations.AddField(
            model_name='branch',
            name='commit',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Commit'),
        ),
        migrations.AddField(
            model_name='branch',
            name='repo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Repo'),
        ),
    ]