-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path0009_auto_20210201_2224.py
More file actions
80 lines (75 loc) · 2.88 KB
/
0009_auto_20210201_2224.py
File metadata and controls
80 lines (75 loc) · 2.88 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
# Generated by Django 3.1.2 on 2021-02-02 03:24
import django.core.validators
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("ohq", "0008_auto_20210119_2218"),
]
operations = [
migrations.CreateModel(
name="QueueStatistic",
fields=[
(
"id",
models.AutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
(
"metric",
models.CharField(
choices=[
("HEATMAP_AVG_WAIT", "Average wait-time heatmap"),
("HEATMAP_QUESTIONS_PER_TA", "Questions per TA heatmap"),
("AVG_WAIT", "Average wait-time"),
("NUM_ANSWERED", "Number of questions answered per week"),
("STUDENTS_HELPED", "Students helped per week"),
("AVG_TIME_HELPING", "Average time helping students"),
("LIST_WAIT_TIME_DAYS", "List of wait times per day"),
],
max_length=256,
),
),
("value", models.DecimalField(decimal_places=8, max_digits=16)),
(
"day",
models.IntegerField(
blank=True,
choices=[
(1, "Sunday"),
(2, "Monday"),
(3, "Tuesday"),
(4, "Wednesday"),
(5, "Thursday"),
(6, "Friday"),
(7, "Saturday"),
],
null=True,
),
),
(
"hour",
models.IntegerField(
blank=True,
null=True,
validators=[
django.core.validators.MinValueValidator(0),
django.core.validators.MaxValueValidator(23),
],
),
),
("date", models.DateField(blank=True, null=True)),
(
"queue",
models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="ohq.queue"),
),
],
),
migrations.AddConstraint(
model_name="queuestatistic",
constraint=models.UniqueConstraint(
fields=("queue", "metric", "day", "hour", "date"), name="unique_statistic"
),
),
]