Repository navigation
Expand file tree
/
Copy path0001_initial.py
More file actions
147 lines (142 loc) · 7.55 KB
/
Copy path0001_initial.py
File metadata and controls
147 lines (142 loc) · 7.55 KB
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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Benchmark',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(unique=True, max_length=100)),
('benchmark_type', models.CharField(default='C', max_length=1, choices=[('C', 'Cross-project'), ('O', 'Own-project')])),
('description', models.CharField(max_length=300, blank=True)),
('units_title', models.CharField(default='Time', max_length=30)),
('units', models.CharField(default='seconds', max_length=20)),
('lessisbetter', models.BooleanField(default=True, verbose_name='Less is better')),
('default_on_comparison', models.BooleanField(default=True, verbose_name='Default on comparison page')),
('parent', models.ForeignKey(default=None, to='codespeed.Benchmark', on_delete=models.CASCADE, blank=True, help_text='allows to group benchmarks in hierarchies', null=True, verbose_name='parent')),
],
),
migrations.CreateModel(
name='Branch',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=20)),
],
options={
'verbose_name_plural': 'branches',
},
),
migrations.CreateModel(
name='Environment',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(unique=True, max_length=100)),
('cpu', models.CharField(max_length=100, blank=True)),
('memory', models.CharField(max_length=100, blank=True)),
('os', models.CharField(max_length=100, blank=True)),
('kernel', models.CharField(max_length=100, blank=True)),
],
),
migrations.CreateModel(
name='Executable',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=30)),
('description', models.CharField(max_length=200, blank=True)),
],
),
migrations.CreateModel(
name='Project',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(unique=True, max_length=30)),
('repo_type', models.CharField(default='N', max_length=1, verbose_name='Repository type', choices=[('N', 'none'), ('G', 'git'), ('H', 'Github.com'), ('M', 'mercurial'), ('S', 'subversion')])),
('repo_path', models.CharField(max_length=200, verbose_name='Repository URL', blank=True)),
('repo_user', models.CharField(max_length=100, verbose_name='Repository username', blank=True)),
('repo_pass', models.CharField(max_length=100, verbose_name='Repository password', blank=True)),
('commit_browsing_url', models.CharField(max_length=200, verbose_name='Commit browsing URL', blank=True)),
('track', models.BooleanField(default=True, verbose_name='Track changes')),
],
),
migrations.CreateModel(
name='Report',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('summary', models.CharField(max_length=64, blank=True)),
('colorcode', models.CharField(default='none', max_length=10)),
('_tablecache', models.TextField(blank=True)),
('environment', models.ForeignKey(related_name='reports', to='codespeed.Environment', on_delete=models.CASCADE)),
('executable', models.ForeignKey(related_name='reports', to='codespeed.Executable', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
name='Result',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('value', models.FloatField()),
('std_dev', models.FloatField(null=True, blank=True)),
('val_min', models.FloatField(null=True, blank=True)),
('val_max', models.FloatField(null=True, blank=True)),
('date', models.DateTimeField(null=True, blank=True)),
('benchmark', models.ForeignKey(related_name='results', to='codespeed.Benchmark', on_delete=models.CASCADE)),
('environment', models.ForeignKey(related_name='results', to='codespeed.Environment', on_delete=models.CASCADE)),
('executable', models.ForeignKey(related_name='results', to='codespeed.Executable', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
name='Revision',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('commitid', models.CharField(max_length=42)),
('tag', models.CharField(max_length=20, blank=True)),
('date', models.DateTimeField(null=True)),
('message', models.TextField(blank=True)),
('author', models.CharField(max_length=100, blank=True)),
('branch', models.ForeignKey(related_name='revisions', to='codespeed.Branch', on_delete=models.CASCADE)),
('project', models.ForeignKey(related_name='revisions', blank=True, to='codespeed.Project', on_delete=models.CASCADE, null=True)),
],
),
migrations.AddField(
model_name='result',
name='revision',
field=models.ForeignKey(related_name='results', to='codespeed.Revision', on_delete=models.CASCADE),
),
migrations.AddField(
model_name='report',
name='revision',
field=models.ForeignKey(related_name='reports', to='codespeed.Revision', on_delete=models.CASCADE),
),
migrations.AddField(
model_name='executable',
name='project',
field=models.ForeignKey(related_name='executables', to='codespeed.Project', on_delete=models.CASCADE),
),
migrations.AddField(
model_name='branch',
name='project',
field=models.ForeignKey(related_name='branches', to='codespeed.Project', on_delete=models.CASCADE),
),
migrations.AlterUniqueTogether(
name='revision',
unique_together=set([('commitid', 'branch')]),
),
migrations.AlterUniqueTogether(
name='result',
unique_together=set([('revision', 'executable', 'benchmark', 'environment')]),
),
migrations.AlterUniqueTogether(
name='report',
unique_together=set([('revision', 'executable', 'environment')]),
),
migrations.AlterUniqueTogether(
name='executable',
unique_together=set([('name', 'project')]),
),
migrations.AlterUniqueTogether(
name='branch',
unique_together=set([('name', 'project')]),
),
]