summaryrefslogtreecommitdiff
path: root/app/classes/migrations/0001_initial.py
blob: b533aafd794f3d204d400542533c97afd9954d53 (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
# Generated by Django 3.2.8 on 2022-01-09 19:25

import classes.models
import datetime
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='ClassMedia',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('date_created', models.DateTimeField(default=datetime.datetime.now)),
                ('file', models.FileField(blank=True, null=True, upload_to=classes.models.get_upload_path)),
            ],
        ),
        migrations.CreateModel(
            name='Session',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('date_start', models.DateField(verbose_name='Start Date')),
                ('date_end', models.DateField(verbose_name='End Date')),
                ('slug', models.SlugField()),
            ],
            options={
                'ordering': ('-date_start',),
                'get_latest_by': 'date_start',
            },
        ),
        migrations.CreateModel(
            name='Class',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('description', models.TextField()),
                ('requires', models.TextField(verbose_name='If previous classwork is required, list prerequisites here')),
                ('slug', models.SlugField()),
                ('date_created', models.DateTimeField(default=datetime.datetime.now)),
                ('session', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='classes.session')),
                ('uploads', models.ManyToManyField(blank=True, to='classes.ClassMedia')),
            ],
            options={
                'ordering': ('-date_created',),
                'get_latest_by': 'date_created',
            },
        ),
    ]