0001_initial.py 13.4 KB
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
# Generated by Django 2.0.1 on 2018-02-06 18:47
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
Guilhem Saurel committed
8
import rainboard.utils
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
9
10
11
12
13
14
15


class Migration(migrations.Migration):

    initial = True

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

    operations = [
Guilhem Saurel's avatar
Guilhem Saurel committed
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
        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
35
36
37
38
39
        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)),
Guilhem Saurel's avatar
Guilhem Saurel committed
40
41
42
43
44
45
46
47
48
49
50
51
52
53
                ('name', models.CharField(max_length=200)),
                ('ahead', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('behind', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('updated', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='CIBuild',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('passed', models.NullBooleanField()),
                ('build_id', models.PositiveIntegerField()),
                ('started', models.DateTimeField()),
                ('branch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Branch')),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
54
55
            ],
            options={
Guilhem Saurel's avatar
Guilhem Saurel committed
56
                'ordering': ('started',),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
            },
        ),
        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)),
            ],
        ),
        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)),
Guilhem Saurel's avatar
Guilhem Saurel committed
75
                ('source', models.PositiveSmallIntegerField(choices=[(1, 'github'), (2, 'gitlab'), (3, 'redmine'), (4, 'robotpkg'), (5, 'travis')])),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
76
77
78
79
80
81
82
                ('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
83
            bases=(ndh.models.Links, models.Model),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
84
85
86
87
88
        ),
        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
89
90
                ('name', models.CharField(max_length=200)),
                ('spdx_id', models.CharField(max_length=50, unique=True)),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
91
92
93
94
95
96
97
98
99
                ('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)),
100
                ('group', models.BooleanField(default=False)),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
101
102
103
104
105
106
107
108
109
110
111
112
113
114
            ],
            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)),
                ('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
115
116
117
                ('description', models.TextField()),
                ('version', models.CharField(blank=True, max_length=20, null=True)),
                ('updated', models.DateTimeField(blank=True, null=True)),
Guilhem Saurel's avatar
Guilhem Saurel committed
118
                ('articles', models.ManyToManyField(to='rainboard.Article')),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
119
                ('license', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='rainboard.License')),
Guilhem Saurel's avatar
Guilhem Saurel committed
120
                ('main_forge', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='rainboard.Forge')),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
121
122
123
124
125
                ('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
126
            bases=(ndh.models.Links, models.Model),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
127
128
129
130
131
132
133
134
        ),
        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)),
Guilhem Saurel's avatar
Guilhem Saurel committed
135
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', slugify=rainboard.utils.slugify_with_dots)),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
136
137
138
139
140
141
                ('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
142
                ('forked_from', models.PositiveIntegerField(blank=True, null=True)),
Guilhem Saurel's avatar
Guilhem Saurel committed
143
                ('clone_url', models.URLField(blank=True, null=True)),
Guilhem Saurel's avatar
Guilhem Saurel committed
144
                ('travis_id', models.PositiveIntegerField(blank=True, null=True)),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
                ('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)),
Guilhem Saurel's avatar
Guilhem Saurel committed
160
161
162
163
164
165
166
167
168
169
170
                ('category', models.CharField(max_length=50)),
                ('pkgbase', models.CharField(default='', max_length=50)),
                ('pkgversion', models.CharField(default='', max_length=20)),
                ('master_sites', models.CharField(default='', max_length=200)),
                ('master_repository', models.CharField(default='', max_length=200)),
                ('maintainer', models.CharField(default='', max_length=200)),
                ('comment', models.TextField()),
                ('homepage', models.URLField(default='')),
                ('private', models.BooleanField(default=False)),
                ('description', models.TextField()),
                ('updated', models.DateTimeField(blank=True, null=True)),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
171
                ('license', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='rainboard.License')),
Guilhem Saurel's avatar
Guilhem Saurel committed
172
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Project')),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
173
174
175
176
177
178
179
180
181
182
183
            ],
            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)),
Guilhem Saurel's avatar
Guilhem Saurel committed
184
                ('target', models.PositiveSmallIntegerField(choices=[(1, '14.04'), (2, '16.04'), (3, '17.10'), (4, '18.04'), (5, 'dubnium')])),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
185
186
187
188
189
190
191
192
                ('passed', models.BooleanField(default=False)),
                ('robotpkg', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Robotpkg')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
Guilhem Saurel's avatar
Guilhem Saurel committed
193
            name='SystemDependency',
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
194
195
196
197
            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)),
Guilhem Saurel's avatar
Guilhem Saurel committed
198
                ('target', models.PositiveSmallIntegerField(choices=[(1, '14.04'), (2, '16.04'), (3, '17.10'), (4, '18.04'), (5, 'dubnium')])),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
199
200
201
202
203
204
205
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Project')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
Guilhem Saurel's avatar
Guilhem Saurel committed
206
            name='Tag',
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
207
208
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
Guilhem Saurel's avatar
Guilhem Saurel committed
209
210
                ('name', models.CharField(max_length=200)),
                ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name', slugify=rainboard.utils.slugify_with_dots)),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
211
212
213
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Project')),
            ],
            options={
Guilhem Saurel's avatar
Guilhem Saurel committed
214
                'ordering': ('name',),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
215
216
217
218
219
220
221
222
            },
        ),
        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)),
Guilhem Saurel's avatar
Guilhem Saurel committed
223
                ('target', models.PositiveSmallIntegerField(choices=[(1, '14.04'), (2, '16.04'), (3, '17.10'), (4, '18.04'), (5, 'dubnium')])),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
224
225
226
227
228
229
230
231
232
233
234
235
236
237
                ('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'),
        ),
Guilhem Saurel's avatar
Guilhem Saurel committed
238
239
240
241
242
        migrations.AddField(
            model_name='cibuild',
            name='repo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Repo'),
        ),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
243
244
        migrations.AddField(
            model_name='branch',
Guilhem Saurel's avatar
Guilhem Saurel committed
245
246
            name='project',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rainboard.Project'),
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
247
248
249
250
        ),
        migrations.AddField(
            model_name='branch',
            name='repo',
Guilhem Saurel's avatar
Guilhem Saurel committed
251
252
253
254
255
256
257
258
259
260
261
262
263
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='rainboard.Repo'),
        ),
        migrations.AlterUniqueTogether(
            name='tag',
            unique_together={('name', 'project')},
        ),
        migrations.AlterUniqueTogether(
            name='commit',
            unique_together={('project', 'name')},
        ),
        migrations.AlterUniqueTogether(
            name='branch',
            unique_together={('project', 'name')},
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
264
265
        ),
    ]