joeni

0001_initial.py

1
# Generated by Django 2.0b1 on 2017-11-18 22:03
2
3
from django.conf import settings
4
from django.db import migrations, models
5
import django.db.models.deletion
6
7
8
class Migration(migrations.Migration):
9
10
    initial = True
11
12
    dependencies = [
13
        ('agora', '0001_initial'),
14
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
15
    ]
16
17
    operations = [
18
        migrations.CreateModel(
19
            name='Announcement',
20
            fields=[
21
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
22
                ('title', models.CharField(help_text='A quick title for what this is about.', max_length=20)),
23
                ('text', models.TextField(help_text='The announcement itself. Orgmode syntax available.')),
24
                ('posted', models.DateTimeField(auto_now_add=True)),
25
            ],
26
        ),
27
        migrations.CreateModel(
28
            name='Assignment',
29
            fields=[
30
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
31
                ('information', models.TextField(help_text='Any additional information regarding the assignment. Orgmode syntax available.')),
32
                ('deadline', models.DateTimeField(help_text='The date and time this task is due.')),
33
                ('posted', models.DateField(auto_now_add=True)),
34
                ('digital_task', models.BooleanField(default=True, help_text='This determines whether this assignment requires handing in a digital file.')),
35
            ],
36
        ),
37
        migrations.CreateModel(
38
            name='Course',
39
            fields=[
40
                ('number', models.PositiveSmallIntegerField(help_text="The number associated with this course. A leading '0' will be added if the number is smaller than 1000.", primary_key=True, serialize=False)),
41
                ('name', models.CharField(help_text='The name of this course, in the language that it is taught. Translations are for the appropriate template.', max_length=64)),
42
                ('language', models.CharField(choices=[('NL', 'Dutch'), ('EN', 'English'), ('FR', 'French')], help_text='The language in which this course is given.', max_length=64)),
43
                ('contact_person', models.ForeignKey(help_text='The person to contact regarding this course.', limit_choices_to={'is_staff': True}, on_delete=django.db.models.deletion.PROTECT, related_name='contact_person', to=settings.AUTH_USER_MODEL)),
44
                ('coordinator', models.ForeignKey(help_text="The person whom's the coordinator of this course.", limit_choices_to={'is_staff': True}, on_delete=django.db.models.deletion.PROTECT, related_name='coordinator', to=settings.AUTH_USER_MODEL)),
45
                ('educating_team', models.ManyToManyField(help_text='The team members of this course.', limit_choices_to={'is_staff': True}, related_name='educating_team', to=settings.AUTH_USER_MODEL)),
46
            ],
47
        ),
48
        migrations.CreateModel(
49
            name='Prerequisites',
50
            fields=[
51
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
52
                ('name', models.CharField(blank=True, help_text='To specify a name for this set, if necessary.', max_length=64)),
53
                ('ECTS_for_required_study', models.PositiveSmallIntegerField(help_text='The amount of obtained ECTS points for the required course, if any.', null=True)),
54
                ('course', models.ForeignKey(help_text='The course that these prerequisites are for.', on_delete=django.db.models.deletion.CASCADE, related_name='prerequisite_course', to='courses.Course')),
55
                ('in_curriculum', models.ManyToManyField(help_text='All courses that have to be in the curriculum to follow this. If a credit was achieved, that course can be omitted.', related_name='in_curriculum', to='courses.Course')),
56
            ],
57
        ),
58
        migrations.CreateModel(
59
            name='ProgrammeInformation',
60
            fields=[
61
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
62
                ('programme_type', models.CharField(choices=[('C', 'Compulsory'), ('O', 'Optional')], help_text='Type of this course for this study.', max_length=1)),
63
                ('study_hours', models.PositiveSmallIntegerField(help_text='The required amount of hours to study this course.')),
64
                ('ECTS', models.PositiveSmallIntegerField(help_text='The amount of ECTS points attached to this course.')),
65
                ('semester', models.PositiveSmallIntegerField(choices=[(1, 'First semester'), (2, 'Second semester'), (3, 'Full year course'), (4, 'Taught in first quarter'), (5, 'Taught in second quarter'), (6, 'Taught in third quarter'), (7, 'Taught in fourth quarter')], help_text='The period in which this course is being taught in this study.')),
66
                ('year', models.PositiveSmallIntegerField(help_text='The year in which this course is taught for this study.')),
67
                ('second_chance', models.BooleanField(default=True, help_text='Defines if a second chance exam is planned for this course.')),
68
                ('tolerable', models.BooleanField(default=True, help_text='Defines if a failed result can be tolerated.')),
69
                ('scoring', models.CharField(choices=[('N', 'Numerical'), ('FP', 'Fail/Pass')], default='N', help_text='How the obtained score for this course is given.', max_length=2)),
70
                ('course', models.ForeignKey(help_text='The course that this information is for.', on_delete=django.db.models.deletion.CASCADE, to='courses.Course')),
71
            ],
72
        ),
73
        migrations.CreateModel(
74
            name='Study',
75
            fields=[
76
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
77
                ('name', models.CharField(help_text="The full name of this study, in the language it's taught in.", max_length=128, unique=True)),
78
                ('degree_type', models.CharField(choices=[('BSc', 'Bachelor of Science'), ('MSc', 'Master of Science'), ('LL.B', 'Bachelor of Laws'), ('LL.M', 'Master of Laws'), ('ir.', 'Engineer'), ('ing.', 'Technological Engineer')], help_text='The type of degree one obtains upon passing this study.', max_length=64)),
79
                ('language', models.CharField(choices=[('NL', 'Dutch'), ('EN', 'English'), ('FR', 'French')], help_text='The language in which this study is given.', max_length=64)),
80
                ('faculty', models.CharField(choices=[('FoS', 'Faculty of Sciences'), ('FoTS', 'Faculty of Transportation Sciences'), ('FoAaA', 'Faculty of Architecture and Arts'), ('FoBE', 'Faculty of Business Economics'), ('FoMaLS', 'Faculty of Medicine and Life Sciences'), ('FoET', 'Faculty of Engineering Technology'), ('FoL', 'Faculty of Law')], help_text='The faculty where this study belongs to.', max_length=6)),
81
                ('additional_members', models.ManyToManyField(help_text='All the other members of the exam committee.', limit_choices_to={'is_staff': True}, related_name='additional_members', to=settings.AUTH_USER_MODEL)),
82
                ('chairman', models.ForeignKey(help_text='The chairman of this study.', limit_choices_to={'is_staff': True}, on_delete=django.db.models.deletion.PROTECT, related_name='chairman', to=settings.AUTH_USER_MODEL)),
83
                ('ombuds', models.ForeignKey(help_text='The ombuds person of this study.', limit_choices_to={'is_staff': True}, on_delete=django.db.models.deletion.PROTECT, related_name='ombuds', to=settings.AUTH_USER_MODEL)),
84
                ('secretary', models.ForeignKey(help_text='The secretary of this study.', limit_choices_to={'is_staff': True}, on_delete=django.db.models.deletion.PROTECT, related_name='secretary', to=settings.AUTH_USER_MODEL)),
85
                ('vice_chairman', models.ForeignKey(help_text='The vice-chairman of this study.', limit_choices_to={'is_staff': True}, on_delete=django.db.models.deletion.PROTECT, related_name='vice_chairman', to=settings.AUTH_USER_MODEL)),
86
                ('vice_ombuds', models.ForeignKey(help_text='The (replacing) ombuds person of this study.', limit_choices_to={'is_staff': True}, on_delete=django.db.models.deletion.PROTECT, related_name='vice_ombuds', to=settings.AUTH_USER_MODEL)),
87
            ],
88
        ),
89
        migrations.CreateModel(
90
            name='StudyGroup',
91
            fields=[
92
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
93
                ('course', models.ForeignKey(editable=False, help_text='The course for which this group is.', on_delete=django.db.models.deletion.CASCADE, to='courses.Course')),
94
                ('group', models.ForeignKey(editable=False, help_text='The group that will be seen as the study group.', on_delete=django.db.models.deletion.PROTECT, to='agora.Group')),
95
            ],
96
        ),
97
        migrations.CreateModel(
98
            name='StudyProgramme',
99
            fields=[
100
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
101
                ('name', models.CharField(help_text='The name of this programme.', max_length=64)),
102
            ],
103
        ),
104
        migrations.CreateModel(
105
            name='Upload',
106
            fields=[
107
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
108
                ('upload_time', models.DateTimeField(auto_now_add=True)),
109
                ('comment', models.TextField(blank=True, help_text='If you wish to add an additional comment, state it here.')),
110
                ('file', models.FileField(editable=False, help_text='The file you want to upload for this assignment.', upload_to='assignments/uploads/%Y/%m/')),
111
                ('assignment', models.ForeignKey(editable=False, help_text='For which assignment this upload is.', limit_choices_to={'digital_task': True}, on_delete=django.db.models.deletion.CASCADE, to='courses.Assignment')),
112
                ('student', models.ForeignKey(editable=False, help_text='The student who handed this in.', limit_choices_to={'is_student': True}, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
113
            ],
114
        ),
115
        migrations.AddField(
116
            model_name='programmeinformation',
117
            name='study',
118
            field=models.ForeignKey(help_text='The study in which the course is taught.', on_delete=django.db.models.deletion.CASCADE, to='courses.Study'),
119
        ),
120
        migrations.AddField(
121
            model_name='programmeinformation',
122
            name='study_programme',
123
            field=models.ForeignKey(help_text='The study programme that this course belongs to.', on_delete=django.db.models.deletion.CASCADE, to='courses.StudyProgramme'),
124
        ),
125
        migrations.AddField(
126
            model_name='prerequisites',
127
            name='required_study',
128
            field=models.ForeignKey(help_text='If one must have a certain amount of obtained ECTS points for a particular course, state that course here.', null=True, on_delete=django.db.models.deletion.CASCADE, to='courses.Study'),
129
        ),
130
        migrations.AddField(
131
            model_name='prerequisites',
132
            name='sequentialities',
133
            field=models.ManyToManyField(help_text="All courses for which a credit must've been received in order to follow the course.", related_name='sequentialities', to='courses.Course'),
134
        ),
135
        migrations.AddField(
136
            model_name='assignment',
137
            name='course',
138
            field=models.ForeignKey(editable=False, help_text='The course for which this task is assigned.', on_delete=django.db.models.deletion.CASCADE, to='courses.Course'),
139
        ),
140
        migrations.AddField(
141
            model_name='announcement',
142
            name='course',
143
            field=models.ForeignKey(editable=False, help_text='The course for which this announcement is made.', on_delete=django.db.models.deletion.CASCADE, to='courses.Course'),
144
        ),
145
    ]
146