summaryrefslogtreecommitdiff
path: root/yaksh/migrations/0009_auto_20180113_1124.py
blob: dbbcb307fde50847604f58e5f2aaa4a5521d9cab (plain)
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
148
149
# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2018-01-13 11:24
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import yaksh.models


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('yaksh', '0008_release_0_7_0'),
    ]

    operations = [
        migrations.CreateModel(
            name='CourseStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grade', models.CharField(blank=True, max_length=255, null=True)),
                ('total_marks', models.FloatField(default=0.0)),
            ],
        ),
        migrations.CreateModel(
            name='LearningModule',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True, default=None, null=True)),
                ('order', models.IntegerField(default=0)),
                ('check_prerequisite', models.BooleanField(default=True)),
                ('html_data', models.TextField(blank=True, null=True)),
                ('is_trial', models.BooleanField(default=False)),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='module_creator', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='LearningUnit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.IntegerField()),
                ('type', models.CharField(max_length=16)),
                ('check_prerequisite', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('html_data', models.TextField(blank=True, null=True)),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='LessonFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to=yaksh.models.get_file_dir)),
                ('lesson', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lesson', to='yaksh.Lesson')),
            ],
        ),
        migrations.RemoveField(
            model_name='quiz',
            name='course',
        ),
        migrations.RemoveField(
            model_name='quiz',
            name='language',
        ),
        migrations.RemoveField(
            model_name='quiz',
            name='prerequisite',
        ),
        migrations.AddField(
            model_name='answerpaper',
            name='course',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='yaksh.Course'),
        ),
        migrations.AddField(
            model_name='question',
            name='min_time',
            field=models.IntegerField(default=0, verbose_name='time in minutes'),
        ),
        migrations.AddField(
            model_name='question',
            name='solution',
            field=models.TextField(blank=True),
        ),
        migrations.AddField(
            model_name='quiz',
            name='creator',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='quiz',
            name='is_exercise',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='quiz',
            name='weightage',
            field=models.FloatField(default=1.0),
        ),
        migrations.AddField(
            model_name='learningunit',
            name='lesson',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='yaksh.Lesson'),
        ),
        migrations.AddField(
            model_name='learningunit',
            name='quiz',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='yaksh.Quiz'),
        ),
        migrations.AddField(
            model_name='learningmodule',
            name='learning_unit',
            field=models.ManyToManyField(related_name='learning_unit', to='yaksh.LearningUnit'),
        ),
        migrations.AddField(
            model_name='coursestatus',
            name='completed_units',
            field=models.ManyToManyField(related_name='completed_units', to='yaksh.LearningUnit'),
        ),
        migrations.AddField(
            model_name='coursestatus',
            name='course',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='yaksh.Course'),
        ),
        migrations.AddField(
            model_name='coursestatus',
            name='current_unit',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='current_unit', to='yaksh.LearningUnit'),
        ),
        migrations.AddField(
            model_name='coursestatus',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='course',
            name='learning_module',
            field=models.ManyToManyField(related_name='learning_module', to='yaksh.LearningModule'),
        ),
    ]