Quiz
78 строк · 2.5 Кб
1# Generated by Django 4.1.7 on 2023-03-18 18:55
2
3from django.conf import settings
4from django.db import migrations, models
5import django.db.models.deletion
6
7
8class Migration(migrations.Migration):
9
10dependencies = [
11("questions", "0002_question_rating_delete_remark"),
12("authapp", "0004_authuser_avatar"),
13]
14
15operations = [
16migrations.CreateModel(
17name="Remark",
18fields=[
19(
20"id",
21models.BigAutoField(
22auto_created=True,
23primary_key=True,
24serialize=False,
25verbose_name="ID",
26),
27),
28("text", models.CharField(max_length=128, verbose_name="Замечание")),
29("rating", models.IntegerField(default=0, verbose_name="Очки")),
30(
31"author",
32models.ForeignKey(
33on_delete=django.db.models.deletion.CASCADE,
34to=settings.AUTH_USER_MODEL,
35verbose_name="Пользователь",
36),
37),
38(
39"question",
40models.ForeignKey(
41on_delete=django.db.models.deletion.CASCADE,
42to="questions.question",
43verbose_name="Вопрос",
44),
45),
46],
47),
48migrations.CreateModel(
49name="QuestionRatedByUser",
50fields=[
51(
52"id",
53models.BigAutoField(
54auto_created=True,
55primary_key=True,
56serialize=False,
57verbose_name="ID",
58),
59),
60(
61"question",
62models.ForeignKey(
63on_delete=django.db.models.deletion.CASCADE,
64to="questions.question",
65verbose_name="Вопрос",
66),
67),
68(
69"user",
70models.ForeignKey(
71on_delete=django.db.models.deletion.CASCADE,
72to=settings.AUTH_USER_MODEL,
73verbose_name="Пользователь",
74),
75),
76],
77),
78]
79