Add a makefile.
[koed-quiz.git] / apps / quiz / migrations / 0001_initial.py
1 from django.db import models, migrations
2
3
4 class Migration(migrations.Migration):
5
6     dependencies = [
7         ('sites', '0001_initial'),
8     ]
9
10     operations = [
11         migrations.CreateModel(
12             name='Answer',
13             fields=[
14                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
15                 ('title', models.CharField(max_length=255)),
16                 ('ordering', models.SmallIntegerField()),
17             ],
18             options={
19                 'ordering': ['question', 'ordering'],
20                 'verbose_name': 'answer',
21                 'verbose_name_plural': 'answers',
22             },
23             bases=(models.Model,),
24         ),
25         migrations.CreateModel(
26             name='Question',
27             fields=[
28                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
29                 ('slug', models.SlugField()),
30                 ('ordering', models.SmallIntegerField()),
31                 ('title', models.CharField(max_length=255)),
32                 ('text', models.TextField(null=True, blank=True)),
33                 ('description', models.TextField(null=True, blank=True)),
34             ],
35             options={
36                 'ordering': ['quiz', 'ordering'],
37                 'verbose_name': 'question',
38                 'verbose_name_plural': 'questions',
39             },
40             bases=(models.Model,),
41         ),
42         migrations.CreateModel(
43             name='Quiz',
44             fields=[
45                 ('site_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='sites.Site', on_delete=models.CASCADE)),
46                 ('description', models.TextField()),
47                 ('footer', models.TextField(null=True, blank=True)),
48             ],
49             options={
50                 'verbose_name': 'quiz',
51                 'verbose_name_plural': 'quizzes',
52             },
53             bases=('sites.site',),
54         ),
55         migrations.CreateModel(
56             name='Result',
57             fields=[
58                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
59                 ('slug', models.SlugField()),
60                 ('title', models.CharField(max_length=255)),
61                 ('text', models.TextField()),
62                 ('quiz', models.ForeignKey(to='quiz.Quiz', on_delete=models.CASCADE)),
63             ],
64             options={
65                 'ordering': ['quiz', 'title'],
66                 'verbose_name': 'result',
67                 'verbose_name_plural': 'results',
68             },
69             bases=(models.Model,),
70         ),
71         migrations.AddField(
72             model_name='question',
73             name='quiz',
74             field=models.ForeignKey(to='quiz.Quiz', on_delete=models.CASCADE),
75             preserve_default=True,
76         ),
77         migrations.AlterUniqueTogether(
78             name='question',
79             unique_together=set([('quiz', 'slug'), ('quiz', 'ordering')]),
80         ),
81         migrations.AddField(
82             model_name='answer',
83             name='go_to',
84             field=models.ForeignKey(related_name='go_tos', blank=True, to='quiz.Question', null=True, on_delete=models.CASCADE),
85             preserve_default=True,
86         ),
87         migrations.AddField(
88             model_name='answer',
89             name='question',
90             field=models.ForeignKey(to='quiz.Question', on_delete=models.CASCADE),
91             preserve_default=True,
92         ),
93         migrations.AddField(
94             model_name='answer',
95             name='result',
96             field=models.ForeignKey(blank=True, to='quiz.Result', null=True, on_delete=models.CASCADE),
97             preserve_default=True,
98         ),
99     ]