0001_initial.py 4.53 KB
Newer Older
Jan's avatar
Jan committed
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
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-18 15:35
from __future__ import unicode_literals

import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('members', '0007_member_receive_newsletter'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name_en', models.CharField(max_length=64, verbose_name='name (EN)')),
                ('name_nl', models.CharField(max_length=64, verbose_name='name (NL)')),
            ],
            options={
                'verbose_name': 'category',
                'verbose_name_plural': 'categories',
            },
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('course_code', models.CharField(max_length=16)),
                ('ec', models.IntegerField(verbose_name='EC')),
                ('since', models.IntegerField()),
                ('until', models.IntegerField(blank=True)),
                ('period', models.CharField(max_length=64, verbose_name='period')),
                ('shorthand_en', models.CharField(max_length=10, verbose_name='shorthand (EN)')),
                ('shorthand_nl', models.CharField(max_length=10, verbose_name='shorthand (NL)')),
                ('name_en', models.CharField(max_length=255, verbose_name='name (EN)')),
                ('name_nl', models.CharField(max_length=255, verbose_name='name (NL)')),
                ('categories', models.ManyToManyField(blank=True, to='education.Category', verbose_name='categories')),
                ('old_courses', models.ManyToManyField(blank=True, to='education.Course', verbose_name='old courses')),
            ],
            options={
                'verbose_name': 'course',
                'verbose_name_plural': 'courses',
            },
        ),
        migrations.CreateModel(
            name='Exam',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('document', 'Document'), ('exam', 'Exam'), ('partial', 'Partial Exam'), ('resit', 'Resit'), ('practice', 'Practice Exam')], max_length=40, verbose_name='exam type')),
                ('name', models.CharField(max_length=255, verbose_name='exam name', blank=True)),
                ('uploader_date', models.DateField(default=django.utils.timezone.now)),
                ('accepted', models.BooleanField(default=False, verbose_name='accepted')),
                ('exam_date', models.DateField(verbose_name='exam date')),
                ('file', models.FileField(upload_to='education/files/exams/')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='education.Course', verbose_name='course')),
                ('uploader', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='uploader')),
            ],
            options={
                'verbose_name': 'exam',
                'verbose_name_plural': 'exams',
            },
        ),
        migrations.CreateModel(
            name='Summary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='summary name')),
                ('uploader_date', models.DateField(default=django.utils.timezone.now)),
                ('year', models.IntegerField()),
                ('author', models.CharField(max_length=64, verbose_name='author')),
                ('accepted', models.BooleanField(default=False, verbose_name='accepted')),
                ('file', models.FileField(upload_to='education/files/summary/')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='education.Course', verbose_name='course')),
                ('uploader', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='uploader')),
            ],
            options={
                'verbose_name': 'summary',
                'verbose_name_plural': 'summaries',
            },
        ),
    ]